diff --git a/README.md b/README.md index d5e7688..209cf41 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,10 @@ This server synchronizes your Stripe account to a Postgres database. It can be a - [ ] `customer.source.updated` - [x] `customer.subscription.created` 🟢 - [x] `customer.subscription.deleted` 🟢 +- [x] `customer.subscription.paused` 🟢 +- [x] `customer.subscription.pending_update_applied` 🟢 +- [x] `customer.subscription.pending_update_expired` 🟢 +- [x] `customer.subscription.resumed` 🟢 - [x] `customer.subscription.updated` 🟢 - [x] `customer.updated` 🟢 - [x] `invoice.created` 🟢 diff --git a/src/routes/webhooks.ts b/src/routes/webhooks.ts index 9a2ddc0..adbf6b6 100644 --- a/src/routes/webhooks.ts +++ b/src/routes/webhooks.ts @@ -50,6 +50,10 @@ export default async function routes(fastify: FastifyInstance) { } case 'customer.subscription.created': case 'customer.subscription.deleted': // Soft delete using `status = canceled` + case 'customer.subscription.paused': + case 'customer.subscription.pending_update_applied': + case 'customer.subscription.pending_update_expired': + case 'customer.subscription.resumed': case 'customer.subscription.updated': { const subscription = event.data.object as Stripe.Subscription await upsertSubscriptions([subscription])