#tirth-jain_api

1 messages · Page 1 of 1 (latest)

wooden solsticeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433374274902560838

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

crystal rampart
#

My Platform only have the USD Balance, What my goal is to pass currency other than USD (Consider this is the case) .

Example:
The receiver’s local currency is EUR, and I need to transfer 8 EUR. Stripe should convert the amount from EUR to USD, debit from my account in USD, and the receiver should receive 8 EUR.

Working Example :white_check_mark:
const transfer = await stripe.transfers.create({
     amount: 8 * 100, // Amount in cents from frontend
     currency: 'usd', // because i have balance in usd
     destination: account.id,
     description: `Transfer to ${account.email || account.id}`,
   });
Not Working Example :x:
Error: Insufficient Balance

const transfer = await stripe.transfers.create({
     amount: 8 * 100, // Amount in cents from frontend
     currency: 'eur', // or any other currency expect usd
     destination: account.id,
     description: `Transfer to ${account.email || account.id}`,
   });
#

@wind elm Tell me to do this below but how would i convert the amount in usd ? althou i want stripe to do on it's own ...
{
to_currency: 'eur', // connected account currency
from_currencies : ['usd'], // platform currency
lock_duration: 'day',
lock_duration : 'five_minutes',
usage : {
type : 'transfer',
transfer : {
destination : 'acct_xxx' #account you want to transfer to
}
}
}

Create a transfer, specifying the fx_quote field, example payload below

{
currency: "usd", // this must be the platform currency
destination: "acct_xxx",
fx_quote: 'fexq_xxx',
amount : //amount to be transfered ,
}

pine zealot
#

Hi, happy to help

#

Are you based in US ?

crystal rampart
#

Are you based in US ?
My platform is based in US Region, because as per docs for enabling the cross border functionally (Platform region must be in US)

pine zealot
#

Nice, yeah that's what I wanted to confirm with you

#

Now what is the issue you are facing ?

#

For the currency conversion, I think you simply need to create the transfer and Stripe will do the conversion

crystal rampart
#

I actually want to transfer the balance from my platform payment balance to connect account stripe balance, Payout we dont have to do, connected user will do that thingss manually

pine zealot
#

So in your use case, did you try to create a Transfer ?

crystal rampart
#

Yes!

pine zealot
#

And what error/issue you get ?

crystal rampart
pine zealot
#

Can you share the failure request Id ?

crystal rampart
#

Yes give me a minute

wooden solsticeBOT
crystal rampart
#

req_lo7a2pb2M3lIO4

turbid wadi
#

hey there 👋 taking over for my colleague

#

thanks! taking a look at this log now

crystal rampart
#

Hey!

turbid wadi
crystal rampart
#

I have $ 100,506.09 available balance, and i am transfering the 10 EUR

turbid wadi
#

the currency of the transfer should match your platform's balance (i.e USD)

#

this is why the subsequent attempts in USD succeeded

crystal rampart
#

Yes! but is it possible that stripe auto convert in **usd ** ? If I transfer in EUR stripe convert to USD and receiver will get EUR in there local currency

#

@wind elm give me some example of fx_quotebut I didn't completely understand what exactly it is and how it will help me achieve this.. could you please help me our with that ? or you have any other better solution

#

All I want is stripe auto convert any currencies to usd... while using the Transfer API

turbid wadi
#

hmmm, so you want the funds to be converted twice?

USD > EUR > Receiver local currency?

crystal rampart
#

Yes

turbid wadi
#

I'm not sure we support this (it's generally something people want to avoid because of the FX fees when converting funds)

#

can you tell me why you don't want to just do one conversion? (i.e. USD > Receiver local currency)

crystal rampart
#

Let's say I Have to transfer 10 EUR, there might be possible of variation of few amount

#

is there any API that take amount, from_currency, **to_currency **and give me the converted amount based on the latest conversion rate ?

turbid wadi
crystal rampart
#

could you please give me working example of if i want to transfer eur then how to do ?
How do i convert EUR to USD and how to use it in transfer API

crystal rampart
wooden solsticeBOT
crystal rampart
#

All this document is for like give me the conversation rate, is there any way it provide me the amount directly in usd which i have to transfer ?

bleak canyon
#

👋 Hi there. Taking over for my colleague

#

There isn't a way for it to provide you with the amount — you would have to calculate this based on the exchange rate it returns

crystal rampart
#

