2
0

👷 Add convenient script for migrating Stripe prices

This commit is contained in:
Baptiste Arnaud
2023-10-20 18:26:42 +02:00
parent be9daee63e
commit 11186d8d29
4 changed files with 150 additions and 3 deletions

View File

@@ -17,7 +17,11 @@ const createChatsPrices = async () => {
await stripe.prices.create({
currency: 'usd',
billing_scheme: 'tiered',
recurring: { interval: 'month', usage_type: 'metered' },
recurring: {
interval: 'month',
usage_type: 'metered',
aggregate_usage: 'last_during_period',
},
tiers: starterChatTiers,
tiers_mode: 'volume',
tax_behavior: 'exclusive',
@@ -33,7 +37,11 @@ const createChatsPrices = async () => {
await stripe.prices.create({
currency: 'usd',
billing_scheme: 'tiered',
recurring: { interval: 'month', usage_type: 'metered' },
recurring: {
interval: 'month',
usage_type: 'metered',
aggregate_usage: 'last_during_period',
},
tiers: proChatTiers,
tiers_mode: 'volume',
tax_behavior: 'exclusive',