#geeky-mechanic_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- geeky_cli-fixtures, 21 minutes ago, 14 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234638480467034113
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is the checkout.session.completed id : evt_1PB2njAfoReX6TchyuzjOk1E
I followed this advice : https://docs.stripe.com/connect/separate-charges-and-transfers?platform=web&ui=stripe-hosted#handle-post-payment-events
Which suggests to listen to the checkout.session.async_payment_succeeded
Sorry, so the issue is you're not seeing specific event types generated, correct? If so, how are you creating those events? Are they being triggered through the Stripe CLI?
Yep, specifically the ones tied to the checkout session. Let me pretty up the latter message. These were the generated events. However i was expecting a checkout.session.async_payment_succeeded as well which still hasn't fired since 6:35
Today
charge.updated
A CAD 862.31 payment for ch_3PB2nhAfoReX6Tch0DQ7rYue was updated
6:36:01 PM
checkout.session.completed
A Checkout Session was completed
6:35:59 PM
payment_intent.succeeded
The payment pi_3PB2nhAfoReX6Tch0cmOUNXW for CAD 862.31 has succeeded
6:35:59 PM
charge.succeeded
ch_3PB2nhAfoReX6Tch0DQ7rYue was charged CAD 862.31
6:35:59 PM
payment_intent.created
A new payment pi_3PB2nhAfoReX6Tch0cmOUNXW for CAD 862.31 was created
6:35:57 PM
Nope, through an API call which created a checkout session, and I manually filled it and completed the test payment with the 4242 4242 4242 4242 card
But I did add the listener
stripe listen --forward-to http://localhost:5001/payment/webhook/checkout --events=checkout.session.completed,checkout.session.async_payment_succeeded,checkout.session.async_payment_failed
For cards, the payment confirmation is supposedly immediate https://stripe.com/en-ca/guides/payment-methods-guide#2-choosing-the-right-payment-methods-for-your-business
Right, so using the 4242 test payment method, you'll get the normal card payment events (e.g. not checkout.session.async_payment_succeeded, or checkout.session.async_payment_failed)
I'm not sure what/if we give you to test asynchronous payment method workflows. Let me dig a minute and circle back
Okay, so it looks like in order to test those events, you'll need to trigger them via CLI: https://docs.stripe.com/cli/trigger#trigger-event-checkout_session_async_payment_failed and https://docs.stripe.com/cli/trigger#trigger-event-checkout_session_async_payment_succeeded
Hmmm, can I trigger this event for a specific checkout session? I need some data stored in the session for other tasks such as transfers
I believe you can override the Checkout Session ID in your trigger command, but I haven't tested that yet:~~ https://docs.stripe.com/cli/trigger#trigger-add~~
https://docs.stripe.com/cli/trigger#trigger-override <--- this is the right URL (ignore the one above)
I guess the structure follows the JSON? so for a session object it would be session.id={desired id} ?
I believe so. Is that working for you? I can try to create the command on my end here in a minute once the server calms down.
Let me try that
I'm not sure about the syntax of the flag, what is the resource?
Tried this :
$ stripe trigger checkout.session.async_payment_succeeded --override session:id=cs_test_a1GPVZlHuaTlOrKtusBPC9koTZdDKgrL8ND9YDEhXWlweyYX57GlZHVdnw
didn't have the right id
What did you get as a result?
evt_1PB3jUAfoReX6TchGp5icCrv
This was the id : cs_test_a1y3LZ7YBkKT0PBHDWrw1mJDZShqUNrz7PkdW1qCY18IfvAoBZ5SiUnTaX
$ stripe trigger checkout.session.async_payment_succeeded --override --help Invalid value for override flag (--help). The override flag requires a value to set (--override fixtureName:path.to.param=value).
If this is the Data, do I have to add the object param?
Wait, hold on, let's back up a second. Why do you need to use an existing Checkout Session ID instead of letting CLI create a new one?
I need some data stored in the session for other tasks such as transfers
If you just need to do this, then you should let it create a new Checkout Session for you and just--addthe data: https://docs.stripe.com/cli/trigger#trigger-add