#FKaiB
1 messages ยท Page 1 of 1 (latest)
Do you want to cancel the subscription immediately, or do you actually want to do it at the end of the current period?
end of the current period would be nice but I'd like to know both methods.
got it - so if you want to cancel at the end of the current period then what you're doing is correct
If you want to cancel immediately then you'd use the cancelation API endpoint (https://stripe.com/docs/api/subscriptions/cancel)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
great! what is the best way to test if the cancelation has worked? Can I assume that the cancelation has worked if the cancel_at_period_end is set to true on the dashboard?
If you want to test this and be absolutely sure you've done it correctly you can look into using test clocks (https://stripe.com/docs/billing/testing/test-clocks)
Alternatively you could do a test with a subscription that has a period ending coming up soon (you can just set billing_cycle_anchor to be a few minutes in the future when you create the subscription)
otherwise, you can assume it should work as expected if you see cancel_at_period_end: true set on the subscription
got it. Thank you so much!
๐
Lastly, I'd like to clarify the subscription process. Is each subscription individually associated with a user? For instance, if I create a product with a recurring payment, will a unique subscription ID be generated and linked to each subscribing user? And is a product with a recurring payment the same thing as a subscription?
A subscription can be tied to a single Customer, and a Customer can have multiple Subscriptions
A product can be used to create multiple Subscriptions, and each would have their own ID/be tied to a single user
A product with a recurring price is NOT the same thing as a subscriptin
So if I want to create a subscription plan taht users can pay for, is creating a product with a reoccuring payment and having the users subscribe to it the correct way to do this?
Just to be really clear about the language here - you'll create a product with a recurring PRICE and then you'd create a Subscription with that price