#ji._.nx
1 messages · Page 1 of 1 (latest)
Sure, wallets work for recurring payments
I tried to find a way to do this but couldn't find any resources! Any code help or resources that can help me here?
Which payment UIs/surfaces are you using?
React with node.
Checkout? Payment Element?
Payment Elements
Then you should get both wallets with little integration effort. You will need to register domains for Apple Pay: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#verifying-your-domain-with-apple-pay
Otherwise Google Pay should just work
When creating the payment intent on the server or payment request on the client, how will I add the plan_id and the customer id with the payment?
I thought you were doing recurring payments?
Yes, I want to do it but the only stripe doc I found was about single payments.
I am doing recurring payments but they currently use subscription API on nodejs and saved payment methods.
On this page, https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#verifying-your-domain-with-apple-pay
it's creating a payment request with an amount. and then requesting payment from the user and creating the payment intent after that.
But how does it link with a price_id of the stripe products and create a recurring payment or a subscription?
Sorry, I thought you were using the Payment Element?
I think this page that you mentioned in using the payment elements. Isn't it?
This is my code.
I am using stripe elements here to create the payment request button.
For the payment request button, it's creating a payment request with an amount of 3999.
Then mounting the button on the DOM.
That's not the Payment Element. That's the Payment Request Button
What's the exact issue?
Issue is:
I want to subscribe a user to a subscription plan (Stripe Product) and the user wants to pay by google/apple pay.
But I couldn't figure out a way, how to do it!
Ok, take Apple Pay out of the equation. How are they paying currently?
They are paying currently using Visa/Master cards.
What we do currently is create the payment methods (cards), attach the payment methods to the customer and then subscribe the user to a subscription using the default payment method.
Card element to add the payment method
And then subscribe using
Payment method creation
Then I'd just recommend updating to the Payment Element which brings Apple/Google Pay for free: https://stripe.com/docs/payments/payment-element/migration
You shouldn't really be using createPaymentMethod either
Oh
This is the flow you want: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
I think so. Thanks.
I'll check this out and get back to you if I have any questions.
Thanks for your time and the help!!!
np!