#manuel_api
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/1422610508657201236
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- manuel_api, 1 minute ago, 45 messages
- manuel_api, 3 days ago, 11 messages
- manuel_api, 4 days ago, 14 messages
- manuel_api, 6 days ago, 11 messages
- manuel_api, 6 days ago, 36 messages
How can I prevent that item from being saved? Or could you tell me what solution to implement for these cases, since the masterminds of my project do the upgrade before the checkout.session is completed?
asking again because the thread was closed....
๐ Taking over this thread, catching up now
If the customer fails to make a payment on an invoice, what is your business requirement? What should the status of subscription be? Voiding an invoice simply means that this payment is no longer required, and thus the subscription will be changed to active.
If the payment fails, the subscription should remain active, with the same items as before the payment was made. The failed payment should not be retried, the invoice should be canceled, and the user should be able to continue making payments.
If the invoice is voided / canceled, they can't continue making the payments
Subscription with past_due status still keeps the subscription active. The customer can continue making payments, and future invoices will still be generated
If you wish to keep the capability of the customer being able to make a payment on a specific cycle, the invoice can't be voided
ok I understand, but then how do I make the subscription keep what it had before I made the change?
Let's say a customer have one item and want to buy another one, but the payment fails and now the customer have two items. How can I make it keep what it had before I made the payment?
There are two possible ways:
- Revert back to the original / old state manually yourself
- Use "Pending Update" feature by Stripe: https://docs.stripe.com/billing/subscriptions/pending-updates. This will allow the subscription only be updated to the new state (new quantity in this case) after the successful payment
and how can i revert back to the original subscription?
because the way they subscribed to my project does not allow me to choose the second option. It says: When payment_behavior is set to pending_if_incomplete, you can only pass supported params. items[0][deleted] is not supported.
and how can i revert back to the original subscription?
Your system should keep track of the original state, then update to subscription to it if you decide to revert back. Use your scenario as an example, your system should store the previous state of quantity 1. If the payment fails, revert the quantity from 2 to 1 with proration behavior to none, then void / cancel the prorated invoice that is meant for quantity 2.
Yeah i keep the state from an old version of the subscription before the update
Are you facing any issue with reverting back to the original state?