#idhruv - subscription

1 messages · Page 1 of 1 (latest)

polar knoll
#

Hi there!

#

I'm not sure I understand. Can you clarify your question?

silent bridge
#

please give me few minutes

#

i am in a meeting

polar knoll
#

Sure

silent bridge
#

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

polar knoll
#

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.

silent bridge
#

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

polar knoll
#

Here's a little more details:

  1. Create the subscription schedule
  2. Retrieve the subscription.latest_invoice created by the schedule
  3. Finalize the invoice so it's no longer in draft with https://stripe.com/docs/api/invoices/finalize
  4. Get the invoice.payment_intent.client_sercet
  5. Use the client_secret on the frontend to collect payment information (at this step the user might go thought 3DS)
silent bridge
#

okay let me check if this is possible in my code