Skip to content

Commit 358fad1

Browse files
authored
feat: support additional invoice events (#136)
- Adds support for three new events - Removes support for invoices.upcoming given that never worked (see #114)
1 parent eef33c3 commit 358fad1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,11 @@ This server synchronizes your Stripe account to a Postgres database. It can be a
7070
- [x] `invoice.payment_failed` 🟢
7171
- [x] `invoice.payment_succeeded` 🟢
7272
- [x] `invoice.sent` 🟢
73-
- [x] `invoice.upcoming` 🟢
73+
- [x] `invoice.upcoming` 🔴 - Event has no id and cannot be processed
7474
- [x] `invoice.updated` 🟢
75+
- [x] `invoice.overdue` 🟢
76+
- [x] `invoice.overpaid` 🟢
77+
- [x] `invoice.will_be_due` 🟢
7578
- [x] `invoice.voided` 🟢
7679
- [ ] `issuing_authorization.request`
7780
- [ ] `issuing_card.created`

src/routes/webhooks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export default async function routes(fastify: FastifyInstance) {
8282
case 'invoice.payment_action_required':
8383
case 'invoice.payment_failed':
8484
case 'invoice.payment_succeeded':
85-
case 'invoice.upcoming':
85+
case 'invoice.overdue':
86+
case 'invoice.overpaid':
87+
case 'invoice.will_be_due':
8688
case 'invoice.sent':
8789
case 'invoice.voided':
8890
case 'invoice.marked_uncollectible':

0 commit comments

Comments
 (0)