#idhruv-webhook

1 messages · Page 1 of 1 (latest)

midnight nymph
#

Hi there, so you want to include a metadata in the event triggered by CLI?

calm blaze
#

yep

midnight nymph
#

what event are you triggering?

calm blaze
#

invoice.payment_succeeded

midnight nymph
#

stripe trigger invoice.payment_succeeded --add invoice:metadata.foo=bar

#

You can use the --add flag to add an attribute to the event object

calm blaze
#

ohh okay, can you please tell me where is this mentioned in document?

midnight nymph
calm blaze
#

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?

midnight nymph
calm blaze
#

cool

#

thx