#issamb-subs
1 messages · Page 1 of 1 (latest)
hello, so Subscription already do create PaymentIntents under the hood
I am trying to make an on-session purchase of a subscription and subsequently the next payments will be off session.
that is by default how Subscription already work
so which guide are you following? most Stripe guides should already account for what you're trying to do, since that is how Subscription work
Currently I am collecting the payment methode using SetupIntent on the frontend, creating the subscription and assigning the payment methode to it on the backend with default status incomplete then confirming the automatically generated PaymentIntent. The problem is this makes the initial payment off session
This is relevant to me bc the user will have to go through authentication when adding their payment methode with SetupIntent, and again when the PaymentIntent is to be confirmed on the backend
var options = new PaymentIntentConfirmOptions{PaymentMethod = paymentMethod,};
var service = new PaymentIntentService();
service.Confirm(subscription.LatestInvoice.PaymentIntent.Id,options);
Currently I am collecting the payment methode using SetupIntent on the frontend, creating the subscription and assigning the payment methode to it on the backend with default status incomplete then confirming the automatically generated PaymentIntent. The problem is this makes the initial payment off session
yeah so that is not the right way to integrate Subscription
which is why I asked what guide you are following
cause all our standard Subscription guides do not make you do this
it takes a payment up front
it does not do SetupIntents
(except for trials which is expected)
I honestly can't find the guide I used, but if this is not the right way to integrate it I will use the guide you provided me
does this also save the payment methode after the purchase?
yes it does
Just went through the guide, looks like exactly what I need. I have a quick question regarding 3D Secure. When an off session payment requires authentication, how can I find the stripe page to show to the user? would be included in the invoice?
You could just point out the right place for me to look in the docs if it's already explained, I just can't find it
how can I find the stripe page to show to the user? would be included in the invoice?
two options there
1/ redirect the customer to the Hosted Invoice Page, which gives them an out of the box "card Element" field supporting 3DS https://stripe.com/docs/api/invoices/object?lang=node#invoice_object-hosted_invoice_url
2/ redirect customer to your payment page where you mount Card/PaymentElement yourself and pay the Subscription's Invoice's PaymentIntent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.