#ilyeselb
1 messages · Page 1 of 1 (latest)
You don't need to create a PaymentIntent directly. The subscriptoin will create invoice and you can get the paymentIntent from the invoice.
so how the flow should be ?
on checkout payment (payment element) should i create the subscription with status incomplete ?
before making the payment then update it
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription which step are you in right now?
actually we have alerady a working solution , but we use setupIntent then we retreive the payment element and create subscription , we did it this way because we had a problem before , we were creating subcritpion and retreive intent from it but we had a problem on update subscription with coupon
now we have a issue with user using 3D secure payment
so asked one of you dev
and he told me this
Hi! I'm taking over this thread.
You can leverage our newer flows that allow you to defer the creation of a Subscription (or Payment Intent) object until after the Payment Element is rendered, which will help avoid having incomplete Subscriptions hanging around until they are automatically canceled.
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
We have two different flow to create Subscriptions:
- The regular flow, where you first create the Subscription: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
- The deferred flow, where you first create the Payment Method: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
And both flows should work. It completely depends on your needs.
now we have a issue with user using 3D secure payment
Can you clarify what is the issue exactly?
when we pay with 3d secure , we have invoice failed issue , it only happen with 3d ecure payments
so its not update the subscription status and the invoice statue
Is it for the first payment of the subscription, or following payments?
the first one
Can you share a subscription ID (sub_xxx) with this issue?
okay t will just take 3 minute
sub_1NNAV9GyOBDbEOMCCu85WKRo
this one is on test mode
Looks like you never did the 3DS flow? https://dashboard.stripe.com/test/payments/pi_3NNAV9GyOBDbEOMC1OUaZRC9
Can you explain your current flow?
you mean to test i used ths card
After you create the Subscription, what are you doing?
we create subscription after payment or with the payment we can say we pass PM to create subscription,if subs create success the payment is a success, if not means the payment has failed
Oh so first you create a SetupIntent, and then just after you create a subscription with that payment method? That's not something we recommend doing.
yes thats we do
Is there a reason for doing it this way?
we did this because creating a subscrptiion before payment ,didnt allow us to update the subscritpion with coupon
Got it! So your flow is:
- Collect payment method with SetupIntent
- Ask coupon from customer
- Create the subscripton with the payment method from setp 1 and with coupon from step 2
Is this correct?
It's not possible to swap step 1 and 2? First ask for a coupon and then collect the payment method?
no its not possible thats the flow that we need to follow , coupon and payment element on a same page
If you can swap 1 and 2, then I recommend this flow: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
If you can't, then you should use the new flow you linked at the beginning: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
yes so for the flow of the flow of the beginning , how does it work exaclty
how do i display the paymentElement ?
Have you read the guide? It expains everything.
no i mean should i use create intent
It's a new flow that allows you to use the Payment Element without any SetupIntent or PaymentIntent.
before showing the paymentElement
No
okay so for the items and price i should set them mannualy not from the invoice
thanks
have a nice day
Happy to help 🙂
i have a small question , how can i display the paymentElement without payment intent ?
i don't see any thing mentioning it on the docs
See this code? It doesn't use any PaymentIntent, but it's enough to mount the Payment Element.