Home > Net >  I keep getting "StripeInvalidRequestError: Insufficient funds in Stripe account." even tho
I keep getting "StripeInvalidRequestError: Insufficient funds in Stripe account." even tho

Time:04-13

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

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.

CodePudding user response:

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).

  • Related