#_nerder
1 messages · Page 1 of 1 (latest)
Hello! What's your use case?
👋
basically i'm creating a checkout session from our mobile app
ok let me explain real quick
Our app is managing gyms, we are using Stripe Connect (Standard) for our integration.
We handle subscription creations for our customers and purchases of other one-off products
While we support cards and SEPA DD "natively", we also give our customer the option to choose checkout
this is mainly when they want to give their customer the option to purchase their membership with the preferred payment method, instead of "force" cards for instance
now the problem is that we support 2 types of billing:
- automatic
- manual
Automatic billing is the default setting the billing cycle to "forever"
instaed Manual, is to set cancel_at_period_end: true
now the problem is that we have a bug in which if the customer (of our customer) is paying using checkout for a membership with "manual" renewal, this has not being respected
and the checkout API doesn't seems to support cancel_at_period_end
therefore i'm stuck
I might be missing something, but it sounds to me like the manual option would just be a one-time payment not involving a Subscription, right? Could you use Checkout in payment mode instead of subscription mode for that scenario?
nope, because that membership will stays active for that amount of time
imagine that you purchasing a gym membership that will lasts 1 month and then cancel automatically
Ah, I see, you're keeping track of the duration based on the Stripe Subscription rather than tracking it on your end.
yes, which is quite convenient
In any case, you're correct that you can't do this automatically. What you can do is listen for checkout.session.completed Events with a Webhook Endpoint and set cancel_at_period_end on the manual Subscriptions Checkout creates.
ok I see
but there is any reason why this is not inside subscription_data?
I was expecting to find it there
Probably because it's never come up before. Using Checkout to create a Subscription that cancels after the first period boils down to a one-time payment.
This is the first I've heard of someone wanting to do something like this.
I can flag it internally as a feature request though.
But the same will be true for creating a subscription from the normal subscription.create endpoint, but probably following your logic that is there just because can be useful in subscription.update and I just got lucky that it was there already
I found super convenient to leverage currentPeriodStart & currentPeriodEnd from you instead of implementing on my side when 99% of the time this 2 things will coincide anyway
I think it's more because we generally provide more granular control via the API, and there are likely more use cases when using the API as a result, but with Checkout it would just be a one-time payment instead of a Subscription.
but anyway yes, thank you so much for taking care of it
makes total sense, if you would like to flag it internally it might be discussed
i'll take care of it as you proposed me for now
Yep, will do!
I have another question unrelated, is better to open a new thread?
You can ask here!