#skoshkarli-PaymentIntent-amount
1 messages · Page 1 of 1 (latest)
Hi there! So you want to take a one-time charge then create a subscription using the PaymentMethod from that initial charge, correct?
And then you are asking how 3DS will be handled in that case?
correct
Okay so as long as you are passing setup_future_usage: off_session on the PaymentIntent then the card will be set up to apply for the 3DS exemption on future use (such as the Subscription payment).
However, it is always possible for the issuer to force 3DS at any point
So you should always be ready to bring a customer back on-session to complete 3DS if necessary.
But overall, this will just work and 3DS will only occur on the initial one-off PaymentIntent.
thats what i am trying to avoid. So if a processed payment is attached to a subscription, you guys make another call to the issuer?
Every time a payment is attempted there is a request to the issuer for approval.
We can't just authorize a card without issuer consent.
The authorization is really the issuer's authorization
right, but if a subscription is create after the payment has been authorized already, why call issuer again?
Well you are creating two payments here
So you need two authorizations
We don't batch
i guess maybe what i am doing is wrong then. What i really want to do is to charge for the first month before creating the subscription
maybe i just need to create the payment intent and NOT confirm it and create a sub with it?
will creating the sub then confirm the payment for me or do i still need to call stripe.confirmPayment?
Okay let's back up a sec
So you want to take a one-off payment, as the first payment of the Subscription, but not start the Subscription
Why not just start the Subscription?
I don't understand why you are doing this separately
because i have my product selection on the payment page and i'd have to create a subscription for every product so that i can use the payment intent secret for the PaymentElement
i can create multiple paymentIntent and just use the one that i need for the PaymentElement and then attach that payment to a single subscription.
we are basically requiring payment before subscription is created
Hmmm so is there a reason you don't want to wait to mount the Payment Element until the Product selection has taken place?
because product selection and the form are rendered on the same page
initially a single product is selected by default
which is the one i will be rendering the form with
then if a user switches to another product i will re-render the form with the new secret
Hmm okay well overall this would be no different really between creating a new Subscription versus creating a new PaymentIntent to re-render. That said... I'd still just break your page into two separate pieces and wait to trigger mounting your Payment Element until the specific product is selected. That would really be the cleanest way to do this.
i see. One other way i am thinking of doing this is to create a subscription with default product, then if the user changes the product, i'd update the item in the subscription
You don't want to do that since the invoice will already be created upon Subscription creation.
So that doesn't really work
i see
so i'd have to create a subscription with each product on the page then
then use the appropriate one and call stripe.confirmPayment on its intent when form is filled out and submitted
Well you have to render PaymentElement using the correct client secret
right, i will re-render it if the selection changes
So you would need to re-render with this method.
Yeah
So you could do that, but I wouldn't recommend it.
potentially loosing any filled out info
and there is no problem with multiple subscriptions being created and letting them drop off as they will be incomplete, right?
yeah i agree, unfortunately with the product selection being on the payment page, i can't really change much
for your other customers though, if someone say has product selection on a page before payment page, if the user decides to change the product selection, do they go back and create a new subscription again ?
Yes in that case you would cancel the past one and recreate
But I don't understand: yeah i agree, unfortunately with the product selection being on the payment page, i can't really change much
That isn't limiting
You can still treat this just like having two pages.
You just add a button or something on the page that triggers the mounting of Payment Element after the Product selection
right, but one or the other would be disabled
currently its radio buttons
to select a product
What does disabled mean here?
when you say they can be on the same page, i'd have to disable the form until a product selection is confirmed, then disable the product selection so that payment form can be completed ?
Not exactly
You can wait to mount PaymentElement until ready: https://stripe.com/docs/js/element/mount
And create it
Basically it wouldn't show on your page at all
The form would be hidden until that point
Then you can decide on how to handle the Customer changing their Product selection
But no reason to create all the Subs up front
Most often the Customer will just choose a single Product and then pay for that product without changing it