#idhruv - subscription
1 messages · Page 1 of 1 (latest)
Sure
so, if we set the subscription when customer pays for anything using a 3ds enabled card then how will we process it?
how will we authenticate it because it will be a monthly charge right? and generally i have seen that the first charge always happens after 1 hour of customer paying for anything in subscription
When you create the subscription schedule, you will get a subscription ID. Then use the subscription.latest_invoice.payment_intent to pay the first invoice on_session for the customer to go though 3DS.
And if the invoice is still in draft status, you can finalize it yourself with https://stripe.com/docs/api/invoices/finalize
i dont fully understand this
sorry
in my case first invoice is automatically cut by stripe
after 1 hour which it takes to process the payment (until then the payment stays in draft mode)
const subscriptionSchedule = await stripe.subscriptionSchedules.create(subscriptionObj); like this i create subscription schedule
Here's a little more details:
- Create the subscription schedule
- Retrieve the
subscription.latest_invoicecreated by the schedule - Finalize the invoice so it's no longer in draft with https://stripe.com/docs/api/invoices/finalize
- Get the
invoice.payment_intent.client_sercet - Use the
client_secreton the frontend to collect payment information (at this step the user might go thought 3DS)
okay let me check if this is possible in my code