Skip to content

Commit e2029d1

Browse files
authored
update: add support to flexible billing mode (#250)
1 parent a19eff6 commit e2029d1

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- Add billing_mode column to subscriptions and subscription_schedules tables
2+
-- This field stores the billing mode configuration for flexible billing support
3+
-- See: https://docs.stripe.com/billing/subscriptions/billing-mode
4+
5+
ALTER TABLE "stripe"."subscriptions"
6+
ADD COLUMN IF NOT EXISTS "billing_mode" jsonb;
7+
8+
ALTER TABLE "stripe"."subscription_schedules"
9+
ADD COLUMN IF NOT EXISTS "billing_mode" jsonb;

packages/sync-engine/src/schemas/subscription.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ export const subscriptionSchema: EntitySchema = {
3737
'customer',
3838
'latest_invoice',
3939
'plan',
40+
'billing_mode',
4041
],
4142
} as const

packages/sync-engine/src/schemas/subscription_schedules.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ export const subscriptionScheduleSchema: EntitySchema = {
2020
'status',
2121
'subscription',
2222
'test_clock',
23+
'billing_mode',
2324
],
2425
} as const

0 commit comments

Comments
 (0)