Payment Quote
Can use this endpoint to get a payment quote
This endpoint is used to get a payment quote including FX and other fees. The endpoint is as follows:
POST https://sandbox-api.veem.com/veem/v1.2/exchangerates/{quote}
Headers
There are 2 headers necessary for the use of this endpoint:
- X-request-id: This is a number unique to the current API request, and follows the UUID format. Reusing this header without changing the value will result in a 500 (Internal Server Error) status. An example X-request-id is as follows:
48855846-628d-4177-b071-80332a116f0a
- Authorization: This header holds the bearer token required to use Veem's public API. Failure to use a valid bearer token will result in a 404 (Not Found) status. An example of a valid token is as follows:
Bearer d49e7fd4-2600-4dd4-a572-118668febbe7
Request Payload
When fetching a payment quote, one should follow a format similar to the below example:
{
"payerAccountId":11560,
"fromAmount":100,
"fromCurrency":"USD",
"fromCountry":"US",
"toCountry":"DE",
"toCurrency":"EUR",
"bruid":"25ef26da-0c69-3ebd-ae31-18aee238a692"
}
Request Parameters
The following table contains detailed information on the payload's parameters, such as the parameter name, whether it is mandatory or not, formatting (if applicable), and size of the parameter
Parameter | Mandatory? | Format/Values | Size/Type |
---|---|---|---|
payerAccountId | Yes | Account ID in Veem's system | Long |
fromAmount | Yes (If toAmount is not provided) | BigDecimal | |
toAmount | Yes (if fromAmount is not provided) | BigDecimal | |
fromCurrency | Yes | Currency Code (ISO 4217) | 3 characters |
fromCountry | Yes | ISO 3166-1 alpha-2 standard | 2 characters |
toCountry | Yes | ISO 3166-1 alpha-2 standard | 2 characters |
bruid | No | String | 36 characters |
Notes:
- When fromAmount is provided - meaning this exact amount will be sent
- When toAmount is provided - meaning this exact amount will be received
- Only one of fromAmount/toAmount can be set
For extra information, you can find some resources here:
Currency Codes (ISO 4217): https://www.iban.com/currency-codes
ISO 3166-1 alpha-2 standard: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
Response Payload
Once a valid request has been sent, a response payload of this format should be expected:
{
"payerAmount": {
"number": 100,
"currency": "USD"
},
"payeeAmount": {
"number": 85.43,
"currency": "EUR"
},
"usdAmount": {
"number": 100,
"currency": "USD"
},
"veemRate": 0.854302,
"bruid": "25ef26da-0c69-3ebd-ae31-18aee238a692"
}
Note: Since the BRUID field is optional, if it is not provided or it has expired, the quote will be based on real-time FX rates values instead
Possible errors
When trying to access the payment quote, one may encounter several errors if an invalid parameter/header is used
- Invalid ClientID - Status 400 (Bad Request)
- The token is invalid or expired - Status 401 (Unauthorized)
- The token owner lacks permission to operate the current API - Status 403 (Forbidden)
- Resource not found - Status 404 (Not Found)
- Status 500 (Internal Server Error)
Generate Bulk Payment Quote
This endpoint is used to get bulk payment quotes, which include FX and other fees. The endpoint is as follows:
POST https://sandbox-api.veem.com/veem/v1.2/exchangerates/{quote}/bulk
Headers
The headers are the exact same as generating regular payment quotes, and can be reused
Request Payload
When fetching bulk payment quotes, one should follow a format similar to the below example:
{
"requests": [
{
"payerAccountId": 11560,
"fromAmount": 100,
"fromCurrency": "USD",
"fromCountry": "US",
"toCountry": "DE",
"toCurrency": "EUR",
"bruid": "25ef26da-0c69-3ebd-ae31-18aee238a692"
},
{
"payerAccountId": 11560,
"fromAmount": 100,
"fromCurrency": "USD",
"fromCountry": "US",
"toCountry": "CA",
"toCurrency": "CAD",
"bruid": "25ef26da-0c69-3ebd-ae31-18aee238a692"
}
]
}
Request Parameters
The request parameters are identical to regular payment quotes, and can be reused
Response Payload
Once a valid request has been sent, a response payload of this format should be expected:
[
{
"payerAmount": {
"number": 100,
"currency": "USD"
},
"payeeAmount": {
"number": 129.10,
"currency": "CAD"
},
"usdAmount": {
"number": 100,
"currency": "USD"
},
"veemRate": 1.290984,
"bruid": "25ef26da-0c69-3ebd-ae31-18aee238a692"
},
{
"payerAmount": {
"number": 100,
"currency": "USD"
},
"payeeAmount": {
"number": 88.75,
"currency": "EUR"
},
"usdAmount": {
"number": 100,
"currency": "USD"
},
"veemRate": 0.887471,
"bruid": "25ef26da-0c69-3ebd-ae31-18aee238a692"
}
]
Note: Since the BRUID field is optional, if it is not provided or it has expired, the quote will be based on real-time FX rates values instead
Possible errors
When trying to access the bulk payment quotes, one may encounter several errors if an invalid parameter/header is used
- Invalid ClientID - Status 400 (Bad Request)
- The token is invalid or expired - Status 401 (Unauthorized)
- The token owner lacks permission to operate the current API - Status 403 (Forbidden)
- Resource not found - Status 404 (Not Found)
- Status 500 (Internal Server Error)
Updated 3 days ago