#Mr.Yang
1 messages · Page 1 of 1 (latest)
Hi there, what integration are you using? Checkout session or Payment Element?
PaymentIntent and subscriptions
PaymentIntent and subscriptions are backend APIs. What's your frontend integration?
html
I want the user to add the payment address first, and the payment will be deducted automatically
OK, I assume you are using PaymentElement in you webpage.
https://stripe.com/docs/google-pay?platform=web -> Google Pay doesn't requires additional configuration
https://stripe.com/docs/apple-pay?platform=web -> Apple Pay requires you to register your domain (details here https://support.stripe.com/questions/enable-apple-pay-on-your-stripe-account)
I want to add a google pay that automatically charges customers and payment_method when making a payment without requiring the user to enter a payment address
Is your current integrating asking address?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
When you create a payment, you have a default payment method so you don't need to fill it in.
So you want to collect an apple pay/google pay payment_method first, and use it to create and confirm off_session payment_intents from backend?
yes
OK. Please note that there's a limitation in Apple Pay
https://stripe.com/docs/apple-pay?platform=web#recurring-payments
For Google Pay, you can follow this document to setup a payment_method and create off_session charges (https://stripe.com/docs/payments/save-and-reuse?platform=web)
You just need to set payment_method_types to ["card"], and Google Pay option will automatically appears in supported browsers for a page that's served from HTTPS.
There is no google pay when I add a payment method. How do I use it when I create a payment?
Again, google pay and apple pay only work on the web, not automatic deductions and subscriptions
There is no google pay when I add a payment method -> Are you serving your page through HTTPs? Have you added a valid credit card to your Google Pay account?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Create a payment method without google pay for the type parameter
Ah, you can't create a google pay payment_method programatically by using PaymentMethods API. You need to collect it from frontend via PaymentElement, PaymentRequestButton or Checkout page