#olli-customer-balance

1 messages · Page 1 of 1 (latest)

fervent cipher
#

Hi! Are you using Stripe Billing?

glad nest
#

yep

fervent cipher
#

Then yes, you can use customer balance in this way.

glad nest
#

we might end up making a custom subscription system (we're a platform), would that effect it?

fervent cipher
#

You can only use Customer Balance with Invoices so if you aren't using Stripe Invoices then you won't be able to apply the balance to future payments.

glad nest
#

would we be able to create invoices and immediately collect them in our custom solution?

fervent cipher
#

Yes you can manage all of this yourself if you like. Just a lot more work if you aren't using Stripe Billing imo.

#

But yeah, this is possible to just create invoices within Stripe that match your custom solution.

glad nest
#

gimme a sec

#

i'm assuming applying a topup would be done like this:

await stripe.customers.update('cus_***********', {
   balance: customer.balance - topup_amount
});
``` and debiting would be done like this:
```js
await stripe.customers.update('cus_***********', {
   balance: customer.balance + topup_reversal_amount
});
#

and if the reversal amount is higher than their current balance, it puts them into the negatives and that'll be collected on top of the next invoice

fervent cipher
#

Yes that looks right to me.

#

I'd definitely test it out

glad nest
#

im assuming stripe tax will still autoapply tax amounts to transactions that use a balance as payment?