问题
I want to make a website, which has a function, users have to login and link their credit card to use that function, and I charge them for how many times they use in a month. Just like how Google does on Google Ads.
How can I do this?
Is this possible by using Google Pay API?
Google Pay FAQ says:
Support for recurring billing is tied to the payment method returned in the Google Pay API response. Both tokenized cards and cards on file can be used for recurring billing. To process recurring billing, the merchant doesn't have to call our API at a cadence. Rather, the payment credential is stored on the merchant side for recurring payments. The merchant uses their payment gateway APIs to manage recurring billing.
Google Pay supports recurring payments if the following statements are true:
Merchants comply with network rules, such as merchant-initiated transactions. Terms of payment are disclosed and accepted by the user within the merchant’s buyflow. We also support recurring billing with variable amounts. For example, monthly phone bills for mobile carriers are supported. To get more information, merchants must contact their payment gateway representative.
I don't totally understand. Does that mean I have to ask my bank? If so, what data should they give me to accomplish this? Or should I change to other service provider like paypal?
回答1:
Google Pay doesn't process the payment. It facilitates it by securely providing you (the developer) a payment token that you can use to process a payment with your payment service provider. See supported payment service providers.
What that means is that it depends on whether or not your payment service provider supports recurring payments. Which one are you using?
Braintree for example supports this type of recurring payment with Google Pay.
来源:https://stackoverflow.com/questions/61659608/how-to-auto-charge-for-my-online-service-using-google-pay