Skip to content

Commit

Permalink
feat: support additional invoice events (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcodez authored Mar 21, 2024
1 parent ee12463 commit 35edbfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ This server synchronizes your Stripe account to a Postgres database. It can be a
- [x] `invoice.deleted` 🟢
- [x] `invoice.finalized` 🟢
- [x] `invoice.finalization_failed` 🟢
- [x] `invoice.marked_uncollectible` 🟢
- [x] `invoice.paid` 🟢
- [x] `invoice.payment_action_required` 🟢
- [x] `invoice.payment_failed` 🟢
- [x] `invoice.payment_succeeded` 🟢
- [x] `invoice.sent` 🟢
- [x] `invoice.upcoming` 🟢
- [x] `invoice.updated` 🟢
- [x] `invoice.voided` 🟢
- [ ] `issuing_authorization.request`
- [ ] `issuing_card.created`
- [ ] `issuing_cardholder.created`
Expand Down
3 changes: 3 additions & 0 deletions src/routes/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export default async function routes(fastify: FastifyInstance) {
case 'invoice.payment_failed':
case 'invoice.payment_succeeded':
case 'invoice.upcoming':
case 'invoice.sent':
case 'invoice.voided':
case 'invoice.marked_uncollectible':
case 'invoice.updated': {
const invoice = event.data.object as Stripe.Invoice
await upsertInvoices([invoice])
Expand Down

0 comments on commit 35edbfd

Please sign in to comment.