Stripe · api · fg-0155

subscription.current_period_end is undefined after upgrading to Stripe API 2025-03-31.basil

subscription.current_period_end and current_period_start come back undefined with a 200 response

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

Basil moved the billing period from the Subscription onto each SubscriptionItem so one subscription can mix monthly and yearly prices. The old top level fields are simply absent, so nothing throws.

Fix

Read current_period_start and current_period_end from subscription.items.data. If you need one renewal date, take the latest item end.

Apply

const periodEnd = Math.max(...subscription.items.data.map((item) => item.current_period_end));

Affects: Stripe API 2025-03-31.basil and later; stripe-node 18+, stripe-python 12+, stripe-php 17+, stripe-go 82+, stripe-java 29+, stripe-dotnet 48+

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp