Skip to content

Commit e5135ca

Browse files
authored
feat: handle remaining subscription events (#80)
1 parent 0ba73d7 commit e5135ca

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ This server synchronizes your Stripe account to a Postgres database. It can be a
4949
- [ ] `customer.source.updated`
5050
- [x] `customer.subscription.created` 🟢
5151
- [x] `customer.subscription.deleted` 🟢
52+
- [x] `customer.subscription.paused` 🟢
53+
- [x] `customer.subscription.pending_update_applied` 🟢
54+
- [x] `customer.subscription.pending_update_expired` 🟢
55+
- [x] `customer.subscription.resumed` 🟢
5256
- [x] `customer.subscription.updated` 🟢
5357
- [x] `customer.updated` 🟢
5458
- [x] `invoice.created` 🟢

src/routes/webhooks.ts

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export default async function routes(fastify: FastifyInstance) {
5050
}
5151
case 'customer.subscription.created':
5252
case 'customer.subscription.deleted': // Soft delete using `status = canceled`
53+
case 'customer.subscription.paused':
54+
case 'customer.subscription.pending_update_applied':
55+
case 'customer.subscription.pending_update_expired':
56+
case 'customer.subscription.resumed':
5357
case 'customer.subscription.updated': {
5458
const subscription = event.data.object as Stripe.Subscription
5559
await upsertSubscriptions([subscription])

0 commit comments

Comments
 (0)