#elthys-Subscription
1 messages · Page 1 of 1 (latest)
OK, you can use SetupIntent API to collect the payment method first, so that you can go through the 3DS authentication process (if necessary)
You can get the SetupIntent object from Subscription via https://stripe.com/docs/api/subscriptions/object#subscription_object-pending_setup_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in my js, instead of call stripe.createPaymentMethod( CARD info), i call directly stripejs for setup intent ?
Hi! Taking ober Jack Tan. So here the full process would be:
- Create the subscription on the backend witha .free trial
- Retreive the
pending_setup_intent.client_secret(like mentioned above) - Use the
client_secreton the frontend with the Payment Element to collect payment information - Call
confirmSetupon the frontend to confirm the SetupIntent https://stripe.com/docs/js/setup_intents/confirm_setup