Why I am getting 'insufficient funds' when trying Stripe Transfers even though I added TEST mode funds in my Account?
Asked Answered
T

3

6

I am Stripe for storing Funds and transfer funds to sellers using Stripe Connect

My problem is , when I tried to transfer a fund from my Stripe account to a connected account (fund is in test mode) , I am getting following error

curl https://api.stripe.com/v1/transfers   -u sk_test_gjcwEVcKNBSBPQZxk9GdgwkX:   -d amount=100   -d currency=gbp   -d destination=acct_1EMBnXEZ0uftLeW4   -d transfer_group=ORDER_95



{
      "error": {
        "code": "balance_insufficient",
        "doc_url": "https://stripe.com/docs/error-codes/balance-insufficient",
        "message": "You have insufficient funds in your Stripe account. One likely reason you have insufficient funds is that your funds are automatically being paid out; try enabling manual payouts by going to https://dashboard.stripe.com/account/payouts.",
        "type": "invalid_request_error"
      }
    }

My works ::

So tried to the solutions I found in stackoverflow . I added amount in both GBP aand USD in TEST mode

enter image description here


enter image description here

After adding TEST amount , still I am getting same error. I also tried USD

Please help me to resolve the issue .

Tl answered 15/4, 2019 at 10:13 Comment(0)
A
21

When you make a charge on your Stripe account, those funds go to your account's pending balance. They then become available some time later depending on your account's payout schedule. If you're using the default settings of daily automatic payouts, when they become available, they are immediately included in a payout to your bank account. If you want to instead accumulate an available balance over time, you need to set your account to manual payouts.

You can check your balances via the API.

The reason this is relevant is that transfers via /v1/transfers can only succeed if you have sufficient available balance for the transfer amount. There are a few ways to manage this :

  • set your account to manual payouts and only make the transfer when you have accumulated available sufficient balance.
  • link the transfer to funds from a specific charge with the source_transaction field. This way the transfer API request succeeds immediately and the funds automatically move when they're available. This would be the preferred option.
  • In test mode only, you can make a charge against the 0077 test card to add funds directly to your available balance.
Ascus answered 15/4, 2019 at 11:11 Comment(5)
After transferring from the 0077 card , my transfer succeedTl
How to differentiate between available balance and pending balance in above dashboard in screenshot ?Tl
I would use the API for this(i.e. call the API to check your balance before making the /v1/transfers call), not the dashboard. But I think if your account is set to manual payouts, there's a section/line that shows your available balance.Ascus
So if we include Charge ID in source_transaction field , then the transfer will been scheduled , even though we don't have enough available balance ? Am I correct ? @AscusTl
Yes, as described in the docs. stripe.com/docs/api/transfers/…Ascus
O
5

I ran into this problem as well, while testing things with some Stripe connected accounts. You are able to transfer funds to connected accounts before you have an available balance by providing the source_transaction in your call to create a transfer. See these docs: https://stripe.com/docs/connect/charges-transfers#transfer-availability

Occupational answered 4/2, 2021 at 6:32 Comment(0)
R
2

this code will charge your amount in Stripe immediately by using the property of source and its value is "tok_bypassPending" ,it will make the available amount be activated..

 const charge = await stripe.charges.create({
 amount: 200000,
 currency: "eur",
 source: "tok_bypassPending",
 description:
 "My First Test Charge (created for API docs at 
 https://www.stripe.com/docs/api)",
 });

for more, this is the link to stripe docs... https://stripe.com/docs/testing?numbers-or-method-or-token=tokens#refunds

Renown answered 2/7, 2022 at 0:13 Comment(1)
---source: "tok_bypassPending" --- This is very importantLumpkin

© 2022 - 2024 — McMap. All rights reserved.