Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel subscription at period end #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AntoineLemaire
Copy link
Contributor

@AntoineLemaire AntoineLemaire commented Sep 4, 2020

Since version 2018-08-23 of Stripe API, the option at_period_end is no longer valid on CancelSubscriptionRequest and we need to use cancel_at_period_end in the UpdateSubscriptionRequest.

I also made the customerReferences optionnal in the subscriptions endpoints as subscription reference is enough

POST /v1/subscriptions/:id https://stripe.com/docs/api/subscriptions/update
DELETE /v1/subscriptions/:id https://stripe.com/docs/api/subscriptions/cancel

PS: I think this PR introduce a BC break as if you use API Version older than 2018-08-23, you won't be able to cancel subscription.

@AntoineLemaire AntoineLemaire force-pushed the cancel_at_period_end branch 2 times, most recently from 492fdb8 to f052f84 Compare September 4, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant