How to generate card nonce for repeated transactio

2019-08-17 23:22发布

We have a requirement that payment should be initiated repeatedly without user's intervention just like monthly/yearly subscription fees for Mobile Apps in Google Play store . The payment should be triggered from the back end automatically after a particular interval (amount may not be same for every interval). We found that in square payment card nonce is used for performing a transaction. Card nonce is generated from the Payment form when the users enter their card information for the first time. How to generate the nonce for further transactions without making users to enter their card details in square payment form?

1条回答
Luminary・发光体
2楼-- · 2019-08-18 00:06

You would want to utilize the Card on File functionality. Basically, the first time a customer enters their credit card details in the Square Payment Form, you would generate a nonce, and then use the nonce to save the card to a customer's profile (so you would of course need to create a Square customer as well). In the future, you would be able to charge the card on file, rather than making them enter their card details again.

Details around saving cards on file with Square: https://docs.connect.squareup.com/payments/transactions/cookbook/save-cards-on-file

Details around charging charges on file with Square: https://docs.connect.squareup.com/payments/transactions/cookbook/charge-cards-on-file

Details around the CreateCustomerCard endpoint: https://docs.connect.squareup.com/api/connect/v2#endpoint-customers-createcustomercard

查看更多
登录 后发表回答