#zlf_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/1362350039740973090
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
We are using the subscription update feature to implement our business requirements, but we've encountered an issue. What we know currently is that when we modify items in a subscription, an invoice is generated. However, the subscription items are already updated at that point. If the user does not pay the invoice, does Stripe support rolling back this update?
You can do this with pending updates: https://docs.stripe.com/billing/subscriptions/pending-updates
I just tried it, and after using this method, the payment was automatically deducted. Is there a way to generate an invoice after modification and let the user pay manually?
Could you please share the Subscription ID? sub_xxx
Another question: Currently, we use the preview invoice to show users the updated price after modifying items. However, I couldn’t find how to remove an item from the subscription in the preview invoice. For example, if a subscription includes price1 and price2, but now we need to delete price1, how should I handle this when creating the preview invoice?
sub_1R4HxYHiYvn8ZIkevP6ukN5W
This is the subscription ID for the test environment.
Sorry for delay.
You need to provide an items array with the item with corresponding ID, and property deleted=true: https://docs.stripe.com/api/subscriptions/update#update_subscription-items-deleted
To clarify, you want to present the Invoice to the customer before updating the Subscription?
Thank you very much! It worked when I tried it on my end.
We want to achieve the following workflow:
Before modifying the subscription, preview the updated amount (using the invoice preview functionality).
Attempt to modify the subscription after confirming the amount.
Have the user make the payment.
Only after successful payment, complete the subscription modification.
I've noticed that when using Pending Updates, the payment is processed automatically. Is there a way to require manual payment from users instead? Similar to subscription creation - generate an invoice first, then have the user pay that specific invoice.
no that's not possible, a pending update will immediately try to charge the customer.
Is there any other way to modify the subscription and have the user manually pay for it? If not paid, this modification will be rolled back.
no, that behavior only works with pending updates
What if the payment fails? Can they retry the payment for this change?
thiis is explained here: https://docs.stripe.com/billing/subscriptions/pending-updates#handling-failed-payments