#cruchot_best-practices
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/1357655160545087639
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
How are you tracking a user's 'available balance' within Stripe?
Hi
A "user's balance" is its connected account available balance
In my db, each user has a "stripe_account_id" and "stripe_customer_id", which references a connected account and a customer
You can't debit that for payments
Why ? Is there another way ?
Hmm, customer's can accumulate a 'credit balance': https://docs.stripe.com/invoicing/customer/balance
Yes but it is stated somewhere in the docs that this feature is not dedicated to be used as a "wallet"
I think its there only to receive refunds
Yeah there's no real native wallet functionality at all
No, that's the customer cash balance
I'm also using Stripe Connect because standard users can become dealers (sellers) on the marketplace. This means they receive payments from users who buy their products (not directly, since the platform account holds the funds until the customer confirms he received his order).
This is why each user has connected account created as soon as he signs up, and this is why I want to use its balance as a "wallet"
Yep, I understand all that. But you just can't use the account balance as a wallet. They're paid out automatically in most scenarios, pretty frequently
No I disabled this, payouts are manual on every connected accounts I create
Yeah but you still can't use accounts to accumulate balances. We note this here
90 days max for most countries, before the payout the funds automatically
Ok so if I summarize :
- I should not use connected accounts to hold users' balance (wallet)
- I should use connected accounts to transfer sellers' payments, but these funds won't stay more then 90 days on their balance
- I should use customer credit balance to handle the users' balance (wallet)
Is that correct?
Seems fair yes
Customer credit balance can't get payout right? I can't handle every situation with that?
No, it's a 'digital' balance that doesn't actually map directly to any funds
Can a user (customer) top-up his credit balance?
I used to enable this by making a payment to the platform account, then immediately transfer the funds to the users connected account
You can accept an ad-hoc payment and then increment their balace to reflect that payment yes
If I implement this, it means that when a user top-up his wallet's balance (from his perspective, on my app), he is actually adding a negative amount (a credit) on his customer credit balance, correct?
And when he wants to use this balance to make a purchase, I will only have to debit this balance of the corresponding amount. Can you confirm?
Can you also confirm that this is the customer credit balance, and that retrieving the customer and checking this param is the correct way to get his balance?
Correct, yes
Yes
Asking this because it seems that there is no direct Retrieve a customer credit balance method in the API
You're right, there is not. Those are for cash balances which relates to bank transfer payments
I'm sorry but, is "Customer invoice balance" (https://docs.stripe.com/billing/customer/balance) a whole different thing or is it the same as the credit balance?
That's the same thing. Credit/invoice balance
I'm a bit lost, because I don't really understand the cash balance I think
Cash balance is the different concept
It's for bank transfer payments. This page explains the differences: https://docs.stripe.com/payments/customer-balance
Ok I understand now, thank you very much for your time