#leona-connect-fx

1 messages · Page 1 of 1 (latest)

muted frigateBOT
wide fern
#

code looks like this

sand delta
#

Can you copy/paste the request ID here? It's in your screenshot but I can't copy from the image

#

You can also just copy the full request_log_url from your screenshot and I can grab the request ID from there

wide fern
#

req_mesbXwf3BhXcYq

#

this one ?

sand delta
#

yep, thanks!

#

Okay, so while the source transaction in your request was a USD charge (USD was the presentment currency), the amount was converted to the account's settlement currency (CAD)

#

You'll need to pass currency: cad and an amount in CAD to create the transfer

wide fern
#

okay so where should i get this currency

#

is 'cad' base on receiver's currency or my website?

#

or in other words, is it base on connected account's currency?

sand delta
#

Since you're using separate charges and transfers, the currency is based on your platform's settlement currency

wide fern
#

i see, so i can simply set it to 'cad'

muted frigateBOT
sand delta
#

Yes, though make sure the value you pass for amount is accurate

wide fern
#

i have to convert the amount to cad then make the transfer? since the invoice.subtotal is in USD

sand delta
#

Ah, no. Let me back up. Presentment currency is the currency used for the charge. Settlement currency is the currency that you can receive payouts in. Settlement currency is based on the country that your Stripe account is in

#

For this particular charge, the presentment currency was USD. Since this charge was created on your platform account (based in Canada) and your platform account has a Canadian based account for payouts, the charge amount was converted to CAD

#

You can look at the Charge's Balance Transaction to see the amount in CAD

#

So you can make that transfer creation request again but currency should be cad and the amount you pass should be the amount you want to transfer to the connected account but in CAD (so if you wanted to transfer $47 USD, you'll need to calculate what that amount should be in CAD)

wide fern
#

can i just apply the exchange rate base on what i have right now, in the screenshot it's the amount in USD

karmic sigil
#

What do you mean "apply the exchange rate" exactly?

wide fern
karmic sigil
#

Sorry that's a picture of coe. What is your exact question, can you share code as text an explain exactly what you are blocked on after what my colleague explained?

#

leona-connect-fx

wide fern
#

cause right now, the amount i'm passing is in USD, i get the balance transaction, and thought maybe i could multiply this amount to make it the right amount

#

so our platform is charging money from the users in US, but our company is base in Canada, when they're making payments, i use webhook to make the transfers to each distination

#

but it gives me error

#

thought i should set the currency to cad which is the Settlement currency

#

and the amount you're seeing in the screenshot is the amount in USD, cause it should be around 60 in CAD

#

thought base on what i have right now, i can apply the exchange the rate and get the right amount?

karmic sigil
#

You don't know the exchange rate though so you can't really apply it in any ways. Whatever you see in the API for the Charge could change afterwards or be a different exchange rate the other way.

If you charge in USD but are in Canada you will get CAD, then you have to transfer CAD. And there is no way to guarantee how much they will get in USD as a response. Yes you can approximate like you were thinking about but that's the closest you can get unfortunately

wide fern
#

i can get the exchange rate by balance transaction

#

right ?

karmic sigil
#

please don't share pictures like that, you can share text, developer to developer. Also deleted as you had your Live API key right in there (you really should roll it)

wide fern
#

okay thanks

#

but you get my point

karmic sigil
#

You can get the exchange rate on a BalanceTransaction but I don't understand why you want that? I explained that the FX from the Charge will not guarantee you can use the same FX on the Transfer

wide fern
#

cause the amount i'm getting is in USD which is not right

#

it should be in CAD

karmic sigil
#

Please try no picture

wide fern
#

this is right if our Settlement currency is USD

#

alright

karmic sigil
#

I know it's annoying but it forces you to think a bit like a developer and go beyond just the small part you see

#
  1. What exact API Resource is this picture from? A Transfer? A Charge? Something else?
wide fern
#

a transfer

#

i'm making a transfer request

karmic sigil
#

Okay so a Transfer in your platform is created in CAD because that's the funds you have right? So the amount/currency on the Transfer is CAD.
The USD is on the connected account's balance where a Charge py_123 is created to reflect the money coming in. That one will be in USD

wide fern
#

yes

#

i think i know what to do now

karmic sigil
#

Awesome. Otherwise share your exact code for the Transfer creation (no picture please) and I'll show you what to modify so that it clicks

wide fern
#

alright thanks! i'll do a test on the code

#

thanks for your help