#nerder
1 messages ยท Page 1 of 1 (latest)
Sure, you should look at schedules: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases
Great!
a small follow-up quesiton
some context:
I'm trying to support gym memberships that only goes for a fixed amount of months and then cancels automatically (ie: pay 50$ get 1 month of training, and then cancels automatically)
the other use-case I'm attempting to support is with drop-in access, let's say that a user can buy 10 drop-ins, and then I'll cancel their membership as soon as all 10 are used.
for the first use-case I should use Subscription schedules, but for the second I should simply use charges and then keep track of the membership on the client?
That doesn't sound like its fixed to a specific interval (e.g. I could drop in 3 times in 1 week, 0 the next)
There's no way to really model that with a subscription in Stripe, no. You'd need to track that manually
Ok, for the first use-case what I need to do is to use iterations: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-iterations
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So that I can for instance create a monthly membership that goes for only 1 month and then cancels
Yes, so you'd have a single phase I'd imagine with 1x iteration which then has a cancel behaviour at the end
perfect, this is clear ๐
For the second use-case instead I'll use charges and keep track of the consumables myself
Easy to test with clocks: https://stripe.com/docs/billing/testing/test-clocks
handling the charge with Stripe, but then keeping track of the drop-in used manually
Thank you so much, this clarifies a lot
have a good day
np!