#maksym_restrict-customer-credit
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/1440045094203031792
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Unfortunately I don't think that is how the customer credit balance works. You don't have control of what invoice it is applied to or how much is applied (up to the Invoice total). I think the only way you could model that behavior is to not increase the credit balance beyond $100 per month.
How are customers getting credit?
maksym_restrict-customer-credit
We are creating a customer balance transaction to adjust the customer's credit balance.
Okay and so I think, in order to avoid customers having more than $100 applied to invoices within a month, you would need to keep track of this in your system and only grant them $100 per month in credits.
Currently the entire credit amount is stored in the customer's credit balance in Stripe, but I think we'll need to store everything beyond $100 in the database like you suggested. Also, there is a special case with the first subscription bonus: I think we'll need to remove the applied credits from the balance if the client hasn't paid for the subscription and it became "incomplete expired".
That makes sense to me.
Ok, I wanted to make sure that Stripe does not provide an easier way to implement this
Nope, that is not how Customer Credit balances work, at the moment.
It is a bit frustrating tha the API does not provide the amount of credit applied to the invoice, even though it is present in the Dashboard