Error Log = https://dashboard.stripe.com/test/logs/req_ELERhzyUr5f2l0?t=1761819062
I have USD balance = $100,506.09

Account ID Tranfering = acct_1SNrgb18IRRTobsK

Curl Call For fx_quote

curl --location 'https://api.stripe.com/v1/fx_quotes' \
--header 'Stripe-Version: 2025-07-30.preview' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: ••••••' \
--data-urlencode 'to_currency=eur' \
--data-urlencode 'from_currencies%5B%5D=usd' \
--data-urlencode 'lock_duration=five_minutes' \
--data-urlencode 'usage%5Btype%5D=transfer' \
--data-urlencode 'usage%5Btransfer%5D%5Bdestination%5D=acct_1SNrgb18IRRTobsK'

fx_quote = fxq_1SNsoC01P2qVxTjG89aoNtLo

Creating the transfer

return await this.stripe.transfers.create({
        amount: 10 * 100,
        currency: 'eur',
        destination: accountId,
        description,
        metadata,
        fx_quote: 'fxq_1SNsoC01P2qVxTjG89aoNtLo',
      });

Can you please check

bleak canyon
#

The error message says that you did not include eur in the from_currencies when creating the FX quote, in this request: req_lnWWiSKDoairi3

crystal rampart
#

{
"error": {
"message": "The FX Quote's to_currency: "usd" must match the merchant's default currency: "eur".",
"param": "to_currency",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_Jv7k4aI4HV2DlJ?t=1761819614",
"type": "invalid_request_error"
}
}

curl --location 'https://api.stripe.com/v1/fx_quotes' \
--header 'Stripe-Version: 2025-07-30.preview' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic c2tfdGVzdF81MVJraXp5MDFQMnFWeFRqR0o0dHFUQW9RSXI5MW9pSzB4RzFMVlVSd01rSWVLa3d5N0wzZ2pWTjdOdGRJSVJCWUZiWGVubHJveTJqRHo3OVdwaHdLU1BDdTAwUDNmcDNCYWs6' \
--data-urlencode 'to_currency=usd' \
--data-urlencode 'from_currencies%5B%5D=eur' \
--data-urlencode 'from_currencies%5B%5D=eur' \
--data-urlencode 'lock_duration=five_minutes' \
--data-urlencode 'usage%5Btype%5D=transfer' \
--data-urlencode 'usage%5Btransfer%5D%5Bdestination%5D=acct_1SNrgb18IRRTobsK'

This it give me this error, please check

bleak canyon
#

to_currency was fine, but not from_currencies

#

But if you want to pay someone in USD, your Transfer has to have currency: usd — you used currency: eur in req_ELERhzyUr5f2l0

crystal rampart
#

I want to pay someone in EUR From USD

bleak canyon
#

If you want to send 1000 EUR using your USD balance, you need to calculate the USD amount to send them (e.g. using FX quotes), and use currency: usd in the transfer

crystal rampart
#

I pass the EUR amoutn and the currency=usd, but receiver not received the 10 EUR

#

It received the dollar instead of EUR

#

It should recived the EUR directly, I belive

bleak canyon
#

You need to pass the USD amount that's equal to 10 EUR, which would be around 11.74 USD according to the exchange rate shown there

crystal rampart
#

okay got it

#

Stripe will not convert on it own ?

bleak canyon
#

No, you need to decide how much to send

crystal rampart
#

"rates": {
"usd": {
"exchange_rate": 0.851624,
"rate_details": {
"base_rate": 0.860835,
"duration_premium": 0.00070,
"fx_fee_rate": 0.01,
"reference_rate": 0.859402,
"reference_rate_provider": "ecb"
}
}
},

fx_fee_rate is the fee who is going to bear, like platform or receiver

bleak canyon
#

The platform

crystal rampart
#

Where can i see this in platform ?

pine zealot
crystal rampart
#

I Have transfer to acct_1SNrgb18IRRTobsK, i am unabel to see any fee

#

can you please look into this

pine zealot
#

Can you share a transfer that there were a currency conversion please ?

#

You see here for example tr_1SNu1w01P2qVxTjG7DiPW7Cc if there were Stripe fees related, then you could see it here:

#

In general if you want to see the related Stripe fees you can check the balance transactions

crystal rampart
#

One more thing when i use fx_quote it gives me exchange rate, but if you see there is still a 0.02 EUR is move extra.

pine zealot
#

Make sure to provide that concrete example in the email too.

crystal rampart
#

okay

pine zealot
#

Happy to help!