#dai_trial-end-behavior
1 messages ¡ Page 1 of 1 (latest)
đ 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/1305981228104552498
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, we document this behavior here: https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment. If the previous payment method was not attached to the customer, you won't be able to use that for recurring payments. If you set it to 'cancel' it would cancel the subscription.
how do we change that behavior
to say if the payment method isn't attached to the subscription directly, even if there were previous payment methods to cancel?
That is the expected behavior to cancel the subscription if there is not payment method attached there.
We have customers being charged
it's causing an incident, here's an example customer
https://dashboard.stripe.com/subscriptions/sub_1QFJ6DD0tZaJVqhDdMnBN5jQ
we're giving them a 14 day trialing subscription
and at the end, the subscription transitions to active instead of cancels
Ah, the reason being, that customer has a payment method attached to them: https://dashboard.stripe.com/customers/cus_LvQIhaZaeNGFz6 and there is a default payment payment for invoices. So since the customer has a payment method attached to them, they are being charged for the next cycle.
If you intend to cancel subscription after the trial, you would need to listen to the following event: https://docs.stripe.com/api/events/types#event_types-customer.subscription.trial_will_end and then cancel the subscription: https://docs.stripe.com/api/subscriptions/cancel
but that occurs X days before the trials ends effectively ending it early
for customers that have yet ot be charged there's 2 solutions i see:
- cancel the subscription earlier before being transitioned
- remove all existing payment methods so that it will cancel in time
Yes, you could listen to that event and then make the cancel request at the end of the trial period.
Not to cancel the subscription when you receive the event
Alternatively, you can set the cancel date, https://docs.stripe.com/api/subscriptions/update#update_subscription-cancel_at on the subscription update request.