#binaryruel
1 messages · Page 1 of 1 (latest)
Yes, just to make my condition pass.
You did that like we show here: https://stripe.com/docs/connect/top-ups#add-funds ?
But I'm getting zero atm
How did you create the top up exactly?
Exactly like the tutorial you gave me
Okay and when you retrieve your balance what do you see?
Do you see the top up amount as pending?
Or not in your balance at all?
pending amount hasn't been changed
Can you provide me the ID for the top up?
source? src_1N2kNbLiv2zKrHZHsDCuVOJI
this is my code in live
if ($balance->available[0]->amount > 0) { to check if there is available balance before I refund
Ah okay yeah so you are topping up your refunds/disputes balance. Not your Connect Balance. This is what happens when you use that method in your Dashboard.
So yeah that won't work for what you are trying to do
The easier way to handle this is to just use one of our test cards that creates available balance: https://stripe.com/docs/testing#available-balance
You just create a Charge with one of those cards
So am I doing it right? I can deploy this code to production?
What do I need to do to prepare the live account?
Let's back up
Are you just trying to do some testing where you want available balance?
Or you are going to use top ups in your integration to fund your available balance and need to test that specifically?
Yes, exactly.
Then yeah just use one of the test cards above. Don't use top ups the way you are doing now.
I'm trying to do refund to payment intents, but there's an error that pops-up that says insufficient balance. However, the refund (partial and full) are still being recorded.
That's why I need to check if there's a balance first in the available object.
Is this the right direction?
I don't understand. How am I gonna use the test cards if I'm only making sure that the refund works?
👋 catching up since my teammate needs to run. Can you share the full error you're receiving when you try to create a refund?
it says error 16
If you have a request ID, that would be helpful: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Insufficient balance
Any chance you can grab the request ID? It should start with req_
That was awhile ago, that's why I need to check the available amount first, before I do the refund?
So my ultimate question is, is this the right path?
- Check if there are some
availablebalance amount. - Do the refund
Yes, that's the right path. You can also only refund up to the total charge amount (not more)
So, for example, if you have a $10 charge, you can refund up to $10 only
Okay thanks. What will I say to my client and what will they do in case there's no amount in their available object?
so that the actual refund will commence?
Your platform's Connect reserve funds will be used in cases where a Connected account's balance is negative: https://stripe.com/docs/connect/account-balances#understanding-connected-reserve-balances
Not sure I follow. Can you reword your question?
not active yet
will that work fine?
Also, right now in their live dashboard, here's the amounts.
Which there is the available balance amount?
Will my condition work on that?
Okay, it's really hard to follow your questions
The first screenshot means the Stripe account you're logged in as is not yet a Connect platform
Okay, so do I need to activate that and my code will work seemlessly?
What if I check the amount of the pending object? Will it technically work?
I'm still unclear on my code will work seemlessly. I'm still not sure what exactly you're trying to do. If you plan on using Connect then yes, click on "Get started with Connect". Then, you can start creating test Connected accounts to play around with any code you have. This resource should be helpful for your testing: https://stripe.com/docs/connect/testing