-
-
Notifications
You must be signed in to change notification settings - Fork 957
Description
How to add a new trigger
- Add an event specification for each: https://github.com/triggerdotdev/trigger.dev/blob/main/integrations/stripe/src/events.ts
- Add a function for each, referencing the event:
trigger.dev/integrations/stripe/src/index.ts
Line 848 in 131d0db
onPayout(params?: TriggerParams & { events?: PayoutEventNames }) { - Test the trigger works by adding it to the job-catalog, running it and triggering a webhook using Stripe's CLI:
client.defineJob({
List of events to add:
invoice.created
data.object is an invoice
Occurs whenever a new invoice is created. To learn how webhooks can be used with this event, and how they can affect it, see Using Webhooks with Subscriptions.
invoice.deleted
data.object is an invoice
Occurs whenever a draft invoice is deleted.
invoice.finalization_failed
data.object is an invoice
Occurs whenever a draft invoice cannot be finalized. See the invoice’s last finalization error for details.
invoice.finalized
data.object is an invoice
Occurs whenever a draft invoice is finalized and updated to be an open invoice.
invoice.marked_uncollectible
data.object is an invoice
Occurs whenever an invoice is marked uncollectible.
invoice.paid
data.object is an invoice
Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
invoice.payment_action_required
data.object is an invoice
Occurs whenever an invoice payment attempt requires further user action to complete.
invoice.payment_failed
data.object is an invoice
Occurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method.
invoice.payment_succeeded
data.object is an invoice
Occurs whenever an invoice payment attempt succeeds.
invoice.sent
data.object is an invoice
Occurs whenever an invoice email is sent out.
invoice.upcoming
data.object is an invoice
Occurs X number of days before a subscription is scheduled to create an invoice that is automatically charged—where X is determined by your subscriptions settings. Note: The received Invoice object will not have an invoice ID.
invoice.updated
data.object is an invoice
Occurs whenever an invoice changes (e.g., the invoice amount).
invoice.voided
data.object is an invoice
Occurs whenever an invoice is voided.
invoiceitem.created
data.object is an invoiceitem
Occurs whenever an invoice item is created.
invoiceitem.deleted
data.object is an invoiceitem
Occurs whenever an invoice item is deleted.