#ilyeselb
1 messages ยท Page 1 of 1 (latest)
Could you link the original thread?
we didnt talk too much i just asked if it was the cause
he said maybe it can cause payment failure
i had to disconnect at that time
but im searching for a solution , without updating my whole payment flow
im creating a setupIntent then subsccription and confirmSetup
We need a lot more details to triage. Do you have any example SetupIntent Id? seti_xxx
let me see
seti_1NLlsmGyOBDbEOMCyLkIOU9v
this intent has failed
seti_1NNt3lGyOBDbEOMClqqAo2Eh
i just tested with this one now
seti_1NLlsmGyOBDbEOMCyLkIOU9v <- I see it failed but succeeded later
seti_1NNt3lGyOBDbEOMClqqAo2Eh can you see this one
That one succeeded
seti_1NNt3lGyOBDbEOMClqqAo2Eh ? this one i just received a webhook telling me this Message: invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method.
Util Data:
id = in_1NLm6MGyOBDbEOMCO8EYp509
i just tested with this test card
4000000000003220
What event id is that? I don't see any failure on seti_1NNt3lGyOBDbEOMClqqAo2Eh
so this is the invoice related to this setup intent
i have a webhook for the failed invoice and payment , and it send me this every time i use 3D secure for the payment
Yes but you should have an event id when you refer to webhook evt_xxx
When you receive the webhook event, you should have its Id https://stripe.com/docs/api/events/object#event_object-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay
i will send it to you in a couple of minutes
evt_1NNt4BGyOBDbEOMCXzd8cXXl
this the event for the setup intent
evt_1NNt4FGyOBDbEOMCPpjHmkN7 this for the subscription that is incomplete due to the error
evt_1NNt4FGyOBDbEOMCY64c2KSL and this for the invoice
so what do you think the problem is ?
Hi! I'm taking over this thread.
The first event you shared is for setup_intent.succeeded, so what exactly is the issue?
the issue is that the invoice and the subscription are incomplet and i receive a hook telling me
Message: invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method.
So your flow is to:
- Create a SetupIntent to collecgt a payment method
- Then create a Susbcription witht hat payemnt method
Is this correct?
Is there a particular reason you are doing this? Because that's a flow we don't recommend doing. Instead you should directly create the Subscription with will directly contain a PaymentIntent or SetupIntent you can use.
i think its because we have a coupon input on the checkout page , and we cant update the subcription with the coupon after creating it , so every time we need to create a new subscription if the user put a coupon , and we end up having incomplete subscription remaining
If youb have to collect the payment method first, then you should use this new fow: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
yes i saw this method , i have a question about it , when should i save the pm ? i click submit i create the subs before redirrecting
but the subscription dosent contain the pm
With this link the flow is different:
- First mount the Payment Element
- Then when the user submits the form: create the subscription and confirm the payment using the client secret of the subscription
i will test it now
i got this
IntegrationError: elements.submit() must be called before stripe.confirmPayment(). Call elements.submit() as soon as your customer presses pay, prior to any asynchronous work. Integration guide: https://stripe.com/docs/payments/accept-a-payment-deferred
Yes you need to follow exactly the link I shared. First submit and then confirm the payment:
No both should work. But just to be safe you could follow the documentation exactly for now.
Happy to help ๐