Closed andrecasal closed 1 month ago
I didn't see a docs repo, so I'm guessing this is the right place for this. Please correct me if I'm wrong.
docs
The subscription_pause key doesn't seem to be part of the feature object.
subscription_pause
feature
The TS typings also don't exist for it.
Notice the error with this code:
import { type PlanId } from '../plans' const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { apiVersion: '2024-06-20', typescript: true, }) type BillingPortalProducts = { product: PlanId prices: string[] } export async function configureStripeCustomerPortal( products: BillingPortalProducts[], ) { if (!products) throw new Error( 'Missing required parameters to configure Stripe Customer Portal.', ) return stripe.billingPortal.configurations.create({ business_profile: { headline: 'Organization Name - Customer Portal', }, features: { customer_update: { enabled: true, allowed_updates: ['address', 'shipping', 'tax_id', 'email'], }, invoice_history: { enabled: true }, payment_method_update: { enabled: true }, subscription_cancel: { enabled: true }, subscription_pause: { // 👈 Error here enabled: false }, subscription_update: { enabled: true, default_allowed_updates: ['price'], proration_behavior: 'always_invoice', products: products.filter(({ product }) => product !== 'free'), }, }, }) }
No TS error.
No response
macOS
v20.11.0
stripe-node 16.12.0
2024-06-20
@andrecasal Thanks for the report! I'll flag internally to get this fixed! I'll close this issue as this isn't really a bug with our SDK itself but I'll make sure this gets resolved!
Alright, thanks!
Describe the bug
I didn't see a
docs
repo, so I'm guessing this is the right place for this. Please correct me if I'm wrong.The
subscription_pause
key doesn't seem to be part of thefeature
object.The TS typings also don't exist for it.
To Reproduce
Notice the error with this code:
Expected behavior
No TS error.
Code snippets
No response
OS
macOS
Node version
v20.11.0
Library version
stripe-node 16.12.0
API version
2024-06-20
Additional context
No response