#jatin_best-practices

1 messages · Page 1 of 1 (latest)

severe compassBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253284420513960011

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

zenith mortar
azure fable
#

I think, I should rephrase my case. Let me re-iterate.

We are a developer tool platform using Stripe for our billing needs. Our primary model is a pay-as-you-go pricing structure. Clients use our services throughout the month, and we generate an invoice at the end of the month, which they pay before the due date. We send our service usage data to Stripe, which then generates the invoice—this part is working well.

However, we have a few enterprise accounts with a different arrangement. These clients have a deal where they add a certain amount of funds (e.g., $100/month) to their Video SDK account, which is added as credit. When their monthly usage-based invoice is generated, this credit is applied against their balance.

Currently, this process is manual. We are looking for a way to automate it. Specifically, we want to:

  1. Charge these enterprise clients on a monthly/quarterly basis from their saved card.
  2. Add the charged amount as credit to their account.
  3. Automatically adjust this credit when generating the monthly usage-based invoice.

Can we use Stripe's "Subscription" feature to achieve this? If not, what would you recommend as the best approach to automate this process?

azure fable
zenith mortar
#

sure, you can automate it by writing code to call the APIs I mentioned avove.

azure fable
zenith mortar
#

yes

#

not sure how else you envision this working, how would Stripe know that a user has "added funds to their Video SDK account" unless you call our API to e.g add a credit balance to the relevant cus_xxx object for the amount of those funds ?

#

even if you're charging a saved card card in a payment on Stripe, those funds just go to your merchant balance for payout; if you want to treat that as a credit balance it requires manually setting those customer balances/negative invoice items, we don't have that functionality built in(a native "wallet" feature for example)

azure fable
#

I'll check with our finance, if they're okay with receiving this "Balance" as a payout.

That's internal, but thanks for pointing it. That can be addressed.

#

A question I have is...

When I implement your suggested workflow, will I be able to charge the client's card automatically? (After that, I've to make an API call to add the balance in stripe, that is clear)

zenith mortar
#

it depends what you mean by "automatically".

#

like, a recurring Subscription charges a card on a recurring basis automatically

azure fable
#

I mean, auto-debit or auto-charge from client's saved card

zenith mortar
#

when would the auto-debit happen? triggered based on what?

azure fable
#

See... what I need is...

  1. Charge a client with fixed amount (that can be auto-debited from client's saved card)
  2. Add that exact amount in client's balance (in stripe)
#

Is this possible, via "Payment links", via "Subscription", or via combination of any other APIs?

zenith mortar
#

when would the auto-debit happen? triggered based on what?

azure fable
#

Cool. This addresses my question. We have to make use of these two features as a combo.

And, charge a client on monthly basis.

zenith mortar
#

And, charge a client on monthly basis.
you mentioned you already have a Subscription, so you are already doing this it seems?