#beastboy_best-practices
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- beastboy_testmode-subscription-retention, 1 day ago, 40 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1235248450304606238
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
How do your users typically cancel their subscriptions? Is this through the Customer Portal or your own custom page?
own custom page
I think the best way to do this would be to create a subscription schedule on the subscription https://docs.stripe.com/billing/subscriptions/subscription-schedules
You can set the schedule to last for two cycles and then cancel
https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-iterations
https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-end_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Without a schedule you can set cancel_at_period_end but that wouldn't charge for the next month, so that doesn't work for your usecase
Is there any way to do this without subscription schedules?
Unfortunately not with anything pre-built by Stripe. A schedule would be the only way to tell us to charge them one more time and then cancel.
rip
okay
why did you link iterations? is there anything in particular about it that would help me?
I'm not sure how I see setting that would be beneficial for me
Iterations tell the schedule how many cycles the phase should go for
actually just thought of an easy way to do this. If they schedule a cancellation < 2 days, then I'll just attach metadata 'cancel_after_paid' to the subscription. Then on invoice.paid, if I see this metadata exist, i just cancel the subscription
any flaws in this? ^ lol
Ah, yep that would be a much simpler way to do it. Nice workaround
You as well!