#Benoît
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Hi, sure
I have no line in my Logs for this error
I only got the error return client-side
{
"type": "invalid_request_error",
"code": "payment_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/payment-intent-unexpected-state",
"payment_intent": {
"id": "pi_3NQnoTAYYvne95SH2s8nHtaJ",
"object": "payment_intent",
"amount": 1900,
"amount_details": {
"tip": {}
},
"automatic_payment_methods": null,
"canceled_at": 1688633128,
"cancellation_reason": "void_invoice",
"capture_method": "automatic",
"client_secret": "pi_3NQnoTAYYvne95SH2s8nHtaJ_secret_tscNJA0wWB5LMy983WbkN3iwQ",
"confirmation_method": "automatic",
"created": 1688633121,
"currency": "eur",
"description": "Subscription creation",
"last_payment_error": null,
"livemode": false,
"next_action": null,
"payment_method": "pm_1NQnoWAYYvne95SHK87hk1dn",
"payment_method_types": [
"card",
"paypal",
"sepa_debit"
],
"processing": null,
"receipt_email": "benoit....@....com",
"setup_future_usage": "off_session",
"shipping": null,
"source": null,
"status": "canceled"
},
"message": "Une erreur de traitement est survenue."
}
Does it helps ? That's the last test i made, few seconds ago
Thanks for sharing, let me check...
Thanks
Here are my last logs
Maybe this request : req_4ERhu6xzAqjYah ?
The hour doesn't match, but i don't see any other log that could match
Nope. the API response shouldn't be 200 successful.
It is
From where you get this body response? try doing the test again
and track the requestId from the headers response
Before the 3D Secure window open, i have this :
After i clicked "Complete Authentication", i've got all these logs :
I don't know which one i have to look at
I don't see yet, from where you got this API response.
From where you copied this response body?
From stripe.confirmPayment()
my response got this error
I just console.log() the response from stripe.confirmPayment()
You manage to reproduce this multiple times ?
Check confirm endpoint in the network inspector.
Yes, i reproduce each time i test
Here is the screenshot of the last confirm call :
And the response :
But this isn't the body response you shared earlier
It doens't look like this 🤔
It's not the same because i make other tests, and i share the last one for you to be updated
Do you want the very last output in plain text ?
👋 taking over for my colleague. Let me catch up.
Hello 👋
Thanks
you're deleting a subscription which voids the invoice and cancels the PaymentIntent
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
for pi_3NQnoTAYYvne95SH2s8nHtaJ
Oh !? 🤔
Ok, i will try to figure out where i make this deletion 🤔
Yes, i make a test to be sure
Ok, you were right
Thank you, you're very effective 👀
When your app is based on Stripe webhooks, to update its own database etc, how would you manage the "real time refresh" of your app ?
Because when i make payments, the webhooks are fired, my database is updated, but my customer doesn't have the last version of the database reported on his screen. After a page refresh, it would be OK
Should i make a "looping" server call to check if all treatments are done ? It's seems not a god idea
you have 2 approaches either polling for or pushing the updates
Is this a specific behaviour the Stripe allows ?
no, these are 2 dev approaches regardless of Stripe
polling means trying to fetch for the data in a repetitive manner until you get your result
whereas pushing means that once the data is ready the backend will send it to the frontend
Yes, the pushing concept would be the best in my situation. I'm looking how i could do this
Ok thank you, i will check this 👍