#DrySs
1 messages · Page 1 of 1 (latest)
Hi there
So to do this you can't use the SetupIntent from the Subscription in this case. You want to create a SetupIntent prior to creating the Sub and basically follow our guide here: https://stripe.com/docs/payments/bancontact/set-up-payment?platform=web where you will set payment_method_types: 'bancontact' for the SetupIntent. Then once you confirm that you will receive a SEPA Debit PaymentMethod in the SetupAttempt via the generated_sepa_debit property which you then set as the Subscription's default_payment_method when you create the Subscription.
thanks for your reply 🙂 I've already followed your guide to generate SetupIntent
but I'm stuck for this part:
"SetupAttempt via the generated_sepa_debit property which you then set as the Subscription's default_payment_method when you create the Subscription."
How to provide it in the Subscription creation?
You pass that PaymentMethod ID here: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
Understood! And how to get the "SetupAttempt via the generated_sepa_debit"? Can I retrieve it from the SetupIntent? BTW, what is the difference between SetupAttempt & SetupIntent?
Yep you retrieve the SetupIntent and expand latest_attempt: https://stripe.com/docs/api/setup_intents/object#setup_intent_object-latest_attempt
A SetupAttempt is one attempted confirmation of a SetupIntent