#mehdi-gba_webhooks

1 messages ยท Page 1 of 1 (latest)

quartz girderBOT
#

๐Ÿ‘‹ 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/1229718946199109744

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

royal bobcatBOT
topaz seal
#

Hello, I'm a fellow colleague of Mehdi and here to answer additional questions if needed.

jagged spindle
#

Hi, let me help you with this.

#

Each Stripe webhook event carries a different Stripe object type. metadata is attached to a Stripe object, not an event. You need to have a clear understanding of what webhook event types you need to listen to for your use case, and add the metadata to the correct Stripe object.

topaz seal
#

as of now, our events are triggered from invoices, and in the invoice that we created we clearly see the metadata added.

#

However, when the event is triggered from "invoice.sent" we do not see the metadata in the event json

jagged spindle
#

How are you adding the metadata right now?

red steeple
#

we add this metadata with our API who add our partners from the CRM

#

here is the manual way to add this metadata

jagged spindle
#

That's a Customer object.
On the Invoice object from the event payload you get the customer property that contains the Customer ID. You can use this ID to fetch the Customer object that will contain this metadata: https://docs.stripe.com/api/customers/retrieve

red steeple
#

that means we cannot have it directly from the webhook ? We need to create a dedicated request to retrieve it right ?

jagged spindle
#

You can expand the webhook payload. What programming language are you using?

topaz seal
#

we are not using programming language at the moment for that, but we can adapt ๐Ÿค”

jagged spindle
#

In any case, it's probably easier to just fetch the Customer in a separate request.

topaz seal
#

(we use a plain logic app for that, a no code way)

#

I think so too for that. Thanks for your feedback ๐Ÿ™‚

jagged spindle
#

Happy to help.

red steeple
#

thanks for your help

#

have a nice day

jagged spindle
#

You too.

topaz seal
#

have a nice day ๐Ÿ™‚