Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

use "subscription.status" instead of trial_end. #231

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

bmizerany
Copy link
Contributor

The trial_end field returned by stripe is always non-zero if there was a
trial, ever. This means trial_end is not reset after any transition out
of trialing.

Also, account for canceled_at status. This means lookup phases will now
automatically add a cancel phase to the pseudo phases, effective at
canceled_at. If there is a cancel_at and the subscription is yet to be
canceled, then use that as the start of the cancel phase, but mark it as
not current.

The trial_end field returned by stripe is always non-zero if there was a
trial, ever. This means trial_end is not reset after any transition out
of trialing.

Also, account for canceled_at status. This means lookup phases will now
automatically add a cancel phase to the pseudo phases, effective at
canceled_at. If there is a cancel_at and the subscription is yet to be
canceled, then use that as the start of the cancel phase, but mark it as
not current.
@bmizerany bmizerany marked this pull request as ready for review January 31, 2023 20:24
@bmizerany bmizerany merged commit 3d81f73 into main Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant