Create A FX Proposal
Currently we only support FX proposals for USD to local currencies, meaning that the base currency can only be USD and the target currency can only be BRL, MXN, COP or CLP.
Keep in mind that when you need to include other proposals together with FX proposal, you’ll need to Create A Proposal with Multiple Intentions .
HTTP Request
POST
/v1/payments/proposals
Request Response
Request Headers {
"Content-Type" : "application/json" ,
"Authorization" : "Bearer {{access_token}}" ,
"x-api-key" : "{{api_key}}"
}
Request Body {
"amount" : 100000 ,
"country" : "BR" ,
"currency" : "USD" ,
"targetCurrency" : "BRL"
}
Response {
"id" : "f261a2dd-b719-4afb-ad54-c52cef8ba8d2" ,
"submitTime" : "2023-09-21T08:44:45Z" ,
"expirationTime" : "2023-09-21T09:44:45Z" ,
"paymentIntent" : {
"amount" : 100000 ,
"country" : "BR" ,
"currency" : "USD" ,
"targetCurrency" : "BRL"
},
"planDetails" : {
"fx" : [
{
"base" : "USD" ,
"target" : "BRL" ,
"spreadRate" : 0.02
},
{
"base" : "USD" ,
"target" : "MXN" ,
"spreadRate" : 0.02
}
]
},
"proposalDetails" : {
"fxProposalDetails" : {
"fxRate" : {
"modifierType" : "RATE" ,
"base" : "USD" ,
"target" : "BRL" ,
"timestamp" : 1664443743 ,
"exchangeRate" : 5.48350980
},
"baseAmount" : 100000 ,
"targetAmount" : 548351
}
}
}
Key
Value
Authorization
"bearer" + " " + {{access_token}}
x-api-key
{{api_key}}
Request Body Parameters
Parameter
Required
Type
Description
amount
Long
The transfer amount, The minimum settlement granularity of the current currency, such as 100=1BRL
country
String
The country code.
currency
String
The base currency code, can only be USD.
targetCurrency
String
The target currency code, can only be BRL, MXN, COP,PEN or CLP.
Response Body Parameters
Parameter
Type
Description
id
String
The proposal ID.
submitTime
String
The proposal submit time.
expirationTime
String
The proposal expiration time.
paymentIntent
JSON
The payment intention.
planDetails
JSON
The plan details.
proposalDetails
JSON
The proposal details.
Object Parameters
paymentIntent
Parameter
Type
Description
amount
Long
The transfer amount, The minimum settlement granularity of the current currency, such as 100=1BRL
country
String
The country code.
currency
String
The base currency code.
targetCurrency
String
The target currency code.
planDetails
Parameter
Type
Description
fx
JSON Array
fx plan details.
fx
Parameter
Type
Description
base
String
base currency
target
String
target currency
spreadRate
Positive Float
Foreign exchange spread rate
proposalDetails
fxProposalDetails
Parameter
Type
Description
fxRate
JSON
The foreign exchange rate details.
baseAmount
Long
The amount of base currency.
targetAmount
Long
The amount of target currency.
fxRate
Parameter
Type
Description
modifierType
String
Modifier type. RATE
base
String
Base currency, e.g. USD
target
String
Target currency, e.g. BRL
timestamp
Long
The timestamp when exchanging currency.
exchangeRate
Positive Float
The exchange rate.