#idhruv-webhook
1 messages · Page 1 of 1 (latest)
yep
what event are you triggering?
invoice.payment_succeeded
stripe trigger invoice.payment_succeeded --add invoice:metadata.foo=bar
You can use the --add flag to add an attribute to the event object
ohh okay, can you please tell me where is this mentioned in document?
okay, it is in stripe cli docs
one more question:
const webhookEndpoint = await stripe.webhookEndpoints.create({ url: "https://myurl.com/api/", enabled_events: [ 'invoice.payment_succeeded', ], metadata: {'bookingId': bookingArr[i]?.bookingId} });
if i use metadata like this for live url, this will also work right?
If you are adding a metadata (https://stripe.com/docs/api/webhook_endpoints/create?lang=python#create_webhook_endpoint-metadata) to a webhook endpoint, then yes this is the way.