#abhi_webhooks

1 messages ¡ Page 1 of 1 (latest)

peak bayBOT
#

👋 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/1346813412255989762

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

regal night
#

Do you have an example evt_xxx ID that doesn't contain the data you expect?

peak bayBOT
willow rampart
#

how can i trigger the webhooks events depending on which payment type i am using like checkout session url or payment link

fluid summit
#

Hey! Taking over for my colleague.

#

One option to differenciate those webhook events is using metadata

willow rampart
#

how? i am not getting metaData

#

there is 3 events trigger for one request for example for payment link i am recieving 3 events i.e.
checkout.session.completed
charge.succeeded
payment_intent.succeeded

and got metaData only in
checkout.session.completed

but having same webhook endpoint
so
checkout.session.completed
charge.succeeded

for these 2 works fine

when goes to
payment_intent.succeeded

it dont get the metaData and overide all the db changes

#

same vice versa case for checkout session
dont get the metadata in
checkout.session.completed event

and override the db changes

where all 3 events trigger for both chekout and payment link

fluid summit
#

how? i am not getting metaData
You need to set the metadata first, then you'll receive it

#

For example, when creating a Checkout Session, pass a custom metadata in order to differenciate