This article explains how Safari's Credit Card Scan feature works.
How to Find and Delete Saved Credit Cards for Safari on iPhone
The Credit Card Scan feature works in conjunction with Safari's ability to store and autofill your credit card information.
There are two ways to use the feature. Scan your credit card into Safari's Saved Credit Cards to use with AutoFill, or scan your card directly on a merchant's e-commerce site.
Once you scan a credit card into Safari's Saved Credit Cards, it will be available via Safari's AutoFill feature. Whenever you make a purchase on a website using Safari, just tap the Add Credit Card option and you can autofill any of your saved cards.