Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe API: How do you find the exchange rate and amount in foreign currency of a cross border transfer to a Connect Account?

I'm using Stripe to process payments. I have a platform where international Connect accounts can sell items to others through my platform.

My platform is USD. In this specific example, the Connect account is in CAD (Canada Dollar). When someone purchases an item from this CAD Connect Account, Stripe puts the money in my platform account, leaves my app fee there, and then moves the correct amount into the CAD Connect account. It converts this amount to CAD. In the stripe GUI I can find the exchange rate and amount transferred in CAD, as circled in the screenshot below. But I can't find these attributes in the API.

enter image description here

The only object I've seen with an exchange_rate attribute is the balance transaction. However, when I get the balance transaction for the transaction in the screenshot, I get this response object:

Request: https://api.stripe.com/v1/balance_transactions/txn_1IBNiNLLBOhef2QNqIeaNg9o

Response:

{ 
"id": "txn_1IBNiNLLBOhef2QNqIeaNg9o", 
"object": "balance_transaction", 
"amount": -7777, 
"available_on": 1611619200, 
"created": 1611076199, 
"currency": "usd", 
"description": null, 
"exchange_rate": null, 
"fee": 0, 
"fee_details": [], 
"net": -7777, 
"reporting_category": "transfer", 
"source": "tr_1IBNiNLLBOhef2QNcNqv3IlS", 
"status": "pending", 
"type": "transfer" }

The problem here is that the balance transaction object above only shows this transaction in USD: $77.77 USD came out of my platform account.

But it doesn't show the conversion rate or the amount in CAD. When this $77.00 went into the CAD Connect account, as we can see in the GUI screenshot, that $77.77 was converted to $98.02 CAD and the exchange rate was 1.26039 (USD->CAD).

How can I find this CAD amount and exchange rate through the API?

like image 398
Dashiell Rose Bark-Huss Avatar asked Jan 19 '21 22:01

Dashiell Rose Bark-Huss


People also ask

How does stripe handle multiple currencies?

When a Stripe account receives payments in multiple currencies, Stripe accumulates separate balances for each currency. When those balances are paid out to an associated bank account (or debit card), Stripe automatically sends funds to the associated account for each currency, thereby avoiding exchange fees.

How does stripe avoid exchange fees?

When those balances are paid out to an associated bank account (or debit card), Stripe automatically sends funds to the associated account for each currency, thereby avoiding exchange fees.

How does the exchange rate and currency conversion API work?

The Exchange Rate and Currency Conversion API, like all of Abstract's APIs such as the VAT validation API, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors. The Exchange Rate API requires all communications to be secured TLS 1.2 or greater.

What are stripe’s regional and cross-border policies?

This charge flow is subject to Stripe’s regional and cross-border policies. Separate charges are converted to the connected account’s default currency from the presentment currency and the platform later transfers the funds to the connected account.


1 Answers

The Transfer made to the connected account in this screenshot is in USD. The conversion happens after the Transfer itself. The funds are sent in USD and then in the connected account they get converted to that account's default Currency.

You want to look at the Transfer's destination_payment property which has the py_123 id for the Charge on the connected account. That Charge has a BalanceTransaction object (similar to the Transfer one you shared). That BalanceTransaction would reflect the conversion from USD to CAD and surface the exchange rate used in the exchange_rate property in that case.

like image 183
koopajah Avatar answered Nov 04 '22 01:11

koopajah