#zuohao

1 messages · Page 1 of 1 (latest)

craggy lynxBOT
coral bronze
pallid surge
#

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?

coral bronze
#

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

pallid surge
#

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?

coral bronze
#

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

pallid surge
#

What is the payment_status provided by checkout.session.completed when using asynchronous payment methods?

coral bronze
#

It'll be unpaid

pallid surge
#

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?

coral bronze
#

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