Create Quote
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch('https://sandboxapi.me-cash.com/v1/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://sandboxapi.me-cash.com/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"paymentChannel": "BANK_TRANSFER",
"source": {
"amount": 150000
},
"target": {
"country": "NG",
"currency": "NGN"
}
}
'import requests
url = "https://sandboxapi.me-cash.com/v1/quote"
payload = {
"paymentChannel": "BANK_TRANSFER",
"source": { "amount": 150000 },
"target": {
"country": "NG",
"currency": "NGN"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://sandboxapi.me-cash.com/v1/quote';
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.me-cash.com/v1/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentChannel' => 'BANK_TRANSFER',
'source' => [
'amount' => 150000
],
'target' => [
'country' => 'NG',
'currency' => 'NGN'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://sandboxapi.me-cash.com/v1/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.me-cash.com/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"paymentChannel": "BANK_TRANSFER",
"source": ["amount": 150000],
"target": [
"country": "NG",
"currency": "NGN"
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://sandboxapi.me-cash.com/v1/quote")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
val request = Request.Builder()
.url("https://sandboxapi.me-cash.com/v1/quote")
.post(body)
.addHeader("x-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falsepackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.me-cash.com/v1/quote"
payload := strings.NewReader("{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "quote successfully created",
"status": "success",
"data": {
"id": "e5eec724-38f9-40e2-9i86-xxxxxxxxxxxxx",
"paymentChannel": "BANK_TRANSFER",
"source": {
"currency": "NGN",
"country": "NG",
"amount": 150000
},
"target": {
"currency": "USD",
"country": "US",
"amount": 81.97
},
"rate": 1830,
"fee": {
"amount": 0,
"stampDuty": 0
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "USD",
"appliedCountry": "US",
"transaction": {
"minimum": 1,
"maximum": 20000000000000
},
"invoice": 200000000000
}
],
"summary": {
"total": 150000
},
"settlementTime": "1 hr",
"settlement": "1 hr",
"quoteCurrency": "USD",
"expiresInSeconds": 600
}
}Quote
Create Quote
Creates a quote for a source and destination currency specified by a user.
POST
/
v1
/
quote
Create Quote
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch('https://sandboxapi.me-cash.com/v1/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://sandboxapi.me-cash.com/v1/quote \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"paymentChannel": "BANK_TRANSFER",
"source": {
"amount": 150000
},
"target": {
"country": "NG",
"currency": "NGN"
}
}
'import requests
url = "https://sandboxapi.me-cash.com/v1/quote"
payload = {
"paymentChannel": "BANK_TRANSFER",
"source": { "amount": 150000 },
"target": {
"country": "NG",
"currency": "NGN"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const url = 'https://sandboxapi.me-cash.com/v1/quote';
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentChannel: 'BANK_TRANSFER',
source: {amount: 150000},
target: {country: 'NG', currency: 'NGN'}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.me-cash.com/v1/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentChannel' => 'BANK_TRANSFER',
'source' => [
'amount' => 150000
],
'target' => [
'country' => 'NG',
'currency' => 'NGN'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://sandboxapi.me-cash.com/v1/quote")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandboxapi.me-cash.com/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"paymentChannel": "BANK_TRANSFER",
"source": ["amount": 150000],
"target": [
"country": "NG",
"currency": "NGN"
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://sandboxapi.me-cash.com/v1/quote")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
val request = Request.Builder()
.url("https://sandboxapi.me-cash.com/v1/quote")
.post(body)
.addHeader("x-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()falsepackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandboxapi.me-cash.com/v1/quote"
payload := strings.NewReader("{\n \"paymentChannel\": \"BANK_TRANSFER\",\n \"source\": {\n \"amount\": 150000\n },\n \"target\": {\n \"country\": \"NG\",\n \"currency\": \"NGN\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "quote successfully created",
"status": "success",
"data": {
"id": "e5eec724-38f9-40e2-9i86-xxxxxxxxxxxxx",
"paymentChannel": "BANK_TRANSFER",
"source": {
"currency": "NGN",
"country": "NG",
"amount": 150000
},
"target": {
"currency": "USD",
"country": "US",
"amount": 81.97
},
"rate": 1830,
"fee": {
"amount": 0,
"stampDuty": 0
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "USD",
"appliedCountry": "US",
"transaction": {
"minimum": 1,
"maximum": 20000000000000
},
"invoice": 200000000000
}
],
"summary": {
"total": 150000
},
"settlementTime": "1 hr",
"settlement": "1 hr",
"quoteCurrency": "USD",
"expiresInSeconds": 600
}
}Error responses
| Status | Message | What it means | How to fix |
|---|---|---|---|
| 400 | Invalid country or currency ISO code | Source/target country or currency combination is unsupported. | Send ISO pairs for corridors enabled on your workspace. |
| 400 | Invalid Payment Channel, check docs or contact support | paymentChannel is not valid for the corridor. | Switch to a supported channel for the requested route. |
| 400 | Required field missing or invalid request | Payload is missing mandatory attributes. | Validate source, target, paymentChannel, and metadata before calling. |
| 400 | Minimum target amount for transaction is {minimum_transaction_amount} | Target amount is below the minimum allowed. | Increase the amount to at least the stated threshold. |
| 400 | Maximum target amount for transaction is {maximum_transaction_amount} | Target amount exceeds the allowed limit. | Reduce the amount to stay under the maximum. |
| 400 | Transaction target amount {transaction_amount} requires invoice | Amount requires invoice documentation. | Attach the relevant invoice and retry. |
| 401 | API key missing or incorrect | x-api-key header missing/invalid. | Include the correct API key for sandbox/production. |
| 403 | Quote route not available, contact support | Quote endpoint disabled in the current environment. | Reach out to support to enable the route. |
| 403 | Access denied: IP address not whitelisted | IP address has not been whitelisted. | Add your server IP in the dashboard. |
| 429 | API rate limit exceeded | Too many quote requests in a short window. | Implement exponential backoff before retrying. |
| 500 | Service temporarily unavailable | Temporary backend outage or maintenance. | Retry shortly and escalate if it continues. |
Authorizations
Body
application/json
Details for the new quote.
The channel through which the payment will be processed. For SWIFT transfers, use SWIFT_CUSTOMER (sender/customer bears all transfer charges), SWIFT_SHARED (charges split between sender and beneficiary), or SWIFT_BENEFICIARY (beneficiary bears all transfer charges).
Available options:
BANK_TRANSFER, INTERAC, SWIFT_CUSTOMER, SWIFT_SHARED, SWIFT_BENEFICIARY, MOBILE_MONEY Example:
"BANK_TRANSFER"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I

