#bennie-metadata-2

1 messages · Page 1 of 1 (latest)

unreal rock
#

@whole zodiac i see the metadata in the checkout.session.completed for evt_1JZrJoD56xuafeEIKHoTh6jA
which event are you referring to? can you provide the event id?

whole zodiac
#

sorry , just i see it.

#

hi , please tell me, checkout.session.completed and invoice.paid which‘s first

#

i look both events happened

unreal rock
#

@whole zodiac i wouldn't depend on a particular order / sequence for those two events. Maybe can you explain your workflow first and we can better advise you?

#

if you want to match the metadata on a checkout session to a payment intent, then when you create the checkout session, you can save the response to your DB. and then when you receive the invoice.paid event, match that with the checkout session already in your DB.

whole zodiac
#

Because there is no mark in the checkout response, in the invoice cannot be recognized

marble iron
#

what does 'mark' mean in that context?

whole zodiac
#

Step 1: through the event "checkout.session.completed", click the order link
Step 2: Understand the status update through the "invoice.paid"

#

Because there is no sequence relationship between the two events, the program is difficult to process

marble iron
#

sorry, I don't understand you at all.

#

I know it adds complexity but it's something you have to handle.

#

a good approach is often to ignore the actual contents of the events, and instead when you receive the event, retrieve the referenced object directly from the API(which gives you the latest state of that object) and then sync your system against that, as that makes it easier to handle out of order delivery.

whole zodiac
#

I want to ask “checkout.session.completed” and “invoce.paid” Order of events

marble iron
#

there is no guaranteed order