#zuohao
1 messages · Page 1 of 1 (latest)
If you refer Checkout as Checkout Session (Stripe hosted payment page), it's recommended to use checkout.session.* events such as checkout.session.completed for payment outcome: https://stripe.com/docs/payments/checkout/fulfill-orders#delayed-notification
For refunds, Stripe will send charge.refunded event for successful refund by default. In some cases that the refund is failed at later charge.refund.update will be sent: https://stripe.com/docs/refunds#failed-refunds
I saw and tested the checkout.session.* events mentioned in the documentation you recommended. However, based on the event descriptions, I'm not certain. In my testing environment, when I used Alipay for payment and clicked "AUTHORIZE TEST PAYMENT," I only received the checkout.session.completed event and did not receive the checkout.session.async_payment_succeeded event. In our scenario, when a user selects and purchases items on the platform and successfully completes the payment using WeChat Pay or Alipay, we proceed to ship the items to the user. Can I assume that receiving the checkout.session.completed event means that the user has made the payment and proceed to ship the items to the user?
checkout.session.async_payment_succeeded will only be sent if the customer selects and pays with asynchronous payment method such as ACH direct debit. Asynchronous will take longer time to process. If the payment method is synchronous, only checkout.session.completed will be sent upon successful payment.
As mentioned by the doc, once checkout.session.* is received, your system should check payment_status to determine if the payment is paid successfully or waiting for the async checkout.session.async_* for the payment outcome
The correct way is to check payment_status of the checkout.session.* events to identify the successful payment. When payment_status becomes paid, you can fulfil the order by shipping the items to the customer
You may refer to the code example in https://stripe.com/docs/payments/checkout/fulfill-orders#delayed-notification on how it can be done
Can I understand that for a successful payment by the user, I will only receive either the checkout.session.completed event or the checkout.session.async_payment_succeeded event (based on whether the user used synchronous or asynchronous payment), but not both events simultaneously?
In case of async payment method, both checkout.session.completed and checkout.session.async_* events will be sent
That's the reason why you should also check payment_status from the Checkout Session object in the event body
What is the payment_status provided by checkout.session.completed when using asynchronous payment methods?
It'll be unpaid
When I'm testing in the development environment, I often receive event notifications that don't belong to me. Is this a normal occurrence? Is it because the testing environment is shared among all developers, and their events may sometimes be sent to me as well?
All the events sent are associated to your account
You will only receive the events that made on your account and they are not shared
Can you share your account ID (acct_xxx) and the example event ID (evt_xxx) that you think it doesn't belong to yours?
You can find your account ID by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.