#Benoît

1 messages · Page 1 of 1 (latest)

craggy baneBOT
graceful cliff
neat orbit
#

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

graceful cliff
#

Thanks for sharing, let me check...

neat orbit
#

Thanks

graceful cliff
#

Can you find the requestId of this body response please?

neat orbit
#

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

graceful cliff
#

Nope. the API response shouldn't be 200 successful.

neat orbit
#

It is

graceful cliff
#

and track the requestId from the headers response

neat orbit
#

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

graceful cliff
#

From where you copied this response body?

neat orbit
#

From stripe.confirmPayment()

neat orbit
#

I just console.log() the response from stripe.confirmPayment()

graceful cliff
#

You manage to reproduce this multiple times ?

graceful cliff
neat orbit
#

Yes, i reproduce each time i test

#

Here is the screenshot of the last confirm call :

#

And the response :

graceful cliff
#

But this isn't the body response you shared earlier

graceful cliff
neat orbit
#

It's not the same because i make other tests, and i share the last one for you to be updated

craggy baneBOT
neat orbit
#

Do you want the very last output in plain text ?

languid ridge
#

👋 taking over for my colleague. Let me catch up.

neat orbit
#

Hello 👋
Thanks

languid ridge
#

you're deleting a subscription which voids the invoice and cancels the PaymentIntent

#

for pi_3NQnoTAYYvne95SH2s8nHtaJ

neat orbit
#

Oh !? 🤔
Ok, i will try to figure out where i make this deletion 🤔

languid ridge
#

I guess in your webhook

#

just making an educated guess here

neat orbit
#

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

languid ridge
#

you have 2 approaches either polling for or pushing the updates

neat orbit
#

Is this a specific behaviour the Stripe allows ?

languid ridge
#

no, these are 2 dev approaches regardless of Stripe

neat orbit
#

Ok, i will try to find some docs

#

Thank you

languid ridge
#

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

neat orbit
#

Yes, the pushing concept would be the best in my situation. I'm looking how i could do this

languid ridge
#

usually it's by websockets

#

but that's not really Stripe related

neat orbit
#

Ok thank you, i will check this 👍