Skip to content

(v48.0.0 breaking changes) - Help me understand the move from Subscription.CurrentPeriodEnd to SubscriptionItem.CurrentPeriodEnd #3089

Description

@sion-corn

Describe the bug

According to the v48.0.0 release notes:

Remove support for CurrentPeriodEnd and CurrentPeriodStart on Subscription

Before the breaking changes introduced in v48.0.0, in my stripe repository, I have been extracting the subscription's CurrentPeriodEnd value like this (currentSubscription is a Subscription object):

user.StripeUtcSubscriptionPeriodEnd = currentSubscription.CurrentPeriodEnd;

should I be doing it like this instead (the Items property is a List<SubscriptionItem>):

user.StripeUtcSubscriptionPeriodEnd = currentSubscription.Items.Data.Max(x => x.CurrentPeriodEnd);

If this is not the correct approach, then please help me understand why CurrentPeriodEnd property was removed from the Subscription object, and how we should be thinking about the CurrentPeriodEnd property as it now relates to the SubscriptionItem object. I tried searching the Stripe docs but could not find anything related to this.

To Reproduce

N/A

Expected behavior

N/A

Code snippets

OS

win11

.NET version

.NET9

Library version

stripe-dotnet v48.0.0

API version

2025-03-31.basil

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions