0
votes

I'm trying to charge money into a stripe managed (connected) account and then immediately transfer it from the managed account to the bank account of the user. To achieve this I'm making use of the source_transfer parameter in order to delay the actual payout until the money has been received. (documented here: https://stripe.com/docs/connect/charges-transfers#transfer-availability)

I'm posting a request to https://api.stripe.com/v1/transfers with the following post parameters: { source_transaction -> ch_19vkgRJ6y4jvjvHhnBdw8qeT, amount -> 44444, metadata[caseId] -> StripeAdapterIT-1489140548878_762, currency -> eur, destination -> default_for_currency }

The problem is that I'm receiving the following error:

{
  "error": {
    "type": "invalid_request_error",
    "message": "No such transaction: ch_19vkgRJ6y4jvjvHhnBdw8qeT",
    "param": "source_transaction"
  }
}

I created the charge a few seconds earlier receiving the charge id and can definitely see it in the (test) dashboard, so I know that it exists.

Why is my request failing saying that the charge cannot be found?

1

1 Answers

1
votes

The source_transaction parameter is used when creating internal transfers from a platform's account's balance to managed account's balance, not when creating payout transfers from a managed account's balance to its associated bank account.

You can read more about this here: https://stripe.com/docs/connect/charges-transfers#transfer-availability.

It is not possible to bypass the pending balance when creating payout transfers.

I recommend you reach out to Stripe's support at https://support.stripe.com/email and explain your desired payment flow, and they will be able to advise you on whether it's possible and how you'd implement it.