John
John

Reputation: 337

How to transfer charged amount to a connected stripe account?

I am using stripe in test mode and I can't transfert the amount charged to a connected account.

After a successful payment, stripe send the wehook event checkout.session.completed, so my backend tries to handle this and transfert the collected amount to the connected account but nothing happens and my platform end up to receive the whole amount. I don't know what's wrong :

await stripe.paymentIntents.update(
                    eventData.object.payment_intent,
                    {application_fee_amount: Math.round(0.05 * price),transfer_data: {
                      destination: stripe_connected_account,amount:Math.round(0.95 * price)
                    }}
                  );

The above operation is not executed and my connected account receive nothing.

Any suggestion ?

Upvotes: 0

Views: 40

Answers (1)

LauraT
LauraT

Reputation: 999

In order to transfer the funds captured through this Checkout Session to a connected account, you'll need to include the transfer_data.destionation and application_fee_amount as payment_intent_data when creating the Checkout Session:

https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data

Upvotes: 1

Related Questions