We couldn’t use a CardOnFile that is saved when paid using ApplePay and the Create Card API worked and we were able to tokenize the card but the payment with this saved card is failing. Network type is mastercard
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Create a Card on File and a Payment
Create a Shared Card on File and Make a Payment
Charge a Card on File
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
When using the Cards API to save a card on file, it’s important to note that payments made using digital wallets like Apple Pay cannot be used to store a card on file. This is because the Cards API only supports saving credit or debit cards directly, not those processed through digital wallets.
If you successfully tokenized the card using the Create Card API, but the payment is failing, there could be several reasons for this:
-
Network Tokenization: Square supports network tokenization for Visa, Mastercard, and American Express. Ensure that the network tokenization process is correctly set up, as it can lead to fewer declines.
-
SCA Verification: If Strong Customer Authentication (SCA) is required, ensure that the verification process is completed successfully. This is particularly important in regions where SCA is mandated.
-
Card Details: Double-check that the card details, including the card ID and customer ID, are correctly specified in the payment request.
-
Issuer Alerts: Check if there are any issuer alerts, such as the card being marked as closed by the issuing bank, which could cause the payment to fail.
-
Permissions: Ensure that the necessary OAuth permissions are granted for processing payments with the saved card.
If the issue persists, reviewing the specific error messages returned by the Payments API can provide more insight into why the payment is failing.
This answer was reviewed by @Bryan-Square.