Check Transfer
curl --request POST \
--url https://api.example.com/api/checkTransfer \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": "<string>",
"sender_phone": "<string>",
"receiver_phone": "<string>",
"amount": "<string>",
"service": "<string>",
"receiver_country": "<string>",
"receiver_currency": "<string>",
"attribute": [
{}
]
}
'import requests
url = "https://api.example.com/api/checkTransfer"
payload = {
"id": "<string>",
"sender_phone": "<string>",
"receiver_phone": "<string>",
"amount": "<string>",
"service": "<string>",
"receiver_country": "<string>",
"receiver_currency": "<string>",
"attribute": [{}]
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
id: '<string>',
sender_phone: '<string>',
receiver_phone: '<string>',
amount: '<string>',
service: '<string>',
receiver_country: '<string>',
receiver_currency: '<string>',
attribute: [{}]
})
};
fetch('https://api.example.com/api/checkTransfer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/checkTransfer",
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([
'id' => '<string>',
'sender_phone' => '<string>',
'receiver_phone' => '<string>',
'amount' => '<string>',
'service' => '<string>',
'receiver_country' => '<string>',
'receiver_currency' => '<string>',
'attribute' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/checkTransfer"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/checkTransfer")
.header("API-KEY", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/checkTransfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"success": true,
"attribute": [
{
"name": "fx_rate",
"value": "47.2945"
}
]
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Endpoints
Check Transfer
Validate transfer details before sending money
POST
/
api
/
checkTransfer
Check Transfer
curl --request POST \
--url https://api.example.com/api/checkTransfer \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"id": "<string>",
"sender_phone": "<string>",
"receiver_phone": "<string>",
"amount": "<string>",
"service": "<string>",
"receiver_country": "<string>",
"receiver_currency": "<string>",
"attribute": [
{}
]
}
'import requests
url = "https://api.example.com/api/checkTransfer"
payload = {
"id": "<string>",
"sender_phone": "<string>",
"receiver_phone": "<string>",
"amount": "<string>",
"service": "<string>",
"receiver_country": "<string>",
"receiver_currency": "<string>",
"attribute": [{}]
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
id: '<string>',
sender_phone: '<string>',
receiver_phone: '<string>',
amount: '<string>',
service: '<string>',
receiver_country: '<string>',
receiver_currency: '<string>',
attribute: [{}]
})
};
fetch('https://api.example.com/api/checkTransfer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/checkTransfer",
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([
'id' => '<string>',
'sender_phone' => '<string>',
'receiver_phone' => '<string>',
'amount' => '<string>',
'service' => '<string>',
'receiver_country' => '<string>',
'receiver_currency' => '<string>',
'attribute' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/checkTransfer"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-KEY", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/checkTransfer")
.header("API-KEY", "<api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/checkTransfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"id\": \"<string>\",\n \"sender_phone\": \"<string>\",\n \"receiver_phone\": \"<string>\",\n \"amount\": \"<string>\",\n \"service\": \"<string>\",\n \"receiver_country\": \"<string>\",\n \"receiver_currency\": \"<string>\",\n \"attribute\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "",
"success": true,
"attribute": [
{
"name": "fx_rate",
"value": "47.2945"
}
]
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Overview
Validate transfer details before executing a money transfer. This endpoint validates all transfer parameters and returns the foreign exchange (FX) rate for the corridor without actually sending money.Best Practice: Always call this endpoint before executing a transfer to validate the transaction and get the current FX rate for the transfer.
Endpoint
POST /api/checkTransfer
Authentication
string
required
Your CashQ API Key for authentication
string
required
Must be
application/jsonRequest Body
string
required
Unique numeric identifier for this transfer. Use this same ID when executing the transfer. Must be numeric only.
string
required
Sender’s phone number in E.164 format (e.g.,
"+15615019469")string
required
Receiver’s phone number in E.164 format (e.g.,
"+201234567890")string
required
Transfer amount in dollars (e.g.,
"5.0" for $5.00)string
required
ID of corridor (e.g.,
"1271" for EGP). Payment attributes depend on the corridor and will be provided for the requested corridor upon request.string
required
Country code of receiver (e.g.,
"MX" for Mexico, "EG" for Egypt).string
required
Currency code for the receiver (e.g.,
"MXN" for Mexican Peso, "EGP" for Egyptian Pound)array
required
Array of corridor-specific payment attributes. Required attributes vary by corridor and include receiver details, bank information, address, and identification. Contact support for specific corridor requirements.
Show Attribute structure
Show Attribute structure
Each attribute object contains:
name(string): Attribute namevalue(string): Attribute value
receivedAmount- Amount in receiver’s currency (e.g., amount in EGP)receiverName- Full name of receiverreceiverFirstName- Receiver’s first namereceiverLastName- Receiver’s last namereceiverAddressStreet- Street addressreceiverAddressCity- CityreceiverAddressState- State/RegionreceiverAddressCountry- Country code (e.g., “EG”)receiverAccType- Account type (e.g., “1” for bank account)receiverIssuerCode- Bank issuer codereceiverAccountNumber- Bank account numberreceiverBankBranchCode- Bank branch code (optional, if applicable)receiverBankName- Bank namereceiverIdType- ID type (“2” for International Passport, “3” for Identification ID)receiverIdNumber- Identification number
Important: Without this attribute, the transaction will be created but will wait for automated/manual reconciliation checking, which may cause delays.
approvelyId AttributeIf you’re using the Payout API with our Payin API, you must include the approvelyId attribute to link the payout with the payin transaction:{
"name": "approvelyId",
"value": "46364493"
}
Request Example
curl -X POST 'https://api.cashqbot.com/api/checkTransfer' \
-H 'API-KEY: your_api_key_here' \
-H 'Content-Type: application/json' \
-d '{
"id": "123456789",
"sender_phone": "+15551234567",
"receiver_phone": "+525551234568",
"amount": "5.0",
"service": "1234",
"receiver_country": "MX",
"receiver_currency": "MXN",
"attribute": []
}'
const transferData = {
id: '123456789',
sender_phone: '+15551234567',
receiver_phone: '+525551234568',
amount: '5.0',
service: '1234',
receiver_country: 'MX',
receiver_currency: 'MXN',
attribute: []
};
const response = await fetch('https://api.cashqbot.com/api/checkTransfer', {
method: 'POST',
headers: {
'API-KEY': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify(transferData)
});
const data = await response.json();
console.log(data);
import requests
import json
transfer_data = {
'id': '123456789',
'sender_phone': '+15551234567',
'receiver_phone': '+525551234568',
'amount': '5.0',
'service': '1234',
'receiver_country': 'MX',
'receiver_currency': 'MXN',
'attribute': []
}
response = requests.post(
'https://api.cashqbot.com/api/checkTransfer',
headers={
'API-KEY': 'your_api_key_here',
'Content-Type': 'application/json'
},
json=transfer_data
)
data = response.json()
print(data)
<?php
$transferData = [
'id' => '123456789',
'sender_phone' => '+15551234567',
'receiver_phone' => '+525551234568',
'amount' => '5.0',
'service' => '1234',
'receiver_country' => 'MX',
'receiver_currency' => 'MXN',
'attribute' => []
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.cashqbot.com/api/checkTransfer');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'API-KEY: your_api_key_here',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($transferData));
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
?>
Response
boolean
required
Indicates if the validation was successful
string
Error message if validation failed, empty string if successful
array
Array of response attributes containing additional information
Show Response attributes
Show Response attributes
string
Foreign exchange rate for the corridor. Shows the conversion rate from the sender’s currency to the receiver’s currency.Example:
"47.2945" means 1 USD = 47.2945 EGPResponse Examples
{
"error": "",
"success": true,
"attribute": [
{
"name": "fx_rate",
"value": "47.2945"
}
]
}
{
"error": {
"message": "Invalid phone number format",
"code": "invalid_phone_number"
},
"success": "false"
}
Validation Checks
The endpoint validates:Phone Numbers
Validates sender and receiver phone number formats
Amount
Checks if amount is valid and within limits
Receiver Status
Checks if receiver exists on CashQ network
KYC Limits
Validates against receiver’s KYC limits
Best Practices
Always check before transfer
Always check before transfer
Call this endpoint before every transfer to validate parameters and check receiver status.
Use unique transfer IDs
Use unique transfer IDs
Generate unique numeric IDs for each transfer. Use the same ID for check and actual transfer. IDs must be numeric only.
Handle validation errors
Handle validation errors
Don’t proceed with transfer if validation fails. Show clear error messages to users.
Error Responses
| Error Code | Description | Solution |
|---|---|---|
authentication_error | Invalid or missing API key | Verify your API key |
invalid_phone_number | Phone number format incorrect | Use E.164 format without + |
invalid_amount | Amount is invalid | Check amount is positive and properly formatted |
invalid_request | Missing or invalid parameters | Verify all required fields are included |
kyc_not_verified | Receiver KYC limits exceeded | Reduce amount or ask receiver to verify |
internal_server_error | Server error occurred | Retry the request |
Related Endpoints
Money Transfer
Execute the transfer after validation
Check KYC
Check receiver’s KYC status and limits
Check Status
Monitor transfer status after execution
