Yoël Zerbib
Yoël Zerbib

Reputation: 187

Insufficient funds in Stripe even with funds and manual payouts enabled

I am having trouble to make transfer from a paymentIntent, I have enabled manual payouts and have funds in my test balance.. I tried also to add source_transaction in the transfer object, but without success

I am getting:

StripeInvalidRequestError: Insufficient funds in Stripe account. In test mode, you can add funds to your available balance (bypassing your pending balance) by creating a charge with 4000 0000 0000 0077 as the card number

I already added with this test card number.. The paymentIntent is created successfully:

const paymentIntent = await stripe.paymentIntents.create(
  {
    amount: amount,
    currency: "usd",
    payment_method_types: ["card"],
    transfer_group: "{ORDER11}",
  }
) 

And here is my failing transfer object:

const transfer = await stripe.transfers.create({
          amount: orderAmount,
          currency: "usd",
          destination: sellerAccountId,
          transfer_group: "{ORDER11}",
          source_transaction: pi.charges.data.id,
});

Thank you for helping

Upvotes: 1

Views: 466

Answers (1)

Nolan H
Nolan H

Reputation: 7419

Just make sure, was this payment intent confirmed and did does it have status=succeeded (API ref)?

You may just have a small error in your source_transaction which needs to be pi.charges.data**[0]**.id, since data is an array you must provide an index.

Upvotes: 0

Related Questions