#Nadiya
1 messages ยท Page 1 of 1 (latest)
please enlighten me
Instead you should follow this guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions
checkout?
Checkout is the recommended approach. Otherwise if you want to use the Payment Element it's this guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
thank you so much.
Notice that we don't create a SetupIntent, we reuse the PaymentIntent created by the Subscription.
yes understood.
so, setupIntent is used to store the card only right?
i've seen people doing another api call to do subscription on the result of confirmSetup.
i've seen people doing another api call to do subscription on the result of confirmSetup.
Technically this can work, but it's a bad experience since banks may require 3DS two times in a row (first for the SetupIntent and then for the first payment of the subscription)
Happy to help ๐
sorry, why is this the recommended approach?
because, it's simpler than the other?
With your approach after you finish the SetupIntent, you will try to pay the first invoice. It means that bank may require 3DS two times in a row.
any benefits regarding security compared to other?
no not the setupIntent method
but the checkout and payment Element
I mean , designing payment element ourself, instead of using checkout
๐ taking over for my colleague. Let me catch up.
Checkout offers a low-code solution which might be in most cases the best approach but it doesn't have any extra security/PCI compliance measures that the Payment Element doesn't really have
I see, got it. thank you for the explanation
sure let me know if you need any more help
sure
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
@remote seal how can I help?
when to save the collected payment method as user's default payment method in this use case
confirmPayment is stripe api, in which we can't really do anything there
If you mean attaching it to a Customer object, then you'd need to do that manually via the API: https://stripe.com/docs/payments/save-and-reuse?platform=checkout#use-payment-method
what about this then?
What about what?
user need to subscribe to a product when clicking the submit button of payment element. , and also if possible want to save card too
Save the card to where? You can pass a parameter to set it as the default on the subscription, but if you mean on the customer then that's an additional API call
the article you shared using setupIntent, in that case i need to call another api for subscription after processing cofrimSetup
As advised by my colleagues, it's not recommended to do a SI and then a subscription
stripe
I know Stripe, but which object? You can 'save' it to both the subscription or the customer
If you're creating a Subscription, I'm not sure why you also need a Setup Intent
oh sorry, customer object.
i would like it to reflect here
i don't need setupIntent, but you just shared an article which uses setupIntent
this should be done in webhooks?
Ignore the rest of the article I was sharing details on how you can save the PM to a Customer
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
i'm following this doc
Basically you update the Customer object: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes, it can be done in a webhook handler