3D Secure for payment intent AND subscription

156 views
Skip to first unread message

Kristian Tan

unread,
Dec 16, 2022, 5:48:03 AM12/16/22
to Stripe API Discussion
I have a project in which the customer is charged an upfront payment at checkout, and at the same time subscribes to a monthly subscription charge which starts on their specified date, the issue I am facing is that if these payments both require 3DS to be set up, I want to be able to have the customer authenticate once for both charges.  I need the initial payment to be made at the time of checkout, but the subscription may not start for some time after checkout (which I am achieving with the Subscription trial_end field), is there a way I can perform both of these actions with one charge, perhaps in the Subscription I can specify to charge the customer a one off charge immediately and delay the monthly billing?  

Malik Asif

unread,
Dec 16, 2022, 6:01:24 AM12/16/22
to api-d...@lists.stripe.com
Hello Kristan 

You should first create a paymentintent to charge one time amount and fetch Client secret of this paymentintent to frontend to run Stripe client side function 

 ConfirmCardPayment( ); 

Note: must Pass payment method I'd pm_xxx to this payment intent. 

It will pouplate and will complete 3D Secure authentication, 

Then you can use that payment method pm_xxxxx for any purpose. 

Best Regards
Malik Asif. 

On Fri, Dec 16, 2022, 3:48 PM Kristian Tan <kristi...@gmail.com> wrote:
I have a project in which the customer is charged an upfront payment at checkout, and at the same time subscribes to a monthly subscription charge which starts on their specified date, the issue I am facing is that if these payments both require 3DS to be set up, I want to be able to have the customer authenticate once for both charges.  I need the initial payment to be made at the time of checkout, but the subscription may not start for some time after checkout (which I am achieving with the Subscription trial_end field), is there a way I can perform both of these actions with one charge, perhaps in the Subscription I can specify to charge the customer a one off charge immediately and delay the monthly billing?  

--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Remi J.

unread,
Dec 16, 2022, 6:01:35 AM12/16/22
to api-d...@lists.stripe.com
Hello Kristian,

When you create the Subscription, you can use the `add_invoice_items` parameter [1] to add one or multiple ad-hoc line items to the first Invoice of the Subscription. If you combine this with the `trial_end` parameter then the first Invoice will have the one-time item(s) and then the next one at the end of the trial period will be for the recurring Price(s).

Overall though there shouldn't be a need for 3DS on the payment at the end of the trial since that payment happens "off session". Stripe would åttempt to claim an exemption with the bank as 3DS wouldn't be possible in this flow. You would have done 3DS on the first payment which would help claim an exemption in the future.

If you have any follow up questions, I'd recommend working with our support team and sharing detailed examples that they can help you understand: https://support.stripe.com/contact

Best,
Remi


On Fri, Dec 16, 2022 at 11:48 AM Kristian Tan <kristi...@gmail.com> wrote:
I have a project in which the customer is charged an upfront payment at checkout, and at the same time subscribes to a monthly subscription charge which starts on their specified date, the issue I am facing is that if these payments both require 3DS to be set up, I want to be able to have the customer authenticate once for both charges.  I need the initial payment to be made at the time of checkout, but the subscription may not start for some time after checkout (which I am achieving with the Subscription trial_end field), is there a way I can perform both of these actions with one charge, perhaps in the Subscription I can specify to charge the customer a one off charge immediately and delay the monthly billing?  

--

Kristian Tan

unread,
Dec 16, 2022, 8:09:48 AM12/16/22
to Stripe API Discussion, pakistan....@gmail.com
Hi Malik,

I tried using this method, the Payment intent gets created, then the subscription, the Payment intent is confirmed with 3DS and goes through successfully, but the subscription status remains incomplete in stripe and says it requires further authentication.  Do I need to Create and authenticate the payment intent before creating the subscription object at all?  

Reply all
Reply to author
Forward
0 new messages