#umaritis_code
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/1407263643757969471
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yes the parameter is trial_settings.end_behavior.missing_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
well what if the user's entered payment details are valid but his card des not have the sufficient balance on the day of charge then the subscription will automatically chancel?
The payment will requires a new payment method, Subscription will be past_due iirc. You can test this with Billing Test Clock
well what if we do not define any trail end scenario then what will be the default behavior if the payment failed no matter due to the missing information or due to the insufficient funds. do stripe handle trial end activities on there own??? and if yes can you then can you let me know what will be the defualt behaviour?
The default behavior is that we won't cancel the Subscription, and it will stay as "past_due". If you specify trial_settings.end_behavior.missing_payment_method = cancel, we will cancel the Subscription
(You can verify this too, using Billing Test Clock)
okay so its mean if the payment is failed then stripe will marked it as a "past_due" and after how much time stripe will cancel the subscription if i defined trial_settings.end_behavior.missing_payment_method = cancel ?
If you define, it will go straight to cancel, not "past_due"
so it will be like this ?
trial_settings: {
end_behavior: {
missing_payment_method: "cancel"
}
}
Yes
so if i define the end behaviour like this :
trial_settings: {
end_behavior: {
missing_payment_method: "cancel"
}
}
the subscription will be cancel no matter its because of the insufficient funds or because of the invalid payment details am i right?
hi! I'm taking over this thread.
no, that setting will only cancel the subscription if there are no payment method set.
if there is one, but the payment fails (because of insuffisent fuds for example), the subscription won't cancel automatically.
well what if we do not define any trail end scenario then what will be the default behavior if the payment failed no matter due to the missing information or due to the insufficient funds. do stripe handle trial end activities on there own??? and if yes can you then can you let me know what will be the default behavior?
however note that:
- we have some dashboard settings that can help with this: https://dashboard.stripe.com/settings/billing/automatic
- if you want to cancel the subscription when a payment fail, you can
I recommend checking the dashboard link I shared above, where you have lots of options to manage failed payment (retry, or cancel the subscription, etc)
and if you want more control, you can write code to control this behavior.
okay sounds cool thank you
can you just confirm me this is the right way to define ?
trial_settings: {
end_behavior: {
missing_payment_method: "cancel"
}
}
and its correct syntaxtically ?
that looks correct yes. but the best way to be sure is to try your code in test mode.