#maksym_restrict-customer-credit

1 messages ยท Page 1 of 1 (latest)

fallen iceBOT
#

๐Ÿ‘‹ 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.

magic solstice
#

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?

fallen iceBOT
#

maksym_restrict-customer-credit

rain vault
#

We are creating a customer balance transaction to adjust the customer's credit balance.

magic solstice
#

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.

rain vault
#

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".

magic solstice
#

That makes sense to me.

rain vault
#

Ok, I wanted to make sure that Stripe does not provide an easier way to implement this

magic solstice
#

Nope, that is not how Customer Credit balances work, at the moment.

rain vault
#

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

fallen iceBOT