#mehdi-gba_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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.
Hello, I'm a fellow colleague of Mehdi and here to answer additional questions if needed.
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.
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
How are you adding the metadata right now?
we add this metadata with our API who add our partners from the CRM
here is the manual way to add this metadata
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
that means we cannot have it directly from the webhook ? We need to create a dedicated request to retrieve it right ?
You can expand the webhook payload. What programming language are you using?
we are not using programming language at the moment for that, but we can adapt ๐ค
In any case, it's probably easier to just fetch the Customer in a separate request.
(we use a plain logic app for that, a no code way)
I think so too for that. Thanks for your feedback ๐
Happy to help.
You too.
have a nice day ๐