How to generate card nonce for repeated transactions without making users to enter card details?

风格不统一 提交于 2019-12-11 18:07:10

问题


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:


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



来源:https://stackoverflow.com/questions/55397261/how-to-generate-card-nonce-for-repeated-transactions-without-making-users-to-ent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!