#andrei.sabau
1 messages · Page 1 of 1 (latest)
I actually found a way to do this by updating the subscription with a product that is Free - this will create a proration that will be credited to the customer balance and afterwards I cancel the subscription because I don't want any invoices to be created. Is this the correct flow?
how can I credit the remaining money to his "Invoice credit balance" (not bank account/payment method) so it can be used in the future?
By default, the remaining funds will be credited to customer's balance after canceling the subscription: https://stripe.com/docs/billing/customer/balance
Customer balance can be used for future invoices
I was testing this on the Test Dashboard and I don't see any funds being credited to the customer balance.
Can you share the subscription ID (sub_xxx) that is canceled?
I tried this with Test Clocks & everything setup the correct way. Not sure what I'm missing.
Give me 2 seconds to create an example.
So I just created sub_1O21GdBDHQTgXfBt4M4kAyHU from my SaaS test env, advanced the time with 2 months from the Dashboard and then canceled the subscription from the Dashboard.
The total for the yearly subscription was 385 euro, I was expecting somewhere around 320 euro to be credited to customer balance.
Thanks for sharing! Checking it now
The subscription was
- created at 2025-01-18 00:37:12 UTC (test clock)
- canceled at 2025-03-18 00:37:12 (test clock)
The subscription was canceled exactly two months later that customer uses full susbscription that there is no proration will be created
Proration will only be created if customer has unused period
but it had products with a Yearly price
Sorry, my bad
I missed the yearly price
Let me double check
In https://dashboard.stripe.com/test/logs/req_Th2oNOYKkPTyqg, prorate field of cancelation is set to false
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This means that no proration will be created, i.e. the remaining usage won't be refunded
can I set that to true from the dashboard UI?
meaning this dialog
or only by calling the API directly?
Ok so I tested this through the API on a new subscription: sub_1O21WZBDHQTgXfBt2h2wBYbx
nevermind
thanks @clever viper, I figured it out
I was mainly testing canceling subscriptions from the dashboard UI and it seems the parameters I was looking for are not available there
the prorate field you suggested along with the invoice_now, generates the result I was looking for
Thanks for waiting! Discord is busy now. Great to hear that it works 🙌