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.
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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With