jmecs
jmecs

Reputation: 187

How to manage multi currency transfers in stripe?

I have a GBP linked bank account. I have a marketplace app hwere users are able to purchase from multiple merchants. I would like a buyer to be able to purchase from multiple stores in USD. My app takes an application fee (sends this to my GBP bank account), and then sends the respective amounts merchants.

This is my code:

const { client_secret } = await stripe.paymentIntents.create({
      amount: 10000,
      currency: 'usd',
      payment_method_types: ["card"],
    });

const charges = await stripe.charges.list({
    payment_intent: paymentIntentId,
  });
  const charge = charges.data[0];

await stripe.transfers.create({
      amount: 4000,
      currency: 'usd',
      destination: "example1",
      source_transaction: charge.id,
    });

await stripe.transfers.create({
          amount: 4000,
          currency: 'usd',
          destination: "example2",
          source_transaction: charge.id,
        });

I get the following error:

The currency of source_transaction's balance transaction (gbp) must be the same as the transfer currency (usd)"

Upvotes: 1

Views: 665

Answers (1)

Pompey
Pompey

Reputation: 1354

So it looks like you are running in to a result of how Stripe handles currency conversion. Making that transaction on your UK account means that the funds will be converted to GBP when they land on your platform[1]. You can still transfer these funds to US accounts with USD bank accounts but you should specify GBP in the API call

await stripe.transfers.create({
      amount: 4000,
      currency: 'GBP',
      destination: "example1",
      source_transaction: charge.id,
    });

To clarify the error message a bit, the balance transaction is a Stripe object that represents changes in your account's balance. Because these funds were converted to GBP to be placed in your account, the balance transaction has a currency of GBP.

Note that there will be an FX fee both when the USD is converted to GBP for your account and when the GBP is converted to USD for the transfer. You can avoid this by either specifying a USD account as the merchant of record by using the on_behalf_of parameter when creating these charges[2]. If it isn't appropriate to make one of the merchants on the purchase a merchant of record, it may still be appropriate to have a US account under your UK account for all of your US accounts to connect to. For advice on whether that structure makes sense for your integration, you can reach out to Stripe's support[3]

[1] https://stripe.com/docs/connect/currencies#separate-charges-transfers-without-on-behalf-of

[2] https://stripe.com/docs/connect/currencies#separate-charges-transfers-on-behalf-of

[3] https://support.stripe.com/?contact=true

Upvotes: 1

Related Questions