Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I keep getting "StripeInvalidRequestError: Insufficient funds in Stripe account." even though that I do have enough funds

I’m trying to transfer funds from my Stripe account to a connected Stripe account in test mode. I have enough funds on my test mode account that are not pending. But I’m still getting a "StripeInvalidRequestError: Insufficient funds in Stripe account." error. I’m not sure what I’m doing wrong, this is the first time I’m working with Stripe, so maybe I’m missing something here.

I would greatly appreciate it if someone could help point me to the right direction, thank you!

Transfer script

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

router.get('/transfer/:account', async (req, res)=> {

    const account = req.params.account

    const transfer = await stripe.transfers.create({
        amount: 500,
        currency: 'usd',
        destination: account,
        transfer_group: 'ORDER_95'
    })

    res.redirect('/')
})

Image of my balance

enter image description here

As you can see, I have more than enough balance to be able to successfully create a transfer.

>Solution :

As you can see, I have more than enough balance to be able to successfully create a transfer.

That is in CAD dollars though, right? You don’t have any USD, so a transfer using currency:'usd' won’t work.

Overall I’d also suggest checking your balance using the API as it might make things clearer(https://stripe.com/docs/api/balance/balance_retrieve). When using the stripe.transfers.create API, you need to have sufficient available balance in the currency of the transfer attempt.

You can do the API call using currency:'cad' instead. The amount might get automatically converted on the destination account to something else if the destination account can not settle in CAD(depends on the country, see https://stripe.com/docs/payouts#supported-accounts-and-settlement-currencies).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading