#Frazer

1 messages · Page 1 of 1 (latest)

distant pythonBOT
agile gale
#

Hi, adding the other information to this thread and taking a look.

#

The operation is successful and in this example, $77.34 goes to [Business A]'s account and $2.66 stays with our platform (although I believe the Stripe processing fee will be taken out of this figure too?)

  1. Our platform performs a "capture" operation (via the Stripe API) on the payment intent that was created in step 1, this operation is successful.

  2. In the event a refund needs to happen we create a refund (via the Stripe API). We set the "amount" parameter to $80, the "payment_intent" parameter to the ID of the payment intent created in step 1. We set the "refund_application_fee" parameter to true and the "reverse_transfer" parameter to true.

We're expecting that [Business A]'s customer is refunded in full and the transfer is revered however the operation fails with an error message being returned from the Stripe api related to "insufficient funds". We are confused as to why the error is happening (and which account is causing it) and would like to know if we need to do things slightly differently to avoid this situation?

That’s awesome CJ, thanks for your response mate. I’ll take Lachy, our CTO through your suggestion to pass the Charge ID instead and post in the Discord too.

Additional context:
– We're creating a payment intent
– We're setting an application fee
– We're setting the transfer destination account, but not the amount since we're using the application fee

We're able to perform a successful capture on the payment intent, however when we're attempting a refund, we're getting the following Stripe error.

Sorry for the long message but I wanted to provide as much context as possible.

Thanks so much & I look forward to hearing from anyone who might know an answer

#

From what you've communicated, it does appear that you're using destination charges with on_behalf_of. The fee would come out of the Platform account, that is correct.

#

You'd typically see this insufficient funds error when there is not enough funds to process the refunds. As for next steps, you'd need to add funs to the account