I am using Square’s Checkout API to generate payment links. When a customer completes payment, I receive the payment.updated webhook event, which includes a customer_id.
After receiving the customer_id, I call the Customers API to retrieve saved cards using card API.
However, the response shows “cards”: null, meaning no saved cards exist for that customer.
My Questions:
1)Does Square automatically save a card when a customer pays via a Payment Link?
2)Is there a way to enforce card saving when creating a Payment Link?
3)Does the customer need to log in or explicitly save their card for it to be stored?
4)If a customer does save their card, how can I verify this before attempting future manual charges?
How can I ensure that a card is saved for future charges when a customer pays via a Payment Link?
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:
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.
No, Square does not automatically save a card when a customer pays via a Payment Link. The card information is used for that specific transaction only.
There isn’t a way to enforce card saving when creating a Payment Link. The customer must explicitly give permission for their card to be saved.
Yes, the customer needs to explicitly save their card for it to be stored. This can be done by including a checkbox or similar feature in your purchase flow that customers can select to specify that they want to save their card information for future purchases.
You can verify if a customer has a saved card by using the ListCards endpoint in the Cards API. This will return a list of cards on file for a specific customer. If the customer has saved a card, it will appear in this list.
To ensure that a card is saved for future charges when a customer pays via a Payment Link, you would need to ask the customer for permission to save their card information for future purchases. This could be done through a checkbox or similar feature in your purchase flow. Once the customer has given permission, you can use the Cards API to save the card for future charges.
Thanks for the response.
Can you give me the steps how we can enable the checkbox option to save the card for future transaction in square hosted checkout page?