NAV
curl javascript python java ruby

Introduction

Purpose

The purpose of this document is to describe the various interfaces available on the TerraPay network for international money remittances and the associated services and transaction flows.

Scope

The Scope of this document is to give a detailed explanation on the APIs that are hosted on the TerraPay network and how partners can use these APIs to integrate into TerraPay to send transactions.

Audience

This document is to be used by

Acronyms and Abbreviations

Acronyms Abbreviations
IMT International Money Transfer
AML Anti Money Laundering
CFT Counter Financing of Terrorism
JSON JavaScript Object Notation
XML Extended Markup Language
HTTPS Secure Hyper Text Transfer Protocol
POC Proof of Concept
TPS Transactions Per Second
SOAP Simple Object Access Protocol
VPN Virtual Private Network
S2S Site to Site
MNO Mobile Network Operator
MTO Money Transfer Operator
MMO Mobile Money Operator
FOREX Foreign Exchange Rate
SRC Source
DST Destination
MSISDN Mobile Station International Subscriber Directory Number
Bank A/C Bank Account
IBAN International Bank Account Number
IFSC Indian Financial System Code
SWIFT Society of Worldwide Interbank Financial Telecommunication
SEPA Single EURO Payments Area
BIC Bank Identifier Code
KYC Know Your Customer
MNP Mobile Number Portability
AWS Amazon Web Services
DMZ De-Militarized Zone
RDS Relational Database Service (AWS)
REST Representational State Transfer
GMT Greenwich Mean Time
GSMA GSM Association
LEI Legal Entity Identifier

Assumptions

Connectivity, Staging & Production

The TerraPay system is hosted on AWS across regions where available. A send partner connecting to the TerraPay system will connect to the nearest AWS region which is in close proximity to the send partner network. The TerraPay system is hosted as primary (PR) site, disaster recovery (DR) site and geographic redundancy (GR) site. TerraPay will connect to send partner DR and GR systems to ensure service is not impacted when primary site is down.

Send partner systems are allowed access to the TerraPay network through a secure VPN tunnel. This will be set up in both the PR and DR setups. Each of these will have two VPN tunnels, active and standby.

All the API interfaces between TerraPay and send partner will be on HTTPS. TerraPay's inbound APIs are protected with a CA issued SSL certificate. The send partner must also secure a CA issued SSL certificate for all APIs.

Send partners integrate with TerraPay on the EIG (External Interface Gateway) which is hosted in the DMZ (De-Militarized Zone) of the TerraPay network. Access to all inbound and outbound APIs will be provided on the TerraPay staging system for integration testing. After API testing and validations are done then send partners will be migrated to live production systems.

Services

The services offered by the TerraPay system can be broadly classified into:

Remit to Mobile

This service enables the sender to instantly send money to a beneficiary's mobile number. The money is credited to a payment instrument associated with the beneficiary's mobile number. This could be a mobile network operator wallet, a mobile money operator wallet, a bank wallet or a bank account which is mapped to the mobile number. TerraPay automatically routes the transaction through the available payment instrument.

A sender can initiate the money transfer from a mobile wallet, bank account or cash over the counter. This depends on the interfaces provided by the send partner to it's sender.

Remit to Bank

This service enables the sender to send money to a beneficiary's bank account. The money is credited to the beneficiary's bank account.

The sender can initiate the money transfer from a wallet, bank account or cash over the counter. This depends on the interfaces provided by the send partner to it's sender.

TerraPay APIs

This section describes the TerraPay API suite available for integration by a send partner. These APIs allow the send partner to use the services offered by TerraPay as described above. Before getting into the API details, the following section describes in brief the steps that are to be performed to exeucte a remittance transaction.

Basic Transaction Steps

NOTE: All API calls to the TerraPay Network should include the following HTTP Headers

X-USERNAME: "partnerUserName"

X-PASSWORD: "partnerPassWord"

X-DATE: "YYYY-MM-DD HH:mm:ss"

X-ORIGINCOUNTRY: "Country Code in which the transaction is created. ISO Alpha 2 standard"

X-USERNAME, X-PASSWORD (SHA256 encoded) values will be shared with the Partner during the on boarding process on test and production environments separately. Username and Password is always case-insensitive.

Inbound

The Inbound APIs will be used by the send partner to integrate with TerraPay to send transaction requests.

View Account Status

The API verifies two key aspects of beneficiary accounts: their operational status and name matching. It confirms whether the account is active and checks if the beneficiary' name provided matches the name registered to the account. However, this verification is limited to regions where payout partners share detailed account information. In other areas where such data isn't accessible, TerraPay performs basic format validation of account details. This verification process helps the send partner determine if the beneficiary account can successfully receive transfers.

View Account Status of a Mobile Wallet Try it

View Account Status of a Mobile Wallet

curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/+9779840002320/status?bnv=David Robinson' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD:101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'X-DATE: 2017-05-03 11:00:00' \
--header 'X-ORIGINCOUNTRY: US'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/+9779840002320/status?bnv=David Robinson", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/+9779840002320/status?bnv=David Robinson"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request(""GET"", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/+9779840002320/status?bnv=David Robinson")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b
")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/+9779840002320/status?bnv=David Robinson")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b
"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response:

{
    "status":"available", 
    "subStatus":"6000:Beneficiary MSISDN Validation Success", 
    "lei":""
}

Failure Response :

{
    "error": 
    {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}
{
    "error": 
    {
        "errorCategory":"businessRule", 
        "errorCode":"6008", 
        "errorDescription":"Beneficiary name does not match", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/accounts/msisdn/{msisdn}/status?bnv={beneficiaryName}&provider={provider}&snv={senderName}

HTTP Request

GET /eig/gsma/accounts/msisdn/+234xxxxxxxxx/status?bnv=John%20Smith&provider=23401&snv=David%20Robinson HTTP/1.1

Request Parameters

Parameter Description Data type Requirement Field Length
msisdn Beneficiary MSISDN (mobile number) with country code. This corresponds to the mobile wallet to which funds are to be transferred. e.g. +254xxxxxxxxxx String Mandatory 10-18
bnv Full name of the beneficiary as registered with the wallet provider. This should be the complete name as per the KYC document provided during the registration process. String Mandatory 1-50
snv Full name of the sender as registered with the send partner. This should be the complete name as per the KYC document provided during the registration process. String Optional 1-50
provider This code specifies which mobile wallet provider should handle the transaction. While including this code is optional, it affects how TerraPay processes the transfer. If you don't provide a code, TerraPay will automatically identify which mobile network currently serves that mobile number. The system' search follows a hierarchy: it first looks for wallets operated by mobile network operators (MNOs) and then considers wallets run by other payment service providers (PSPs). If you do specify a provider code, TerraPay checks the mobile number against that specific MNO or PSP records. For mobile network operator codes specifically, the validation will only succeed if the provider code matches the beneficiary' actual mobile network operator.
NOTE: Mandatory for PSP walletes. Optional for MNO wallets.
Numeric Conditional 5-12

View Account Status of a Bank Account Try it

View Account Status of a Bank Account

curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/accounts/232201001617/status?bnv=Devki%20Luggage%20Centre&bankname=Canara%20Bank&country=IN&bankcode=CNRB0000232' \

--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/50100002965304/status?bnv=Deepa%20Jain&bankcode=HDFC0001626&bankname=HDFC%20Bank&country=IN", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/accounts/50100002965304/status?bnv=Deepa%20Jain&bankcode=HDFC0001626&bankname=HDFC%20Bank&country=IN"

payload = ""
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/50100002965304/status?bnv=Deepa%20Jain&bankcode=HDFC0001626&bankname=HDFC%20Bank&country=IN")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/50100002965304/status?bnv=Deepa%20Jain&bankcode=HDFC0001626&bankname=HDFC%20Bank&country=IN")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response:

{
    "status":"available", 
    "subStatus":"6000:Beneficiary Bank Account Validation Success", 
    "lei":""
}

Failure Response :

{
    "error": 
    {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

{
    "error": 
    {
        "errorCategory":"businessRule", 
        "errorCode":"6008", 
        "errorDescription":"Beneficiary name does not match", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/accounts/{accountId}/status?bnv={beneficiaryName}&bankcode={bankcode}&bankname={bankname}&country={country}&msisdn={msisdn}&provider={provider}&snv={sendername}&banksubcode={banksubcode}&accounttype={accounttype}&beneficiaryidtype={beneficiaryidtype}&idnumber={idnumber}

HTTP Request

GET /eig/gsma/accounts/232698745623/status?bnv=John%20Smith&bankcode=CBKEKENX&bankname=CENTRAL%20BANK%20OF%20KENYA&country=US&provider=2549008&snv=David%20Robinson HTTP/1.1

Request Parameters

Parameter Description Data type Requirement Field Length
accountId Beneficiary bank account number or IBAN as required in the destination country for receiving funds. e.g. 2365417895 or AT483200000012345864. String Mandatory 5-50
bnv Full name of the beneficiary as registered with the bank. This should be the complete name as per the KYC document provided during the registration process. String Mandatory 1-50
snv Full name of the sender as registered with the send partner. This should be the complete name as per the KYC document provided during the registration process. String Optional 1-50
bankcode Bank Code as required in the destination Country. It is the IFSC code for India and Swift BIC for all other countries.
Note: Optional only if the account number is an IBAN.
String Conditional 4-25
bankname Full name of the beneficiary bank String Mandatory 4-60
country ISO Alpha 2 country code of the destination country. e.g. NG for Nigeria String Mandatory 2
msisdn Beneficiary mobile number with country code.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 10-18
provider This is a code that indicates the bank to which the transaction is to be sent.This field is conditional.
If not set, then TerraPay will resolve the bank based on the bankcode. If the bankcode is incorrectly provided, then the bank will be resolved based on bank name (should match exactly as per the bank list shared by TerraPay over API). If these parameters do no match then the transaction will be rejected.
If set, then TerraPay will resolve the bank based on the provider code.
Note: Mandatory/Optional requirement of this field is destination country specific.
Numeric Conditional 7-12
banksubcode This is a code that indicates the branch code of the specific bank to which the transaction is to be sent. This could be the routing number, routing coe, sort code as requierd in the destination country.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 11
accounttype Type of the bank account. Supported account types:
Checking
Savings
The default account type for p2p transactions is Savings.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 5
beneficiaryidtype Beneficiary' Id document type. String Optional 3
idnumber Beneficiary' Id document number. String Optional 5

Response Parameters

Parameter Description Data type Validation
status Indicates the status of the account. If 'available' then the account can receive funds. If not then transactions sent to the account will fail. String Enumeration = available, unavailable, unregistered
subStatus Property can be used to return a provider-specific status for the account. String
lei Indicates the Legal Entity Identifier of the organization holding the account. String

View Account Status of a card (PAN) Try it

View Account Status of a Card (PAN)

curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/accounts/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=PH' \

--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-PAN: O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1+OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+2t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw==' \
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("X-PAN", "O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1+OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+2t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw==");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=PH;", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/accounts/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=PH;"

payload = ""
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}
'X-PAN': 'O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1+OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+2t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw=='
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=IN&")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("X-PAN", "O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw==")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=IN&")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["X-PAN"] = "O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw=="

response = https.request(request)
puts response.read_body

Success Response:

{
    "status":"available", 
    "subStatus":"6000:Validation Success", 
    "lei":""
}

Failure Response :

{
    "error": 
    {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

{
    "error": 
    {
        "errorCategory":"businessRule", 
        "errorCode":"6008", 
        "errorDescription":"Beneficiary name does not match", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/accounts/pan/status?bnv={beneficiaryName}&country={country}&

HTTP Request

GET /eig/gsma/accounts/pan/status?bnv=MAGALI%20DOLORES%20ORTIZ&country=PH; HTTP/1.1
X-PAN: O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw==

Request Parameters

Parameter Description Data type Requirement Field Length
bnv Full name of the beneficiary as displayed on the card and as registered with the card issuer. String Mandatory 1-50
msisdn Beneficiary mobile number with country code.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 10-18
country ISO Alpha 2 country code of the destination country. e.g. NG for Nigeria String Mandatory 2
X-PAN This is the beneficiary' card number, PAN (Primary Account number) to which the funds are to be credited. The PAN should always be ecnrypted and never transmitted in plain text or maseked.. TerraPay will provide a public key using which the send partner will encrypt the PAN using RSA/ECB/OAEPWithSHA-256AndMGF1Padding algorithm. String Mandatory 512-1024

Response Parameters

Parameter Description Data type Validation
status Indicates the status of the account. If 'available' then the account can receive funds. If not then transactions sent to the account will fail. String Enumeration = available, unavailable, unregistered
subStatus Property can be used to return a provider-specific status for the account. String
lei Indicates the Legal Entity Identifier of the organization holding the account. String

Create a Quotation

The quotations API is used to request for a foreign exchange rate between a currency pair. The rate applied depends on the type of transaction and the instrument to which the payout is being made.
Depending on the send partner setup on the TerraPay system a p2p transaction may have a different rate than a p2b or a b2b transaction. Similarly the rate may vary between payout to a WALLET or BANK_AC.
Ensure the correct transaction type and instrument is selected while making this API call. Transaction requests will be rejected if the request for quote differs from the actual transaction payout parameters. For example if you request for a BANK_AC quote but then use the quote to send a WALLET transaction, TerraPay will reject the transaction.

URI format is: /quotations

Create a QuotationTry it

Create a Quotation to Mobile Wallet

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/quotations' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw '{
"requestDate": "2020-01-02 10:51:16",
"type": "p2p",
   "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"

    }
  ],
   "creditParty": [
   {
     "key": "instrumentType",
     "value": "WALLET",             
   },
  {
    "key": "receivingCountry",
    "value": "UG"
  },
  {
   "key": "msisdn",
   "value": "+256897378380"
  }
  ],
  "requestAmount": "100",
  "requestCurrency": "USD",
   "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "UGX"
    }
  ]
 }
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "WALLET"
    },
    {
      "key": "receivingCountry",
      "value": "UG"
    },
    {
      "key": "msisdn",
      "value": "+256897378380"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "NPR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "NPR"
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/quotations", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/quotations"

payload = json.dumps({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "WALLET"
    },
    {
      "key": "receivingCountry",
      "value": "UG"
    },
    {
      "key": "msisdn",
      "value": "+256897378380"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "NPR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "NPR"
    }
  ]
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"requestDate\": \"2017-06-20 12:27:16\",\r\n    \"type\": \"p2p\",\r\n    \"debitParty\": [\r\n        {\r\n            \"key\": \"msisdn\",\r\n            \"value\": \"+9779840002320\"\r\n        }\r\n    ], "{\r\n        \"creditParty\": [\r\n        {\r\n            \"key\": \"instrumentType\",\r\n            \"value\": \"WALLET\"\r\n,\r\n            \"key\": \"receivingCountry\",\r\n            \"value\": \"UG\"\r\n,,\r\n            \"key\": \"msisdn\",\r\n            \"value\": \"+256897378380\"\r\n        }\r\n    ],\r\n    \"requestAmount\": \"500\",\r\n    \"requestCurrency\": \"NPR\",\r\n    \"quotes\": [\r\n        {\r\n            \"sendingCurrency\": \"USD\",\r\n            \"receivingCurrency\": \"NPR\"\r\n        }\r\n    ]\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+9779840002320"
    }
  ],
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "WALLET"
    },
    {
      "key": "receivingCountry",
      "value": "UG"
    },
    {
      "key": "msisdn",
      "value": "+256897378380"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "NPR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "NPR"
    }
  ]
})

response = https.request(request)
puts response.read_body

Success Response:

{
    "requestDate": "2017-05-03 11:00:00",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+4491509874561"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+25691508523697"
        }
    ],
    "requestAmount": "100",
    "requestCurrency": "USD",
    "quotes": [
        {
            "quoteId": "QT037fQXs3LGWXea4",
            "quoteExpiryTime": "2017-05-03 11:28:00",
            "sendingAmount": "100.000000",
            "sendingCurrency": "USD",
            "receivingAmount": "365217",
            "receivingCurrency": "UGX",
            "fxRate": "3652.173913"
        }
    ],
    "quotationReference": "QT037fQXs3LGWXea4",
    "quotationStatus": "2000:Quote Success"
}

Failure Response :

{
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.",
        "errorDateTime":"2017-05-02 11:00:00" 
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2001", 
        "errorDescription":"Source amount is invalid",
        "errorDateTime":"2017-05-02 11:00:00" 
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2003", 
        "errorDescription":"Failed to get Forex rate",
        "errorDateTime":"2017-05-02 11:00:00" 
    }
}

Create a Quotation to Bank Account

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/quotations'\
--header 'X-DATE: 2020-01-02 10:51:16'\
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD:   101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw '{
  "requestDate": "2017-05-03 11:00:00",
  "type": "p2p",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+4491509874561"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+25691508523697"
        },
        {
            "key": "bankaccountno",
            "value": "2356915085237"
        },
      {
            "key": "instrumentType",
            "value": "BANK_AC"
        },
        {
            "key": "receivingCountry",
            "value": "NG"
        }
    ],
    "requestAmount": "100",
    "requestCurrency": "EUR",
    "quotes": [
        {
            "sendingCurrency": "EUR",
            "receivingCurrency": "UGX"
        }
    ]    
}
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+25691508523697"
    },
    {
      "key": "bankaacountno",
      "value": "2356915085237"
    },
    {
      "key": "intrumentType",
      "value": "BANK_AC"
    },
    {
      "key": "receivingCountry",
      "value": "NG"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "INR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "INR"
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/quotations", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/quotations"

payload = json.dumps({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+2356915085237"
    },
    {
      "key": "bankaccountno",
      "value": "2356915085237"
    },
    {
      "key": "instrumentType",
      "value": "BANK_AC"
    },
    {
      "key": "receivingCountry",
      "value": "NG"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "INR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "INR"
    }
  ]
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"requestDate\": \"2017-06-20 12:27:16\",\r\n    \"type\": \"p2p\",\r\n    \"debitParty\": [\r\n        {\r\n\t\t  \"key\": \"msisdn\",\r\n\t\t  \"value\": \"+4491509874561\"\r\n\t\t}\r\n    ],\r\n    \"creditParty\": [\r\n        {\r\n\t\t  \"key\": \"msisdn\",\r\n\t\t  \"value\": \"+25691508523697\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"key\": \"bankaccountno\",\r\n\t\t\t\"value\": \"2356915085237\"\r\n\t\t}},\r\n\t\t{\r\n\t\t\t\"key\": \"intrumentType\",\r\n\t\t\t\"value\": \"BANK_AC\"\r\n\t\t}},\r\n\t\t{\r\n\t\t\t\"key\": \"receivingCountry\",\r\n\t\t\t\"value\": \"NG\"\r\n\t\t}\r\n    ],\r\n    \"requestAmount\": \"500\",\r\n    \"requestCurrency\": \"INR\",\r\n    \"quotes\": [\r\n        {\r\n            \"sendingCurrency\": \"USD\",\r\n            \"receivingCurrency\": \"INR\"\r\n        }\r\n    ]\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    },
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+25691508523697"
    },
    {
      "key": "bankaccountno",
      "value": "2346915085237"
    },
    {
      "key": "instrumentType",
      "value": "BANK_AC"
    },    
    {
      "key": "receivingCountry",
      "value": "NG"
    }
  ],
  "requestAmount": "500",
  "requestCurrency": "INR",
  "quotes": [
    {
      "sendingCurrency": "USD",
      "receivingCurrency": "INR"
    }
  ]
})

response = https.request(request)
puts response.read_body

Success Response:

{
    "requestDate": "2017-05-03 11:00:00",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+4491509874561"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+25691508523697"
        },
        {
            "key": "bankaccountno",
            "value": "2356915085237"
        },
        {
            "key": "receivingCountry",
            "value": "UG"
        }
    ],
    "requestAmount": "100",
    "requestCurrency": "EUR",
    "quotes": [
        {
            "quoteId": "QT037fQXs3LGWXea4",
            "quoteExpiryTime": "2017-05-03 11:28:00",
            "sendingAmount": "100.000000",
            "sendingCurrency": "EUR",
            "receivingAmount": "365217",
            "receivingCurrency": "UGX",
            "fxRate": "3652.173913"
        }
    ],
    "quotationReference": "QT037fQXs3LGWXea4",
    "quotationStatus": "2000:Quote Success"
}

Failure Response :

{
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.",
        "errorDateTime":"2017-05-02 11:00:00"
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2001", 
        "errorDescription":"Source amount is invalid",
        "errorDateTime":"2017-05-02 11:00:00" 
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2003", 
        "errorDescription":"Failed to get Forex rate",
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/quotations

HTTP Request

POST /eig/gsma/quotations HTTP/1.1

Create a Quotation to PAN

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/quotations'\
--header 'X-DATE: 2020-01-02 10:51:16'\
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD:   101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw '{
 "requestDate": "2017-05-03 11:00:00",
  "type": "p2p",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+4491509874561"
        }
    ],
    "creditParty": [
        {
            "key": "instrumentType",
            "value": "CARD"
        },
        {
            "key": "receivingCountry",
            "value": "UG"
        }
    ],
    "requestAmount": "100",
    "requestCurrency": "EUR",
    "quotes": [
        {
            "sendingCurrency": "EUR",
            "receivingCurrency": "UGX"
        }
    ]    
}
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+449150987456",
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "CARD"
    },
    {
  "requestAmount": "500",
  "requestCurrency": "EUR",
  "quotes": [
    {
      "sendingCurrency": "EUR",
      "receivingCurrency": "UGX"
    }
  ]
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/quotations", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/quotations"

payload = json.dumps({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "CARD"
    },
    {
  "requestAmount": "100",
  "requestCurrency": "EUR",
  "quotes": [
    {
      "sendingCurrency": "EUR",
      "receivingCurrency": "UGX"
    }
  ]
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'UK',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"requestDate\": \"2017-06-20 12:27:16\",\r\n    \"type\": \"p2p\",\r\n    \"debitParty\": [\r\n        {\r\n\t\t  \"key\": \"msisdn\",\r\n\t\t  \"value\": \"+4491509874561\"\r\n\t\t},\"creditParty\": [\r\n        {\r\n\t\t  \"key\": \"instrumentType\",\r\n\t\t  \"value\": \CARD\"\r\n\t\t},\r\n    \"requestAmount\": \"100\",\r\n    \"requestCurrency\": \"EUR\",\r\n    \"quotes\": [\r\n        {\r\n            \"sendingCurrency\": \"EUR\",\r\n            \"receivingCurrency\": \"UGX\"\r\n        }\r\n    ]\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "UK")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/quotations")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "requestDate": "2017-06-20 12:27:16",
  "type": "p2p",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    },
    {
  "creditParty": [
    {
      "key": "instrumentType",
      "value": "CARD"
    }
  ],
  "requestAmount": "100",
  "requestCurrency": "EUR",
  "quotes": [
    {
      "sendingCurrency": "EUR>,
      "receivingCurrency": "UGX"
    }
  ]
})

response = https.request(request)
puts response.read_body

Success Response:

{
    "requestDate": "2017-05-03 11:00:00",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+4491509874561"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+25691508523697"
        },
        {
            "key": "bankaccountno",
            "value": "2356915085237"
        },
        {
            "key": "receivingCountry",
            "value": "NG"
        }
    ],
    "requestAmount": "100",
    "requestCurrency": "EUR",
    "quotes": [
        {
            "quoteId": "QT037fQXs3LGWXea4",
            "quoteExpiryTime": "2017-05-03 11:28:00",
            "sendingAmount": "100.000000",
            "sendingCurrency": "EUR",
            "receivingAmount": "365217",
            "receivingCurrency": "UGX",
            "fxRate": "3652.173913"
        }
    ],
    "quotationReference": "QT037fQXs3LGWXea4",
    "quotationStatus": "2000:Quote Success"
}

Failure Response :

{
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.",
        "errorDateTime":"2017-05-02 11:00:00"
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2001", 
        "errorDescription":"Source amount is invalid",
        "errorDateTime":"2017-05-02 11:00:00" 
    }
}
{
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"2003", 
        "errorDescription":"Failed to get Forex rate",
        "errorDateTime":"2017-05-02 11:00:00"
    }
}


URL

https://uat-connect.terrapay.com:21211/eig/gsma/quotations

HTTP Request

POST /eig/gsma/quotations HTTP/1.1

Quotations v2

The quotations V2 API is used to request a foreign exchange rate between a currency pair for a specific transaction type (e.g., p2p, p2b, b2p, b2b), instrument type (e.g., BANK, WALLET, CARD) to which the payout is being made, and a specific scheme (e.g., VISA, MC, UP for CARD).

Depending on the send partner, rates on the TerraPay system may vary based on the following:

  1. Transaction type: A p2p transaction may have a different rate than a p2b or a b2b transaction.
  2. Payout instrument: Payout to a WALLET, BANK_AC, or CARD may have different rates.
  3. Scheme: For transactions to Pakistan, rates may vary for PRI scheme. The NON PRI scheme, which is default, may have a different rate.
    For CARD transactions, rates will vary based on the scheme like VISA, MASTER CARD, UNIONPAY.
    For Bangladesh bank transactions only, NPSB scheme is allowed for quote transactions.

URL:

https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations

Request for Bank


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "type": "",
       "scheme": "",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "bankaccountno",
               "value": "4439401218130"
           },
           {
               "key": "msisdn",
               "value": "+8801719819439"
           },
           {
               "key": "instrumentType",
               "value": "BANK_AC"
           },
           {
               "key": "organisationid",
               "value": "DUTCH BANGLA BANK LIMITED"
           },
           {
               "key": "banksubcode",
               "value": "88001"
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "type": "",
        "scheme": "",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "bankaccountno",
                "value": "4439401218130"
            },
            {
                "key": "msisdn",
                "value": "+8801719819439"
            },
            {
                "key": "instrumentType",
                "value": "BANK_AC"
            },
            {
                "key": "organisationid",
                "value": "DUTCH BANGLA BANK LIMITED"
            },
            {
                "key": "banksubcode",
                "value": "88001"
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"type\": \"\",
          \"scheme\": \"\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "bankaccountno", "value": "4439401218130"}, {
              "key": "msisdn", "value": "+8801719819439"}, {
              "key": "instrumentType", "value": "BANK_AC"}, {
              "key": "organisationid", "value": "DUTCH BANGLA BANK LIMITED"}, {
              "key": "banksubcode", "value": "88001"}, {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"bankaccountno\", \"value\": \"4439401218130\"}, {\"key\": \"msisdn\", \"value\": \"+8801719819439\"}, {\"key\": \"instrumentType\", \"value\": \"BANK_AC\"}, {\"key\": \"organisationid\", \"value\": \"DUTCH BANGLA BANK LIMITED\"}, {\"key\": \"banksubcode\", \"value\": \"88001\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
          
      require "uri"
      require "net/http"
      
      url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
      
      https = Net::HTTP.new(url.host, url.port)
      https.use_ssl = true
      
      request = Net::HTTP::Post.new(url)
      request["X-USERNAME"] = "terrapayuser"
      request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
      request["X-DATE"] = "2020-01-02 10:51:16"
      request["X-ORIGINCOUNTRY"] = "US"
      request["Content-Type"] = "application/json"
      request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"bankaccountno\", \"value\": \"4439401218130\"}, {\"key\": \"msisdn\", \"value\": \"+8801719819439\"}, {\"key\": \"instrumentType\", \"value\": \"BANK_AC\"}, {\"key\": \"organisationid\", \"value\": \"DUTCH BANGLA BANK LIMITED\"}, {\"key\": \"banksubcode\", \"value\": \"88001\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
      
      response = https.request(request)
      puts response.read_body
          
      

Success Response:

{
  "requestDate": "2024-21-06 01:00:00",
  "debitParty": [
      {
          "key": "msisdn",
          "value": "+4491509874561"
      } 
  ],
  "creditParty": [
      {
          "key": "msisdn",
          "value": ""
      }
  ],
  "requestAmount": "1000",
  "requestCurrency": "BDT",
  "quotes": [
      {
          "quoteId": "QR00IK2LJAVZZEYE9",
          "quoteExpiryTime": "2025-02-11 02:30:26",
          "sendingAmount": "10.526316",
          "sendingCurrency": "USD",
          "receivingAmount": "1000.00",
          "receivingCurrency": "BDT",
          "fxRate": "95.000000",
          "scheme": "",
          "type": "p2p",
          "instrumentType": "B",
      }
  ],
  "quotationReference": "QR00IK2LJAVZZEYE9",
  "quotationStatus": "2000:Quote Success" 
}

Request for Wallet


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "type": "",
       "scheme": "",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "bankaccountno",
               "value": "4439401218130"
           },
           {
               "key": "msisdn",
               "value": "+8801719819439"
           },
           {
               "key": "instrumentType",
               "value": "WALLET"
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "type": "",
        "scheme": "",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "bankaccountno",
                "value": "4439401218130"
            },
            {
                "key": "msisdn",
                "value": "+8801719819439"
            },
            {
                "key": "instrumentType",
                "value": "WALLET"
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"type\": \"\",
          \"scheme\": \"\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "bankaccountno", "value": "4439401218130"}, {
              "key": "msisdn", "value": "+8801719819439"}, {
              "key": "instrumentType", "value": "WALLET"}, {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"bankaccountno\", \"value\": \"4439401218130\"}, {\"key\": \"msisdn\", \"value\": \"+8801719819439\"}, {\"key\": \"instrumentType\", \"value\": \"WALLET\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
require "uri"
        require "net/http"
        
        url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
        
        https = Net::HTTP.new(url.host, url.port)
        https.use_ssl = true
        
        request = Net::HTTP::Post.new(url)
        request["X-USERNAME"] = "terrapayuser"
        request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
        request["X-DATE"] = "2020-01-02 10:51:16"
        request["X-ORIGINCOUNTRY"] = "US"
        request["Content-Type"] = "application/json"
        request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"bankaccountno\", \"value\": \"4439401218130\"}, {\"key\": \"msisdn\", \"value\": \"+8801719819439\"}, {\"key\": \"instrumentType\", \"value\": \"WALLET\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
        
        response = https.request(request)
        puts response.read_body
        
        

Success Response:

{
  "requestDate": "2024-21-06 01:00:00",
  "debitParty": [
      {
          "key": "msisdn",
          "value": "+4491509874561"
      } 
  ],
  "creditParty": [
      {
          "key": "msisdn",
          "value": ""
      }
  ],
  "requestAmount": "1000",
  "requestCurrency": "BDT",
  "quotes": [
      {
          "quoteId": "QR00IK2LJAVZZEYE9",
          "quoteExpiryTime": "2025-02-11 02:30:26",
          "sendingAmount": "10.526316",
          "sendingCurrency": "USD",
          "receivingAmount": "1000.00",
          "receivingCurrency": "BDT",
          "fxRate": "95.000000",
          "scheme": "",
          "type": "p2p",
          "instrumentType": "W",
      }
  ],
  "quotationReference": "QR00IK2LJAVZZEYE9",
  "quotationStatus": "2000:Quote Success" 
}

Negative Test Case 1 (Below is the request and response for a negative test case where only the instrument_type is sent, without scheme or pan.)


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "type": "",
       "scheme": "",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "instrumentType",
               "value": "CARD"
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "type": "",
        "scheme": "",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "instrumentType",
                "value": "CARD"
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"type\": \"\",
          \"scheme\": \"\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "instrumentType", "value": "CARD"}, {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
require "uri"
        require "net/http"
        
        url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
        
        https = Net::HTTP.new(url.host, url.port)
        https.use_ssl = true
        
        request = Net::HTTP::Post.new(url)
        request["X-USERNAME"] = "terrapayuser"
        request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
        request["X-DATE"] = "2020-01-02 10:51:16"
        request["X-ORIGINCOUNTRY"] = "US"
        request["Content-Type"] = "application/json"
        request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
        
        response = https.request(request)
        puts response.read_body
        
        

Response:

      {
      "error": {
          "errorCategory": "businessRule",
          "errorCode": "2012",
          "errorDescription": "Scheme or pan is mandatory",
          "errorDateTime": "2025-02-12 13:04:31 GMT"
      }
      }
      
    

Negative Test Case 2 (Below is the request and response for Sending different pan and scheme in the request buffers.)


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "type": "",
       "scheme": "VISA",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "instrumentType",
               "value": "CARD"
           },
           {
               "key": "pan",
               "value": ""
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "type": "",
        "scheme": "VISA",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "instrumentType",
                "value": "CARD"
            },
            {
                "key": "pan",
                "value": ""
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"type\": \"\",
          \"scheme\": \"VISA\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "instrumentType", "value": "CARD"},{
              "key": "pan", "value": ""} {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"VISA\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"},{\"key\": \"pan\", \"value\": \"\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
require "uri"
        require "net/http"
        
        url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
        
        https = Net::HTTP.new(url.host, url.port)
        https.use_ssl = true
        
        request = Net::HTTP::Post.new(url)
        request["X-USERNAME"] = "terrapayuser"
        request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
        request["X-DATE"] = "2020-01-02 10:51:16"
        request["X-ORIGINCOUNTRY"] = "US"
        request["Content-Type"] = "application/json"
        request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"VISA\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"},{\"key\": \"pan\", \"value\": \"\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
        
        response = https.request(request)
        puts response.read_body
        
        

Response:

      {
      "error": {
          "errorCategory": "businessRule",
          "errorCode": "2014",
          "errorDescription": "Scheme mismatch",
          "errorDateTime": "2025-02-12 13:08:13 GMT"
      }
      }
      
    

Success Test Case 3 (only scheme is present for card flow.)


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "type": "",
       "scheme": "MC",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "instrumentType",
               "value": "CARD"
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "type": "",
        "scheme": "MC",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "instrumentType",
                "value": "CARD"
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"type\": \"\",
          \"scheme\": \"MC\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "instrumentType", "value": "CARD"}, {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"MC\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
require "uri"
        require "net/http"
        
        url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
        
        https = Net::HTTP.new(url.host, url.port)
        https.use_ssl = true
        
        request = Net::HTTP::Post.new(url)
        request["X-USERNAME"] = "terrapayuser"
        request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
        request["X-DATE"] = "2020-01-02 10:51:16"
        request["X-ORIGINCOUNTRY"] = "US"
        request["Content-Type"] = "application/json"
        request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"type\": \"\",\n  \"scheme\": \"MC\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
        
        response = https.request(request)
        puts response.read_body
        
        

Response:

{
  "requestDate": "2020-01-02 10:51:16",
  "debitParty": [
      {
          "key": "msisdn",
          "value": "+8613919324725"
      } 
  ],
  "creditParty": [
      {
          "key": "msisdn",
          "value": ""
      }
  ],
  "requestAmount": "10",
  "requestCurrency": "PKR",
  "quotes": [
      {
          "quoteId": "QR00IK3QJ3AERJC20",
          "quoteExpiryTime": "2025-02-12 18:11:44",
          "sendingAmount": "0.158730",
          "sendingCurrency": "USD",
          "receivingAmount": "10.00",
          "receivingCurrency": "PKR",
          "fxRate": "63.000000",
          "scheme": "MC",
          "type": "",
          "instrumentType": "C",
      }
  ],
  "quotationReference": "QR00IK3QJ3AERJC20",
  "quotationStatus": "2000:Quote Success " 
}

Success Test Case 4 (only pan is present for card flow.)


    curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations' \
    --header 'X-DATE: 2020-01-02 10:51:16' \
    --header 'X-ORIGINCOUNTRY: US' \
    --header 'X-USERNAME: terrapayuser' \
    --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
    --header 'Content-Type: application/json' \
    --data-raw 
    {
       "requestDate": "2020-01-02 10:51:16",
       "debitParty": [
           {
               "key": "msisdn",
               "value": "+4491509874561"
           }
       ],
       "creditParty": [
           {
               "key": "instrumentType",
               "value": "CARD"
           },
           {
               "key": "pan",
               "value": ""
           },
           {
               "key": "receivingCountry",
               "value": "BD"
           }
       ],
       "requestAmount": "1000",
       "requestCurrency": "BDT",
       "quotes": [
           {
               "sendingCurrency": "USD",
               "receivingCurrency": "BDT"
           }
       ]
    }
    
var myHeaders = new Headers();
      myHeaders.append("X-USERNAME", "terrapayuser");
      myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
      myHeaders.append("X-DATE", "2020-01-02 10:51:16");
      myHeaders.append("X-ORIGINCOUNTRY", "US");
      myHeaders.append("Content-Type", "application/json");
      
      var raw = '{
        "requestDate": "2020-01-02 10:51:16",
        "debitParty": [
            {
                "key": "msisdn",
                "value": "+4491509874561"
            }
        ],
        "creditParty": [
            {
                "key": "instrumentType",
                "value": "CARD"
            },
            {
                "key": "pan",
                "value": ""
            },
            {
                "key": "receivingCountry",
                "value": "BD"
            }
        ],
        "requestAmount": "1000",
        "requestCurrency": "BDT",
        "quotes": [
            {
                "sendingCurrency": "USD",
                "receivingCurrency": "BDT"
            }
        ]
    }';
      
      var requestOptions = {
        method: 'POST',
        headers: myHeaders,
        body: raw,
        redirect: 'follow'
      };
      
      fetch("https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations", requestOptions)
        .then(response => response.text())
        .then(result => console.log(result))
        .catch(error => console.log('error', error));
      
import requests
  
        url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"
        
        payload = "{
          \"requestDate\": \"2020-01-02 10:51:16\",
          \"debitParty\": [{"key": "msisdn", "value": "+4491509874561"}],
          \"creditParty\": [{
              "key": "instrumentType", "value": "CARD"},{
              "key": "pan", "value": ""} {
              "key": "receivingCountry", "value": "BD"}],
          \"requestAmount\": \"1000\",
          \"requestCurrency\": \"BDT\",
          \"quotes\": [{"sendingCurrency": "USD", "receivingCurrency": "BDT"}]
        }"
        headers = {
          'X-USERNAME': 'terrapayuser',
          'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
          'X-DATE': '2020-01-02 10:51:16',
          'X-ORIGINCOUNTRY': 'US',
          'Content-Type': 'application/json'
        }
        
        response = requests.request("POST", url, headers=headers, data=payload)
        
        print(response.text)
        
OkHttpClient client = new OkHttpClient().newBuilder()
        .build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType, "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"},{\"key\": \"pan\", \"value\": \"\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}");
        Request request = new Request.Builder()
          .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
          .method("POST", body)
          .addHeader("X-USERNAME", "terrapayuser")
          .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
          .addHeader("X-DATE", "2020-01-02 10:51:16")
          .addHeader("X-ORIGINCOUNTRY", "US")
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
        
require "uri"
        require "net/http"
        
        url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
        
        https = Net::HTTP.new(url.host, url.port)
        https.use_ssl = true
        
        request = Net::HTTP::Post.new(url)
        request["X-USERNAME"] = "terrapayuser"
        request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
        request["X-DATE"] = "2020-01-02 10:51:16"
        request["X-ORIGINCOUNTRY"] = "US"
        request["Content-Type"] = "application/json"
        request.body = "{\n  \"requestDate\": \"2020-01-02 10:51:16\",\n  \"debitParty\": [{\"key\": \"msisdn\", \"value\": \"+4491509874561\"}],\n  \"creditParty\": [{\"key\": \"instrumentType\", \"value\": \"CARD\"},{\"key\": \"pan\", \"value\": \"\"}, {\"key\": \"receivingCountry\", \"value\": \"BD\"}],\n  \"requestAmount\": \"1000\",\n  \"requestCurrency\": \"BDT\",\n  \"quotes\": [{\"sendingCurrency\": \"USD\", \"receivingCurrency\": \"BDT\"}]\n}"
        
        response = https.request(request)
        puts response.read_body
        
        

Response:

{
  "requestDate": "2020-01-02 10:51:16",
  "type": "",
  "scheme": "",
  "debitParty": [
      {
          "key": "msisdn",
          "value": "+8613919324725"
      } 
  ],
  "creditParty": [
      {
          "key": "msisdn",
          "value": ""
      }
  ],
  "requestAmount": "10",
  "requestCurrency": "PKR",
  "quotes": [
      {
          "quoteId": "QR00IK3QKM6EMFW17",
          "quoteExpiryTime": "2025-02-12 18:12:58",
          "sendingAmount": "0.158730",
          "sendingCurrency": "USD",
          "receivingAmount": "10.00",
          "receivingCurrency": "PKR",
          "fxRate": "63.000000",
          "scheme": "",
          "type": "",
          "instrumentType": "C",
      }
  ],
  "quotationReference": "QR00IK3QKM6EMFW17",
  "quotationStatus": "2000:Quote Success" 
}

Quotations Parameters

Request Parameters

Parameter Description Data type Requirement Field Length
requestDate The date and time when this request is made. Format as YYYY-MM-DD HH:mm:ss DateTime Mandatory 19
requestAmount Requested quotation amount with precision of upto 6 decimal places. The number of decimal places is based on ISO 4217 standards for each destination country. String Mandatory 10,6
requestCurrency Currency of the requestAmount provided in 3-letter ISO-4217 format.

If the requestCurrency is the same as the sending currency, then the requestAmount is taken as source amount and a forward quote is done so that the quote amount returned will be what the beneficiary will receive.

If the requestCurrency is the same as the receiving currency, then the requestAmount is taken as destination amount what the beneficiary wil receive and a reverse quote is done so that the quote amount returned will be what the sender has to pay.
String Mandatory 3
type The transaction type for which this quote is being requested. Values to be one of p2p, p2b, b2b, b2p

p2p (person to person)
p2b (person to business)
b2p (business to person)
b2b (business to business)
Note: This value is optional for all p2p transactions. For the rest it is mandatory. The foreign exchange rate applied might vary depending on the transaction type.
String Optional 3
scheme For Pakistan banks and wallets:PRI (Priority Routing Indicator) is allowed.
For Cards: VISA, MC, UP (Visa, MasterCard, UnionPay). No default scheme for card.
If scheme is not provided, pan will be used to identify the scheme for CARD payouts, and for Pakistan bank and wallets the NON-PRI scheme will be used.
For Bangladesh bank transactions only, NPSB scheme is allowed for quote transactions.
In all other cases this parameter will not be applicable unless specified.
Note: This is mandatory for version 2 and optional for version 1.
String Conditional 2-5
debitParty:
key msisdn String Optional 6
value Sender mobile number with country code. e.g.+254123456789 String Optional 10-18
creditParty :
key msisdn String Conditional 6
value Beneficiary mobile number with country code. e.g.+254123456789.
This key value pair is not required if the receivingCountry is specified and the instrument type is set to WALLET.
String Conditional 10-18
key bankaccountno String Conditional 13
Value Beneficiary bank account number or IBAN as required in the destination country for receiving funds. e.g. 2365417895 or AT483200000012345864.
This key value pair is not required if the receivingCountry is specified and the instrument value is set to BANK_AC.
String Conditional 5-50
key receivingCountry String Mandatory 16
Value Destination country in ISO Alpha 2 format where the payout to beneficiary is required.For example to payout to India use IN. String Mandatory 2
key instrumentType String Mandatory 14
Value Specifies the beneficiary instrument to which the payout is to be made. Values to be one of BANK_AC, WALLET or CARD
WALLET - Indicates payout to WALLET
BANK_AC - Indicates payout to BANK
CARD - Indicates payout to CARD

When not specified for BANK/WALLET, system will identify based on the credit party parameters in the request.
String Mandatory 4-10
key pan String Conditional 3
Value Beneficiary card number (PAN) which is to be encrypted with an RSA/ECB/OAEPWithSHA-256AndMGF1Padding algorithm. TerraPay will issue a public RSA key to the partner for this PAN encryption. Mandatory for CARD payouts. Optional for WALLET and BANK_AC.
Note: This is only applicable for version 2
String Conditional 512-1024
quotes :
sendingCurrency Currency of the source amount in 3-letter ISO-4217 format. String Mandatory 3
receivingCurrency Currency of the payout amount in 3-letter ISO-4217 format. String Mandatory 3

Response Parameters

Parameter Description Data Type
requestDate The date and time as set in the request API String
requestAmount Requested quotation amount as set in the request API String
requestCurrency Request currency as set in the request API String
debitParty:
key msisdn String
value Sender Mobile Number as set in the request API String
creditParty :
key msisdn String
value Beneficiary Mobile Number as set in the request API String
key bankaccountno String
value Beneficiary bank account as set in the request API String
key receivingCountry String
value Destination country as as set in the request API String
quotes: The quotation object which has the foreign exchange rate and the source and destination amounts. The quotation reference should be used in the transaction as an acceptance of the foreign exchange rate.
quoteId The unique id generated for this quotation request. This id is to be used in the create transaction request. String
quoteExpiryTime Expiry of this quote reference in minutes String
sendingAmount Amount that will settled by the send partner with TerraPay String
sendingCurrency Currency in which the send partner will settle with TerraPay String
receivingAmount Amount that will be paid out to the beneficiary. TerraPay will round up the payable amount with a decimal precision based on the applicable round off rules. The round of rules are country and currency specific. String
receivingCurrency Currency in which the beneficiary will be paid out String
fxRate Foreign Exchange rate applied on the quote including all markups String
quotationReference TerraPay Quote Reference String
quotationStatus Status of the quotation request. Format is ErrorCode:ErrorMessage String

Create a Transaction

The Transaction API is used to initiate a payout to the beneficiary. Prior to calling this API ensure the beneficiary has been validated and a valid quote reference is requested.

URI format is: /transactions

Create a transaction to a Mobile Wallet Try it

Create a transaction to a Mobile Wallet


curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw 
{
   "amount": "100000.01",
   "currency": "NGN",
   "type": "p2p",
   "descriptionText": "Gift for my brother",
   "requestDate": "2017-03-20T06:19:36.969Z",
   "requestingOrganisationTransactionReference": "partnerRefId1234",
   "provider": "23401",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "senderKyc": {
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "gender": "M",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "title": "Mr.",
            "firstName": "Einstein",
            "middleName": "James",
            "lastName": "Bela",
            "fullName": "Einstien James Bela"
        }
    },
    "recipientKyc":{
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "emailAddress": "sample@terrapay.com",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "title": "Mr.",
            "firstName": "Einstein",
            "middleName": "James",
            "lastName": "Bela",
            "fullName": "Einstien James Bela"
        }
    },
    "internationalTransferInformation": {
        "quoteId": "QT037fQXs3LGWXea4",
        "receivingCountry": "NG",
        "remittancePurpose": "Gift",
        "sourceOfFunds": "Salary",
        "relationshipSender": "Brother"
    }
}
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "text/plain");

var raw = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"NPR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId001\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+9779840002320\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender\",\r\n      \"fullName\": \"Test Sender\"\r\n    }\r\n  },\r\n    \" \": {\r\n    \"subjectName\": {\r\n      \"firstName\": \"David\",\r\n      \"lastName\": \"Robinson\",\r\n      \"fullName\": \"David Robinson\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QT037C1NQ6BHMV59A3\",\r\n    \"receivingCountry\": \"NP\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"NPR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId001\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+9779840002320\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender\",\r\n      \"fullName\": \"Test Sender\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {"emailAddress": "sample@terrapay.com","subjectName\": {\r\n      \"firstName\": \"David\",\r\n      \"lastName\": \"Robinson\",\r\n      \"fullName\": \"David Robinson\"\r\n\",\r\n      \"    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QT037C1NQ6BHMV59A3\",\r\n    \"receivingCountry\": \"NP\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'text/plain'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"NPR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId001\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+9779840002320\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender\",\r\n      \"fullName\": \"Test Sender\"\r\n    }\r\n  },\r\n    \"recipientKyc\": {\r\n      \"emailAddress\": \"sample@terrapay.com\",\r\n    \"subjectName\": {\r\n      \"firstName\": \"David\",\r\n      \"lastName\": \"Robinson\",\r\n      \"fullName\": \"David Robinson\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QT037C1NQ6BHMV59A3\",\r\n    \"receivingCountry\": \"NP\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "text/plain")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "text/plain"
request.body = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"NPR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId001\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+9779840002320\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender\",\r\n      \"fullName\": \"Test Sender\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {"emailAddress": "sample@terrapay.com","subjectName\": {\r\n      \"firstName\": \"David\",\r\n      \"lastName\": \"Robinson\",\r\n      \"fullName\": \"David Robinson\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QT037C1NQ6BHMV59A3\",\r\n    \"receivingCountry\": \"NP\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"

response = https.request(request)
puts response.read_body

Success Response:

{
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
   "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionStatus": "3050:Remit Acknowledged.",
    "transactionReference": "TPKM000000056269"  
}

Failure Response :

{
    "serverCorrelationId":"", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"3032", 
        "errorDescription":"Remit Failed.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

Create a transaction to bank Try it

Create a transaction to bank


curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD:101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw 
{
   "amount": "100000.01",
   "currency": "NGN",
   "type": "p2p",
   "descriptionText": null,
   "requestDate": "2017-03-20T06:19:36.969Z",
   "requestingOrganisationTransactionReference": "4119314191318",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+27123456789"
        }
    ],
    "creditParty": [
        {
            "key": "bankaccountno",
            "value": "718530346"
        },
        {
            "key": "sortcode",
            "value": "0001"
        },
        {
            "key": "organisationid",
            "value": "Nu Pagamentos"
        },
        {
            "key": "banksubcode",
            "value": "0001"
        }
    ],
    "senderKyc": {
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "gender": "M",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "title": "Mr.",
            "firstName": "Einstein ",
            "middleName": "James",
            "lastName": "Bela",
            "fullName": "Einstien James Bela"
        }
    },
    "recipientKyc": {
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "emailAddress": "sample@terrapay.com",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "firstName": "John",
            "lastName": "Smith",
            "fullName": "John Dave Smith"
        }
    },
    "internationalTransferInformation": {
        "quoteId": "QT037fQXs3LGWXea4",
        "receivingCountry": "NG",
        "remittancePurpose": "Gift",
        "sourceOfFunds": "Salary",
        "relationshipSender": "Brother"
    }
}
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "text/plain");

var raw = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {"emailAddress": "sample@terrapay.com","subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n\"\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {"emailAddress": "sample@terrapay.com","subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'text/plain'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\": \{r\n    \"emailAddress\": \"sample@terrapay.com\",\r\n    \"subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "text/plain")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "text/plain"
request.body = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\": {"emailAddress": "sample@terrapay.com","subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"

response = https.request(request)
puts response.read_body

Success Response:

{
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionStatus": "3050:Remit Acknowledged.",
    "transactionReference": "TPKM000000056269"  
}

Failure Response :

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"3032", 
        "errorDescription":"Remit Failed.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

Create a transaction to card Try it

Create a transaction to card


curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \
--header 'X-USERNAME: terrapayuser' \
--header 'X-PASSWORD:101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'Content-Type: application/json' \
--data-raw 
{
   "amount": "100000.01",
   "currency": "NGN",
   "type": "p2p",
   "descriptionText": null,
   "requestDate": "2017-03-20T06:19:36.969Z",
   "requestingOrganisationTransactionReference": "4119314191318",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+27123456789"
        }
    ],
    "creditParty": [
            {
            "key": "pan",
            "value": "O+UJqWvJ3YFqUB0hWs3UkCE5/o7LyINi4egxdO8rZUZQjNrUCk+yWoAfKf+ifZSjDaTUd7yGvq2g7RhuRP6p5iWFH6PNCE85fmbi/YTwAxM4lnCMgg5UbrLxB632b1ZvgglboSNmj1VA9XnWOyDWxIsfyD1+OLjxoDBjfU0B2dAh3SJyyOsCjZEfNe+TtH6TygElhSUwBl0WgkRQzicE3GN3qyetIJU2LsXONHMplO3ZXKjGx7NPwtUgL9clXL+t2WFo9Brh9wvaL3X4WtE8teqhryrTjqZ3OvKQgACyYY733sVWlhwV9i2/IPGcPijHQPmrMtT1L7ceL2mVpqckw=="
        },
    ],
    "senderKyc": {
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "gender": "M",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "title": "Mr.",
            "firstName": "Einstein ",
            "middleName": "James",
            "lastName": "Bela",
            "fullName": "Einstien James Bela"
        }
    },
    "recipientKyc": {
        "nationality": "FR",
        "dateOfBirth": "1986-06-28",
        "emailAddress": "sample@terrapay.com",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "FR"
            }
        ],
        "postalAddress": {
            "addressLine1": "49 ",
            "addressLine2": "park street",
            "addressLine3": "waltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "FR"
        },
        "subjectName": {
            "firstName": "John",
            "lastName": "Smith",
            "fullName": "John Dave Smith"
        }
    },
    "internationalTransferInformation": {
        "quoteId": "QT037fQXs3LGWXea4",
        "receivingCountry": "NG",
        "remittancePurpose": "Gift",
        "sourceOfFunds": "Salary",
        "relationshipSender": "Brother"
    }
}
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "text/plain");

var raw = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {"emailAddress": "sample@terrapay.com","sample@terrapay.com\",\r\n        \"subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\":  {
    "emailAddress": "sample@terrapay.com",
    "subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'text/plain'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"50100002965304\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"HDFC Bank\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"HDFC0001626\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\": \{r\n    \"emailAddress\": \"sample@terrapay.com\",\r\n    \"subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n,\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "text/plain")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "text/plain"
request.body = "{\r\n  \"amount\": \"500\",\r\n  \"currency\": \"INR\",\r\n  \"type\": \"p2p\",\r\n  \"descriptionText\": \"Gift for my brother\",\r\n  \"requestDate\": \"2021-05-23 08:19:36\",\r\n  \"requestingOrganisationTransactionReference\": \"SrcTxnId002\",\r\n  \"debitParty\": [\r\n    {\r\n      \"key\": \"msisdn\",\r\n      \"value\": \"+971810456234\"\r\n    }\r\n  ],\r\n  \"creditParty\": [\r\n    {\r\n      \"key\": \"bankaccountno\",\r\n      \"value\": \"\"\r\n    },\r\n    {\r\n      \"key\": \"organisationid\",\r\n      \"value\": \"\"\r\n    },\r\n    {\r\n      \"key\": \"sortcode\",\r\n      \"value\": \"\"\r\n    }\r\n  ],\r\n  \"senderKyc\": {\r\n    \"nationality\": \"AE\",\r\n    \"dateOfBirth\": \"1967-05-28\",\r\n    \"gender\": \"M\",\r\n    \"idDocument\": [\r\n      {\r\n        \"idType\": \"VOTER_CARD\",\r\n        \"idNumber\": \"13321115521\",\r\n        \"issueDate\": \"1967-05-28\",\r\n        \"expiryDate\": \"2067-05-28\",\r\n        \"issuerCountry\": \"AE\"\r\n      }\r\n    ],\r\n    \"postalAddress\": {\r\n      \"addressLine1\": \"49 , park street\",\r\n      \"addressLine2\": \"12\",\r\n      \"addressLine3\": \"12\",\r\n      \"city\": \"12\",\r\n      \"stateProvince\": \"12\",\r\n      \"postalCode\": \"50000\",\r\n      \"country\": \"US\"\r\n    },\r\n    \"subjectName\": {\r\n      \"firstName\": \"Test\",\r\n      \"middleName\": \"\",\r\n      \"lastName\": \"Sender2\",\r\n      \"fullName\": \"Test Sender2\"\r\n    }\r\n  },\r\n    \"recipientKyc\": {\r\n    \"subjectName\": {\r\n      \"firstName\": \"Deepa\",\r\n      \"lastName\": \"Jain\",\r\n      \"fullName\": \"Deepa Jain\"\r\n    }\r\n  },\r\n  \"internationalTransferInformation\": {\r\n    \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n    \"receivingCountry\": \"IN\",\r\n    \"remittancePurpose\": \"Family Maintenance\",\r\n    \"sourceOfFunds\": \"Salary\",\r\n    \"relationshipSender\": \"Brother\"\r\n  }\r\n}"

response = https.request(request)
puts response.read_body

Success Response:

{
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionStatus": "3050:Remit Acknowledged.",
    "transactionReference": "TPKM000000056269"  
}

Failure Response :

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"3032", 
        "errorDescription":"Remit Failed.", 
        "errorDateTime":"2017-05-02 11:00:00"
    }
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

Request Parameters

Parameter Description Data Type Requirement Field Length
requestDate The date and time at which the transaction was created. Format as YYYY-MM-DD HH:mm:ss String Mandatory 19
amount Amount payable to the beneficiary with precision of upto 6 decimal places. The number of decimals that can be paid out is country and currency specific. If the quote API was used then the TerraPay system would have rounded off the payout amount according to the round off rules applicable to each country and currency. String Mandatory 10,6
currency Payout currency in 3-letter ISO-4217 format. String Mandatory 3
type The type of the transaction based on the sender and beneficiary. Values to be one of p2p, p2b, b2b, b2p

p2p (person to person)
p2b (person to business)
b2p (business to person)
b2b (business to business)
String Mandatory 11
descriptionText Free format text description of the transaction provided by the client. TerraPay will pass on this desciption to payout partners via API for use in statements or communication to beneficiaries. String Optional 1-256
requestingOrganisationTransactionReference A unique Transaction reference generated by the sending partner. TerraPay identifies a unique transaction from the send partner based on this reference. If the same transaction is sent with different references, then TerraPay will accept and payout as separate transactions. Duplicate checks and Idempotency will not apply if the unique reference is changed.
Note that all transactions must have a unique transaction ID. If this transaction is being resent to the TerraPay system due to errors or internal retries on the send partner system then it has to be the same unique reference. If the send partner changes this reference then TerraPay will consider and process this transactions a new one. This could lead to duplicate payouts and duplicate debits for the send partner and hence loss of funds.
String Mandatory 4-50
provider This code specifies which mobile wallet provider should handle the transaction. While including this code is optional, it affects how TerraPay processes the transfer. If you don't provide a code, TerraPay will automatically identify which mobile network currently serves that mobile number. The system' search follows a hierarchy: it first looks for wallets operated by mobile network operators (MNOs) and then considers wallets run by other payment service providers (PSPs). If you do specify a provider code, TerraPay checks the mobile number against that specific MNO or PSP records. For mobile network operator codes specifically, the validation will only succeed if the provider code matches the beneficiary' actual mobile network operator.
NOTE: Mandatory for PSP walletes. Optional for MNO wallets.
Should be the same as sent in the validation request. If this changes on the transaction request then the transaction will be rejected.
Numeric Optional 5-12
debitParty:
key msisdn String Mandatory 6
value Sender Mobile Number with country code. e.g. +254123456789 String Mandatory 10-18
key organisationid String Optional 14
value Full name of the send partner entity String Optional 4-60
key bankaccountno String Optional 13
value Sender bank account or IBAN number or masked card number (PAN) String Optional 5-50
creditParty:
key msisdn String Conditional 6
value Beneficiary Mobile Number with country code. e.g. +254123456789
Mandatory for WALLET payouts. Optional for BANK_AC and CARD payouts depending on the payout country.
String Conditional 10-18
key bankaccountno String Conditional 13
value Beneficiary bank account or IBAN number as applicable and required in the destination country for receiving funds. e.g. 2365417895 or AT483200000012345864.
Mandatory for BANK_AC payouts. Optional for WALLET and CARD payouts.
String Conditional 5-50
key accounttype String Optional 11
value Beneficiary bank account type. Supported account types:
Checking
Savings
The default account type for p2p transactions is Savings.
Mandatory in certain payout countries.
String Conditional 0-20
key sortcode String Conditional 8
value IFSC code for bank payouts in India and Swift BIC for all other countries.
Mandatory for BANK_AC payouts. Optional for WALLET and CARD payouts.
String Conditional 4-25
key organisationid String Conditional 14
value Full name of the beneficiary bank
Mandatory for BANK_AC payouts. Optional for WALLET and CARD payouts.
String Conditional 4-60
key banksubcode String Conditional 1-11
value This is branch specific bank codes requried in certail payout countries. e.g. routing number in Bangladesh.
Mandatory for BANK_AC payouts. Optional for WALLET and CARD payouts.
String Conditional 1-10
key pan String Conditional 3-5
value Beneficiary card number (PAN) which is to be encrypted with a RSA/ECB/OAEPWithSHA-256AndMGF1Padding algorithm. TerraPay will issue a public RSA key to the partner for this PAN encryption.
Mandatory for CARD payouts. Optional for WALLET and BANK_AC.
String 512-1024
senderKyc:
nationality Sender's nationality in ISO Alpha-2 format, e.g. US String Mandatory 2
dateOfBirth Sender's date of birth in YYYY-MM-DD format String Mandatory 10
countryOfBirth Sender's country of birth in ISO Alpha-2 format, e.g. US String Optional 10
gender Sender's Gender. Enumeration = (M)ale, (F)emale, (U)nspecified String Optional 1
senderKyc:idDocument:
idType Sender's Id document type: For example nationalidcard, drivinglicense, passport, etc String Mandatory 1-20
idNumber Sender's Id document number. String Mandatory 1-30
issueDate Sender's Id document issue date in YYYY-MM-DD format. String Conditional 10
expiryDate Sender's Id document expiry date in YYYY-MM-DD format. String Mandatory 10
issuerCountry The country where the Id document was issued in ISO Alpha-2 format. String Conditional 2
senderKyc:postalAddress:
addressLine1 Sender's first line of the address String Mandatory 1-256
addressLine2 Sender's second line of the address String Optional 4-20
addressLine3 Sender's third line of the address String Optional 4-20
city Sender's address city/town String Mandatory 4-20
stateProvince Sender's address state
Note: State in ISO Alpha-2 format if the transaction originated in US, Canada and payout is in Guatemala.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 2-20
postalCode Sender's address postal/zip code.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 6-8
country Sender's address country in ISO Alpha-2 format String Mandatory 2
senderKyc:subjectName:
title Title of the Sender String Optional 0-6
firstName First name of the Sender String Mandatory 1-50
middleName Middle name of the Sender String Optional 0-20
lastName Last name of the Sender String Mandatory 1-50
fullName Full name of the Sender String Mandatory 1-128
recipientKyc:
nationality Beneficiary's nationality in ISO Alpha-2 format. e.g. US
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 2
dateOfBirth Beneficiary's date of birth in YYYY-MM-DD format.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 10
emailAddress Email address to which transaction notifications will be sent via email. String Optional 0-60
recipientKyc:idDocument:
idType Beneficiary's Id document as required in the destination country. Please click here for the list of required document in each country.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 1-20
idNumber Beneficiary's Id document number.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 1-30
issueDate Beneficiary's Id document issue date in YYYY-MM-DD format. String Optional 10
expiryDate Beneficiary's Id document expiry date in YYYY-MM-DD format.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 10
issuerCountry Country where the Id document was issued in ISO Alpha-2 format. String Optional 2
recipientKyc:postalAddress:
addressLine1 Beneficiary's first line of address
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 1-256
addressLine2 Beneficiary's second line of the address String Optional 4-20
addressLine3 Beneficiary's third line of the address String Optional 4-20
city Beneficiary's address city/town
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 4-20
stateProvince Beneficiary's address state
Note: State in ISO Alpha-2 format if the transaction is for US, Canada.
String Optional 2-20
postalCode Beneficiary's address postal code/zip code String Conditional 6-8
country Beneficiary's address country in ISO Alpha-2 format.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 2
recipientKyc:subjectName:
firstName First name of the beneficiary String Mandatory 1-50
lastName Last name of the beneficiary String Mandatory 1-50
fullName Full name of the beneficiary String Mandatory 1-120
regionalBeneficiaryName Regional Beneficiary Name as per bank account. For example in Japanese the Katakana name would be passed.
Note: Mandatory/Optional requirement of this field is payout country specific.
String Conditional 1-50
internationalTransferInformation:
quoteId The quote reference generated when the Create a Quotation API call is made. String Mandatory 16-20
receivingCountry Payout county code in ISO Alpha 2 format. e.g. NG String Mandatory 2
remittancePurpose Reason for the transfer. Please click here for accepted values. String Mandatory 4-30
sourceOfFunds Source of funds. Please click here for accepted values. String Mandatory 4-17
relationshipSender The relation between the sender and the beneficiary. Please click here for accepted values. String Mandatory 3-11

Response Parameters (for acknowledge and success)

Parameter Description Data Type
requestDate The transaction timestamp as sent in the Create A Transaction request. String
amount Payout amount as sent in the Create A Transaction request. String
currency Payout currency as sent in the Create A Transaction request. String
type The transaction type as sent in the Create A Transaction request String
requestingOrganisationTransactionReference Unique Transaction reference of the send partner as sent in the Create A Transaction request. String
transactionStatus Indicates the status of the transaction String
transactionReference Unique reference generated for this transaction on TerraPay's system String
debitParty:
key msisdn String
value The sender's mobile number as sent in the Create A Transaction request String
creditParty:
key msisdn String
value The beneficiary's mobile number as sent in the Create A Transaction request String
key bankaccountno String
value Beneficiary's bank account details as sent in the Create A Transaction request String

Response Parameters (for errors)

Parameter Description Data Type
serverCorrelationId Unique Transaction reference of the send partner as sent in the Create A Transaction request. String
clientCorrelationId Unique reference generated for this transaction on TerraPay's system String
errorCategory The type of error generated. String
errorCode A specific error code corresponding to the failure of the transaction. String
errorDescription Description of the error code. String
errorDateTime Timestamp in UTC at which the error code was generated. String

View a Transaction

The View Transactions API is used for looking up the status of a transaction sent to the TerraPay system. This API should be called until a final status is reached. Please review the response parameters carefully for correct implementation. The status parameter in the response determines if the transaction should be kept pending, marked success or failed. The response code and reponse message provide additional information on why the transaction failed.

URI format is: /transactions_v2/{transactionReference}

View Transaction Status to a Mobile Wallet Try it

View Transaction Status to a Mobile Wallet


curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/TPPU000000334449' \
--header 'Content-Type: application/json'\
--header 'X-USERNAME:terrapayuser' \
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b' \
--header 'X-DATE: 2020-01-02 10:51:16' \
--header 'X-ORIGINCOUNTRY: US' \


var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Acknowledgement Response

{
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionStatus": "3050:Remit Acknowledged",
    "transactionReference": "TPKM000000056269"  
    "status": "PENDING"  
}

Success Response

{
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        }
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionStatus": "3000:Remit Success",
    "transactionReference": "TPKM000000056269"  
    "status": "SUCCESS"  
}

Failure Response :

{
    "serverCorrelationId":"", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
        },
	"status":"FAILED"
}

{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"3032", 
        "errorDescription":"Remit Failed.", 
        "errorDateTime":"2017-05-02 11:00:00" 
    },
	"status":"FAILED"
}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/{transactionReference}

HTTP Request

GET /eig/gsma/transactions_v2/TPKM000000056269 HTTP/1.1

View Transaction Status to a Bank Account Try it

View Transaction Status to a Bank Account


curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/TPKM000000056269 HTTP/1.1'\
--header  'Content-Type: application/json'\
--header  'X-USERNAME: terrapayuser '\
--header  'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header  'X-DATE: "2017-05-03 11:00:00'\
--header  'X-ORIGINCOUNTRY:US'\
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/SrcTxnId001")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Acknowledgement Response

  {
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionSv2tatus": "3050:Remit Acknowledged",
    "transactionReference": "TPKM000000056269"
    "status": "PENDING"  
}

Success Response

  {
    "amount": "100000.01",
    "currency": "NGN",
    "type": "p2p",
    "requestDate": "2017-03-20T06:19:36.969Z",
    "requestingOrganisationTransactionReference": "partnerRefId1234",
    "debitParty": [
        {
            "key": "msisdn",
            "value": "+33472034605"
        } 
    ],
    "creditParty": [
        {
            "key": "msisdn",
            "value": "+23410706056"
        }
    ],
    "transactionSv2tatus": "3000:Remit Success",
    "transactionReference": "TPKM000000056269"
    "status": "SUCCESS"  
}

Failure Response:

{
    "serverCorrelationId":"", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"authorisation", 
        "errorCode":"1003", 
        "errorDescription":"Authentication failed. Username or Password is incorrect.", 
        "errorDateTime":"2017-05-02 11:00:00"
        },
	"status": "FAILED"  
}
{
    "serverCorrelationId":"TPKM000000056269", 
    "clientCorrelationId":"partnerRefId1234",
    "error": {
        "errorCategory":"businessRule", 
        "errorCode":"3032", 
        "errorDescription":"Remit Failed.", 
        "errorDateTime":"2017-05-02 11:00:00"
        },
	    "status": "FAILED"  
}


URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions_v2/{transactionReference}

HTTP Request

GET /eig/gsma/transactions_v2/TPKM000000056269 HTTP/1.1

Request Parameters

Parameter Description Data Type Requirement
transactionReference The partner can use either TerraPay generated unique reference or the partner generated Unique reference for transaction status lookup. String Mandatory

Response Parameters (for acknowledge and success)

Parameter Description Data Type
requestDate The creation date and time of the transaction as sent in the Create A Transaction API. String
amount Payout amount as sent in the Create A Transaction API. String
currency Payout currency as sent in the Create A Transaction API. String
type The type of the transaction as sent in the Create A Transaction API String
requestingOrganisationTransactionReference Unique Transaction reference generated by the send partner. String
transactionStatus Indicates the status of the transaction String
transactionReference Unique reference for the transaction generated by TerraPay's system String
status The current status of the transaction on the TerraPay system. It has one of the following values:
SUCCESS The transaction is paid out successfully.DO NOT REFUND SENDER
FAILED The transaction has failed. REFUND SENDER
CANCELLED The transaction has been cancelled. REFUND SENDER
RETURNED The transaction has been reversed successfully. REFUND SENDER
PENDING The transaction is still pending final status update. Continue to wait for callback or continue transaction statsus enquire. DO NOT REFUND SENDER
String
debitParty:
key The name of the debitparty account identifier String
value Keys include mobile wallet and bank account identifiers String
creditParty:
key The name of the creditparty account identifier String
value Keys include mobile wallet and bank account identifiers String

Response Parameters (for errors)

Parameter Description Data Type
serverCorrelationId Unique Transaction reference of the send partner as sent in the Create A Transaction request. String
clientCorrelationId Unique reference generated for this transaction on TerraPay's system String
errorCategory The type of error generated. String
errorCode A specific error code corresponding to the failure of the transaction. String
errorDescription Description of the error code. String
errorDateTime Timestamp in UTC at which the error code was generated. String
status The currenty status of the transaction on the TerraPay system. It has one of the following values:
SUCCESS The transaction is paid out successfully. DO NOT REFUND SENDER
FAILED The transaction has failed. REFUND SENDER
CANCELLED The transaction has been cancelled. REFUND SENDER
RETURNED The transaction has been reversed successfully. REFUND SENDER
PENDING The transaction is still pending final status update. Continue to wait for callback or continue transaction statsus enquire. DO NOT REFUND SENDER
String

Ledger Balance

The ledger balance API retrieves details of the partner's ledger and the current balance. The information can be retrieved for all ledgers configured or for ledgers of a specific currency.

URI format is: accounts/{currency}/balance_v1

Get Balance of all ledgers

curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1'\
--header 'X-USERNAME:terrapayuser '\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:US'\
--header 'Content-Type: application/json '
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response:

[
    {
        "currency": "USD",
        "currentBalance": "1000.000000",
        "account": "TL-TERRAPAY-US-SENDER-USD"
        "status": "available"
    },
    {
        "currency": "NGN",
        "currentBalance": "3000000.000000",
        "account": "TL-TERRAPAY-NG-SENDER-NGN"
        "status": "available"
    },
    {
        "currency": "TZS",
        "currentBalance": "1000000.000000",
        "account": "TL-TERRAPAY-TZ-SENDER-TZS"
        "status": "available"
    }
]

Get Balance of ledgers of single currency

curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1'\
--header 'X-USERNAME: terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:US'\
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response:

[
    {
        "currency": "USD",
        "currentBalance": "1000.000000",
        "account": "TL-TERRAPAY-US-SENDER-USD"
        "status": "available"
    }
]

Get Balance of all ledgers Try it

URL

https://uat-connect.terrapay.com:21211/eig/gsma/accounts/all/balance_v1

HTTP Request

GET /eig/gsma/accounts/all/balance_v1 HTTP/1.1

Get Balance for a single currency ledger Try it

URL

https://uat-connect.terrapay.com:21211/eig/gsma/accounts/USD/balance_v1

HTTP Request

GET /eig/gsma/accounts/USD/balance_v1 HTTP/1.1

Response Parameters

Parameter Description Data type
currentBalance Current balance of the ledger account String
Currency Currency of the ledger account String
account Name of the ledger account in the TerraPay system String
status Availability of the ledger account in the TerraPay system String

Corridor Quotation

Corridor Quotation Try it

Corridor Quotation

curl --location --request GET'https://uat-connect.terrapay.com:21211/eig/gsma/quotations/USD '\
--header 'X-USERNAME: terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:US'\
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/quotations/USD", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/gsma/quotations/USD"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/quotations/usd")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/quotations/USD")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response

[
    {
        "requestDate": "2017-10-18 09:27:16",
        "requestCurrency": "USD",
        "quotes":[
            {
                "receivingServiceProvider": "GH",
                "receivingCurrency": "GHS",
                "fxRate": "4.966000"
            },
            {
                "receivingServiceProvider": "UG",
                "receivingCurrency": "UGX",
                "fxRate": "3728.000597"
            }
        ],
            "quotationStatus": "9000:Success"
    }
]

This API is used to get the foreign exchange rates for the prefunding currency corridors that are active for the partner.

URI format is: /quotations/{prefunding_currency}

URL

https://uat-connect.terrapay.com:21211/eig/gsma/quotations/USD

HTTP Request

GET /eig/gsma/quotations/USD HTTP/1.1

Corridor Quotation V2

Corridor Quotation V2Try it



Corridor Quotation V2 (Card)

curl --location --request GET'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/USD?instrumentType=BANK_AC&transactionType=p2p'\
--header 'X-USERNAME: terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:US'\
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https:// uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/usd?instrumentType=CARD&transactionType=p2p", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https:// uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/usd?instrumentType=CARD&transactionType=p2p"

payload={}
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https:// uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/usd?instrumentType=CARD&transactionType=p2p")
  .method("GET", null)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https:// uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/usd?instrumentType=CARD&transactionType=p2p")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response

[
{
    "requestDate": "2020-01-02 10:51:16",
    "requestCurrency": "USD",
    "quotes":[
        {
            "receivingCurrency": "BDT",
            "fxRate": "95.000000"
            "transactionType": "p2p",
            "instrumentType": "CARD",
            "scheme": "MC"
        },
        {
            "receivingCurrency": "BDT",
            "fxRate": "116.000000"
            "transactionType": "p2p",
            "instrumentType": "CARD",
            "scheme": "VISA"
        },
        {
            "receivingCurrency": "PHP",
            "fxRate": "57.970000"
            "transactionType": "p2p",
            "instrumentType": "CARD",
            "scheme": "MC"
        },
        {
            "receivingCurrency": "PKR",
            "fxRate": "63.000000"
            "transactionType": "p2p",
            "instrumentType": "CARD",
            "scheme": "MC"
        },
        {
            "receivingCurrency": "PKR",
            "fxRate": "61.000000"
            "transactionType": "p2p",
            "instrumentType": "CARD",
            "scheme": "VISA"
        },
        {
            "receivingCurrency": "USD",
            "fxRate": "1"
            "transactionType": null,
            "instrumentType": null,
            "scheme": null
        }
    ],
        "quotationStatus": "9000:Success"
}
]

The Corridor Quotation v2 API is used to get the foreign exchange rates for the prefunding currency corridors that are active for the partner. Implementation of New Corridor Quote Version 2 to Address Instrument type and scheme-Specific Rates - The current corridor quotation system displays default rates for Bank and Wallet transactions. It is mandatory for the Treasury team to add these default rates manually. This enhancement ensures that the corridor quotation system automatically selects either the Bank rate or the Wallet rate when the default rate is unavailable, eliminating manual intervention by the Treasury team.

URL:

https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/USD?instrumentType=BANK_AC&transactionType=p2p

Request Parameters

Parameter Description Data Type Requirement
Prefunding currency code Providing a prefunding currency code is Mandatory. Either Currency code or default all (USD/ALL) String Mandatory
instrumentType Specifies the beneficiary instrument to which the payout is to be made. Values to be one of BANK_AC, WALLET or CARD
  • WALLET - Indicates payout to WALLET
  • BANK_AC - Indicates payout to BANK
  • CARD - Indicates payout to CARD.
When not specified for BANK/WALLET. If not specified, the any values above it will fetch ALL available rates of all instruments.
String Optional
transactionType The transaction type for which this quote is being requested. Values to be one of p2p, p2b, b2b, b2p. Default will be p2p String Optional

Response Parameter Details:

Sample request and response:

Request: When instrumentType is CARD

URL

https:// uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/usd?instrumentType=CARD&transactionType=p2p

Corridor Quotation V2 (Bank_AC)

curl --location --request GET'https://uat-connect.terrapay.com:21211/eig/gsmaV2/quotations/USD?instrumentType=BANK_AC&transactionType=p2p'\
  --header 'X-USERNAME: terrapayuser'\
  --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
  --header 'X-DATE: 2017-05-03 11:00:00'\
  --header 'X-ORIGINCOUNTRY:US'\
  --header 'Content-Type: application/json'
  
var myHeaders = new Headers();
  myHeaders.append("X-USERNAME", "terrapayuser");
  myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
  myHeaders.append("X-DATE", "2018-04-04 09:27:16");
  myHeaders.append("X-ORIGINCOUNTRY", "US");
  
  var requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
  };
  
  fetch(" https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=BANK_AC&transactionType=p2p", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
  
import requests
  
  url = " https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=BANK_AC&transactionType=p2p"
  
  payload={}
  headers = {
    'X-USERNAME': 'terrapayuser',
    'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
    'X-DATE': '2018-04-04 09:27:16',
    'X-ORIGINCOUNTRY': 'US'
  }
  
  response = requests.request("GET", url, headers=headers, data=payload)
  
  print(response.text)
  
  
OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  Request request = new Request.Builder()
    .url(" https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=BANK_AC&transactionType=p2p")
    .method("GET", null)
    .addHeader("X-USERNAME", "terrapayuser")
    .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
    .addHeader("X-DATE", "2018-04-04 09:27:16")
    .addHeader("X-ORIGINCOUNTRY", "US")
    .build();
  Response response = client.newCall(request).execute();
  
require "uri"
  require "net/http"
  
  url = URI(" https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=BANK_AC&transactionType=p2p")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Get.new(url)
  request["X-USERNAME"] = "terrapayuser"
  request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
  request["X-DATE"] = "2018-04-04 09:27:16"
  request["X-ORIGINCOUNTRY"] = "US"
  
  response = https.request(request)
  puts response.read_body
  
  

Success Response

[
  {
      "requestDate": "2020-01-02 10:51:16",
      "requestCurrency": "USD",
      "quotes":[
          {
              "receivingCurrency": "USD",
              "fxRate": "1"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "ILS",
              "fxRate": "3.590000"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "EUR",
              "fxRate": "2.910000"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          },
          {
              "receivingCurrency": "EUR",
              "fxRate": "2.910000"
              "transactionType": "p2p",
              "instrumentType": "BANK_AC",
              "scheme": "*"
          }
      ],
          "quotationStatus": "9000:Success"
  }
]

Request: When instrumentType is BANK_AC

URL

hhttps:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=BANK_AC&transactionType=p2p

Corridor Quotation V2 (Wallet)

curl --location --request GET' https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p'\
  --header 'X-USERNAME: terrapayuser'\
  --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
  --header 'X-DATE: 2017-05-03 11:00:00'\
  --header 'X-ORIGINCOUNTRY:US'\
  --header 'Content-Type: application/json'
  
var myHeaders = new Headers();
  myHeaders.append("X-USERNAME", "terrapayuser");
  myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
  myHeaders.append("X-DATE", "2018-04-04 09:27:16");
  myHeaders.append("X-ORIGINCOUNTRY", "US");
  
  var requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
  };
  
  fetch("  https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));
  
import requests
  
  url = "  https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p"
  
  payload={}
  headers = {
    'X-USERNAME': 'terrapayuser',
    'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
    'X-DATE': '2018-04-04 09:27:16',
    'X-ORIGINCOUNTRY': 'US'
  }
  
  response = requests.request("GET", url, headers=headers, data=payload)
  
  print(response.text)
  
  
OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  Request request = new Request.Builder()
    .url("  https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p")
    .method("GET", null)
    .addHeader("X-USERNAME", "terrapayuser")
    .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
    .addHeader("X-DATE", "2018-04-04 09:27:16")
    .addHeader("X-ORIGINCOUNTRY", "US")
    .build();
  Response response = client.newCall(request).execute();
  
require "uri"
  require "net/http"
  
  url = URI("  https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p")
  
  https = Net::HTTP.new(url.host, url.port)
  https.use_ssl = true
  
  request = Net::HTTP::Get.new(url)
  request["X-USERNAME"] = "terrapayuser"
  request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
  request["X-DATE"] = "2018-04-04 09:27:16"
  request["X-ORIGINCOUNTRY"] = "US"
  
  response = https.request(request)
  puts response.read_body
  
  

Success Response

[
  {
      "requestDate": "2020-01-02 10:51:16",
      "requestCurrency": "USD",
      "quotes":[
          {
              "receivingCurrency": "USD",
              "fxRate": "1"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          },
          {
              "receivingCurrency": "EUR",
              "fxRate": "2.910000"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          },
          {
              "receivingCurrency": "ILS",
              "fxRate": "3.590000"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          },
          {
              "receivingCurrency": "XAF",
              "fxRate": "1908.834870"
              "transactionType": "p2p",
              "instrumentType": "WALLET",
              "scheme": "*"
          }
      ],
          "quotationStatus": "9000:Success"
  }
]

Request: When instrumentType is Wallet

URL

https:// uat-connect.terrapay.com:21211/eig /gsmaV2/quotations/usd?instrumentType=WALLET&transactionType=p2p

Cancel Transaction

Cancel Transaction Try it

Cancel Transaction

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel/'\
 --header 'X-USERNAME: terrapayuser'\
 --header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
 --header 'X-DATE: "2021-01-03 11:00:00'\
 --header 'X-ORIGINCOUNTRY:US'\
 --header 'Content-Type: application/json'\
 --data-raw
   {
        "reason": "cancelling",
        "txnId": "TPSE000000298941"
   }

var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "reason": "cancelling",
  "txnId": "SrcTxnId001"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel"

payload = json.dumps({
  "reason": "cancelling",
  "txnId": "SrcTxnId001"
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"reason\": \"cancelling\",\r\n    \"txnId\": \"SrcTxnId001\"\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "reason": "cancelling",
  "txnId": "SrcTxnId001"
})

response = https.request(request)
puts response.read_body

Success Response

{
  "responseMessage": "Cancel Success",
   "statusCode": "3033"
 }

This API is used to cancel an initiated transaction which is not yet credited. The cancellation will be done only if the transaction is pending on the TerraPay system and has not already been sent to the receiving partner for credit to the beneficiary account

URL

https://uat-connect.terrapay.com:21211/eig/gsma/remitCancel

HTTP Request

POST /eig/gsma/remitCancel HTTP/1.1

Cancel transaction request parameter list

Parameter name Description Data Type Requirement
txnId Reference for the transaction which was returned by transaction response buffer by TerraPay's system or partner transaction id. String Mandatory

Response code for cancel transactions

Response Code Response Message
3033 Cancel Success
15001 Cannot Cancel. Credit already in process.
15002 Cannot Cancel. Transaction in Success state.
15003 Cannot Cancel. Transaction in Fail state.
15004 Cannot Cancel. Transaction not found.
15005 Transaction already in canceled state.

Reverse Transaction

Reverse Transaction Try it

Reverse Transaction

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate/'\
--header 'X-USERNAME: terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2021-01-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:US'\
--header 'Content-Type: application/json'\
--data-raw

{
  "reversalReason": "reversalreason",
  "txnId": "TPKM000000056269"
}

var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "reversalReason": "reversalreason",
  "txnId": "TPKM000000056269"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate"

payload = json.dumps({
  "reversalReason": "reversalreason",
  "txnId": "TPKM000000056269"
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"reversalReason\": \"reversalreason\",\r\n    \"txnId\": \"TPKM000000056269\"\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "reversalReason": "reversalreason",
  "txnId": "TPKM000000056269"
})

response = https.request(request)
puts response.read_body

Success Response

{
  "responseCode": "16003"
  "responseMessage": "Reversal Pending",
  "txnId": "TPYY000000783294"
}

Reverse Transaction is used to reverse a transfer which is to bring back the money from the beneficiary's account to the sender's account.

URL

https://uat-connect.terrapay.com:21211/eig/gsma/reversalInitiate

HTTP Request

POST /eig/gsma/reversalInitiate HTTP/1.1

Reverse transaction response parameter list

Parameter name Description Data Type Requirement
txnId Reference for the transaction which was returned by transaction response buffer by TerraPay's system or partner transaction id. String Mandatory

Response code for reversal transactions

Response Code Response Message
16000 Reversal Success.
16001 Reversal Failed. Transaction Not found.
16002 Reversal Rejected.
16003 Reversal Pending.
16004 Reversal cannot be done at this stage
16005 Reversal already raised.
16006 Transaction already reversed.
16007 Reverse cannot be done. Transaction is in failed state.

Statements API

URI format is: /PartnerPortalReports/partnerstatements_v1?

URL

https://uat-engage.terrapay.com:21228/PartnerPortalReports/partnerstatements_v1?start=2025-01-01T00:00:00Z&end=2025-01-02T00:00:00Z&ledgerBookName=TL-TERRAPAY-GB-SENDER-USD

HTTP Request

GET /eig/gsma/PartnerPortalReports/partnerstatements_v1 HTTP/1.1


Response

[
    {
        "creationTime": "2020-04-29T13:00:00Z",
        "modifiedTime": "2020-04-29T13:00:00Z",
        "type": "LIQUIDITY",
        "internalRef": "TP000000000",
        "externalRef": "",
        "amount": "1000.00",
        "currency": "USD",
        "convertedAmount": "",
        "convertedCurrency": "",
        "balance": "1000.00",
        "message": "Transfer with reference 123456"
    },
    {
        "creationTime": "2020-04-29T13:00:00Z",
        "modifiedTime": "2020-04-29T13:00:00Z",
        "type": "TRANSFERRED",
        "internalRef": "TP000000001",
        "externalRef": "TW000000000",
        "amount": "10.12",
        "currency": "USD",
        "convertedAmount": "38280.09",
        "convertedCurrency": "UGX",
        "balance": "989.88",
        "message": "3000:Remit Success"
    },
    {
        "creationTime": "2020-04-29T13:00:00Z",
        "modifiedTime": "2020-04-29T13:00:00Z",
        "type": "REJECTED",
        "internalRef": "TP000000002",
        "externalRef": "TW000000001",
        "amount": "8.62",
        "currency": "USD",
        "convertedAmount": "19938.06",
        "convertedCurrency": "TZS",
        "balance": "989.88",
        "message": "3007:Beneficiary KYC validation failed"
    },
    {
        "creationTime": "2020-04-29T13:00:00Z",
        "modifiedTime": "2020-04-29T13:00:00Z",
        "type": "BOUNCED",
        "internalRef": "TP000000003",
        "externalRef": "TW000000000",
        "amount": "10.12",
        "currency": "USD",
        "convertedAmount": "38280.09",
        "convertedCurrency": "UGX",
        "balance": "1000.00",
        "message": "3103:Bank credit failed. Account name mismatch"
    }
]

Statement Types

TRANSFERRED

The transaction is successfully processed and funds is debited from the account.

REJECTED

The transaction has failed and funds is not debited from the account

BOUNCED

The transaction has been returned from beneficiary. Any debits for this transaction is reversed and credited back to the account.

LIQUIDITY

Funding transaction and transferred funds are credited to the account.

PENDING

Transaction is still pending final status on the TerraPay system. Funds is be debited from the account. Continue to do statsu enquiry until final status of the transaction is received.

Statement fields

Name Format Example Requirement Description
creationTime ISO 8601 UTC DateTime 2020-04-29T13:00:00Z Mandatory Timestamp at which the transaction was debited (RESERVED/FUNDS PLACED ON HOLD) or credited
modifiedTime ISO 8601 UTC DateTime 2020-04-29T13:00:00Z Mandatory Timestamp at which the transaction final status was updated. e.g in case of SUCCESS (COMMIT) or FAILURE (ROLLBACK)
type TRANSFERRED
REJECTED
BOUNCED
LIQUIDITY
Mandatory Transaction time
internalRef String TPKM000000056269 Mandatory TerraPay transaction reference
externalRef String 88440865645 Optional for LIQUIDITY mandatory for the rest Partner transaction reference
amount Decimal 123.45 Mandatory Transaction amount that is debited or credited. Debits will be negative value and credits will be positive value.
currency ISO 4217 three-letter code USD Mandatory Balance currency, USD
convertedAmount Decimal 4497.45 Optional for LIQUIDITY mandatory for the rest Converted amount sent to beneficiary
convertedCurrency ISO 4217 three-letter code TZS Optional for LIQUIDITY mandatory for the rest Currency of convertedAmount
balance Decimal 212455.87 Mandatory Balance in the account after the transaction debit/credit
message String 3000:Remit Success
3032:Remit Failed.
Mandatory Descriptio of error codes and messages in case of success, failure and returned transactions. Will be empty for pending transactions.

Statement's example

Description TimeStamp Type InternalRef ExternalRef Amount Currency Converted Amount Converted Currency Balance Message
Partner sends funds to TerraPay 2020-04-29T13:00:00Z LIQUIDITY TP000000000 1000.00 USD 1000.00 Transfer with reference 123456
Successful transfer for 38280.09 UGX 2020-05-22T09:12:42Z TRANSFERRED TP000000001 TW000000000 -10.12 USD -38280.09 UGX 989.88 3000:Remit Success
Failed transfer for 19938.06 TZS 2020-05-22T10:15:55Z REJECTED TP000000002 TW000000001 8.62 USD 19938.06 TZS 989.88 3103:Bank credit failed. Account name mismatch
Previously successful transfer to UGX was returned to TerraPay 2020-05-22T11:22:45Z BOUNCED TP000000003 TW000000000 10.12 USD 38280.09 UGX 1000.00 3999:Returned by beneficiary

Request

Statements should be accessible via HTTP GET request.

Sample URL

URL

https://uat-connect.terrapay.com:21211/eig/gsma/statements?start=%7Bstart%7D&end=%7Bend%7D¤cy=%7Bcurrency%7D

Request parameter

Name Format Example Requirement Description
start ISO 8601 UTC DateTime 2020-04-29T13:00:00Z mandatory Beginning of the query interval
end ISO 8601 UTC DateTime 2020-05-22T19:38:59Z mandatory End of the query interval

Request headers

Request must include standard TerraPay headers:

Response

Response should contain list of statements in JSON format for the requested period.

Get Bank List

Get Bank List Try it

Get Bank List


curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/getbanklist/BD'\
--header 'X-USERNAME: username'\
--header 'X-PASSWORD: password'\
--header 'X-DATE:request datetime'\
--header 'X-ORIGINCOUNTRY:origincountry'\
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "OpenTurfDev");
myHeaders.append("X-PASSWORD", "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/getbanklist/NP", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/getbanklist/NP"

payload = ""
headers = {
  'X-USERNAME': 'OpenTurfDev',
  'X-PASSWORD': '85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/getbanklist/NP")
  .method("GET", null)
  .addHeader("X-USERNAME", "OpenTurfDev")
  .addHeader("X-PASSWORD", "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/getbanklist/NP")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "OpenTurfDev"
request["X-PASSWORD"] = "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response

{
    "countryCode": "BD",
    "lastUpdatedOn": "2021-01-12 21:40:00.051",
    "banks": [
    {
        "bankName": "DUTCH BANGLA BANK LIMITED",
        "bankCode": "DBBLBDDH",
        "providerCode": "",
        "status": "ACTIVE"
    },
    {
        "bankName": "AGRANI BANK LTD",
        "bankCode": "AGBKBDDH",
        "providerCode": "",
        "status": "ACTIVE"
    },]
}

The Bank list API is used to derive a bank name, code, provider code, and status.

URI format is: https://uat-connect.terrapay.com:21211/eig/getbanklist/{countrycode}

URL

https://uat-connect.terrapay.com:21211/eig/getbanklist/BD

HTTP Request

GET /eig/getbanklist/BD HTTP/1.1

Bank List response parameter list

Parameter name Description Data Type
countryCode ISO Alpha 2 country code of the destination country. e.g. NG for Nigeria String
lastUpdatedOn last updated date and time in YYYY-MM-DD HH:mm:ss.SSS format. String
bankName Full name of the beneficiary bank String
bankCode Bank Code as required in the destination Country. It can be one of: IFSC Code,Swift BIC. This code is specific to bank integration in each country and may be mandatory in certain destination countries String
providerCode This is a code that indicates the bank to which the transaction is to be sent. If not set, then TerraPay will resolve the bank based on the bankCode. If the bankCode is incorrectly provided, then the bank will be resolved based on Bank Name (should match exactly as per the bank list shared by TerraPay). If these parameters do no match then the transaction will be rejected. If set, then TerraPay will resolve the bank based on the provider code. Numeric
status Indicates the status of the account. If 'active' then the account can receive funds. If not then transactions sent to the account will fail. String

Get Wallet List

Get Wallet List Try it

Get Bank List


curl --location --request GET 'https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD'\
--header 'X-USERNAME: username'\
--header 'X-PASSWORD: password'\
--header 'X-DATE:request datetime'\
--header 'X-ORIGINCOUNTRY:origincountry'\
--header 'Content-Type: application/json'
var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "OpenTurfDev");
myHeaders.append("X-PASSWORD", "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests

url = "https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD"

payload = ""
headers = {
  'X-USERNAME': 'OpenTurfDev',
  'X-PASSWORD': '85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD")
  .method("GET", null)
  .addHeader("X-USERNAME", "OpenTurfDev")
  .addHeader("X-PASSWORD", "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-USERNAME"] = "OpenTurfDev"
request["X-PASSWORD"] = "85d6dcc27d9fb21c7c346cdbcee2b56a84eba0f542a846de06658d2d094afd56"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"

response = https.request(request)
puts response.read_body

Success Response

{
    "countryCode": "BD",
    "wallets": [
    {
        "walletName": "BKASH",
        "providerCode": "88001,        
    },
	{
	"walletName": "ROCKET",
        "providerCode": "88002,        
    },
    {
        "walletName": "NAGAD",
        "providerCode": "88003",
        } ]
}

The Wallet list API is used to derive wallet name and provider code.

URI format is: https://uat-connect.terrapay.com:21211/eig/getwalletlist/{countrycode}

URL

https://uat-connect.terrapay.com:21211/eig/getwalletlist/BD

HTTP Request

GET /eig/getwalletlist/BD HTTP/1.1

Wallet List response parameter list

Parameter name Description Data Type
countryCode ISO Alpha 2 country code of the destination country. e.g. NG for Nigeria String
walletName Name of the beneficiary wallet String
providerCode This is a code that indicates the wallet to which the transaction is to be sent. If not set, then TerraPay will automatically find the mobile wallet that the mobile number belongs to. If these parameters do no match then the transaction will be rejected. If set, then TerraPay will validate the mobile number against the mobile wallet operator specified. Numeric

Create a Business Transaction

This API is used to create business transaction. This is similar to create a transaction with additional parameters required to conduct business transaction. Business transactions can be as follows:

The URI format is:/transactions

B2B transaction to a Bank

B2B transaction to a Bank Try it

B2B transcation to a bank

curl --location --request POST  'https://uat-connect.terrapay.com:21211/eig/gsma/transactions'\
--header 'X-USERNAME:terrapayuser '\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2018-03-12 09:00:00'\
--header 'X-ORIGINCOUNTRY:FR'\
--header 'Content-Type: application/json'\
--data--raw
{
    "currency": "NGN",
    "type": "b2b",
    "requestDate": "2020-01-02 10:51:16",
    "amount": "35500.00",
    "descriptionText": "Gift for my brother",
    "requestingOrganisationTransactionReference": "12345868378400387540",
    "sendingAmount": "35500.00",
    "payinCcyCode": "USD",
    "provider": "23401",
    "paymentMode": "Bank account",
    "authenticationPartnerCode": "4534",
    "paymentOption": "Account Credit",
    "sendingPartnerCode": "343432223",
    "receivingPartnerCode": "343432223",
    "debitParty": [
    {
        "key": "msisdn",
        "value": "+4491509874561"
    } 
    ],
        "creditParty": [
    {
        "key": "bankaccountno",
        "value": "1976010126"
    },
    {
        "key": "sortcode",
        "value": "CITINGLA"
    },
    {
        "key": "organisationid",
        "value": "Citi Bank"
    },
    {
        "key": "banksubcode",
        "value": "0001"
    },
    {
        "key": "bankBranchName",
        "value": "Citi Bank"
    },
    {
        "key": "accountName",
        "value": "Rajesh"
    },
    {
        "key": "accountIBAN",
        "value": "GB29NWBK60161331926819"
    },
    {
        "key": "accountAdditionalNo1",
        "value": "2656915085434"
    }
    ],
        "senderKyc": {

    },
        "recipientKyc": {

    },
        "internationalTransferInformation": {
            "quoteId": "QT0FEO4OZZ28PLCA5",
            "receivingCountry": "NG",
            "remittancePurpose": "Advanced Goods Payments",
            "sourceOfFunds": "Savings"
    },
    "business": {
        "senderKyc": {
            "businessName": "sample business",
            "businessAddress1": "waltons road",
            "businessAddressCity": "Lyon",
            "businessAddressCountryCode": "US",
            "businessPrimaryContactCountryCode": "US",
            "businessPrimaryContactNo": "3472034605",
            "businessDescription": "Electronics",
            "businessCountryCode": "US",
            "businessRegistrationType": "registrationType",
            "businessRegistrationNumber": "23123456789",
            "businessRegistrationIssueDate": "2020-09-26",
            "businessIDValidThru": "2033-09-26"
        },
        "recepientKyc": {
            "businessName": "oyugi randy",
            "businessPINCode": "123456",
            "businessAddress1": "24",
            "businessAddress2": "waltons road",
            "businessAddressCity": "newyork",
            "businessAddressState": "NYC",
            "businessAddressCountryCode": "NG",
            "businessAddressZip": "123456",
            "businessPrimaryContactCountryCode": "NG",
            "businessPrimaryContactNo": "232323212",
            "businessPrimaryContactNoType": "Mobile",
            "businessDescription": "Electronics wholesale",
            "businessEmail": "rs.electronics@gmail.com",
            "businessCountryCode": "NG",
            "businessRegistrationType": "registrationType",
            "businessRegistrationNumber": "2312345678912",
            "businessRegistrationIssuedBy": "NYC_TRADE",
            "businessRegistrationIssuedAt": "NYC",
            "businessRegistrationIssueDate": "2002-08-26",
            "businessIDValidThru": "2036-09-26",
            "typeofbusiness": "Electronics",
            "businessPObox": "12345",
            "businessMobile": "343234433"
        }
    }   
}

var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "amount": "500",
  "currency": "INR",
  "type": "b2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId004",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "waltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA1XDKDL53E",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = json.dumps({
  "amount": "500",
  "currency": "INR",
  "type": "b2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId004",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "waltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA1XDKDL53E",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"amount\": \"500\",\r\n    \"currency\": \"INR\",\r\n    \"type\": \"b2b\",\r\n    \"descriptionText\": \"Gift for my brother\",\r\n    \"requestDate\": \"2021-05-23 08:19:36\",\r\n    \"requestingOrganisationTransactionReference\": \"SrcTxnId004\",\r\n    \"debitParty\": [\r\n        {\r\n            \"key\": \"msisdn\",\r\n            \"value\": \"+971810456234\"\r\n        }\r\n    ],\r\n    \"creditParty\": [\r\n        {\r\n            \"key\": \"bankaccountno\",\r\n            \"value\": \"50100002965304\"\r\n        },\r\n        {\r\n            \"key\": \"organisationid\",\r\n            \"value\": \"HDFC Bank\"\r\n        },\r\n        {\r\n            \"key\": \"sortcode\",\r\n            \"value\": \"HDFC0001626\"\r\n        }\r\n    ],\r\n    \"senderKyc\": {},\r\n    \"recipientKyc\": {},\r\n    \"sendingAmount\": \"35500.00\",\r\n    \"payinCcyCode\": \"USD\",\r\n    \"paymentMode\": \"cash\",\r\n    \"authenticationPartnerCode\": \"4534\",\r\n    \"paymentOption\": \"Mobile Wallet\",\r\n    \"sendingPartnerCode\": \"343432223\",\r\n    \"receivingPartnerCode\": \"343432223\",\r\n    \"business\": {\r\n        \"senderKyc\": {\r\n            \"businessName\": \"sample business\",\r\n            \"businessAddress1\": \"waltons road\",\r\n            \"businessAddressCity\": \"Lyon\",\r\n            \"businessAddressCountryCode\": \"US\",\r\n            \"businessPrimaryContactCountryCode\": \"US\",\r\n            \"businessPrimaryContactNo\": \"3472034605\",\r\n            \"businessDescription\": \"Electronics\",\r\n            \"businessCountryCode\": \"US\",\r\n            \"businessRegistrationType\": \"registrationType\",\r\n            \"businessRegistrationNumber\": \"23123456789\",\r\n            \"businessRegistrationIssueDate\": \"2001-09-26\",\r\n            \"businessIDValidThru\": \"2033-09-26\",\r\n            \"businessEmail\": \"test@testemail.com\"\r\n        },\r\n        \"recepientKyc\": {\r\n            \"businessName\": \"Oyugi Randy Electric Sale Pvt. Ltd.\",\r\n            \"businessPINCode\": \"123456\",\r\n            \"businessAddress1\": \"24\",\r\n            \"businessAddress2\": \"waltons road\",\r\n            \"businessAddressCity\": \"newyork\",\r\n            \"businessAddressState\": \"NYC\",\r\n            \"businessAddressCountryCode\": \"NG\",\r\n            \"businessAddressZip\": \"123456\",\r\n            \"businessPrimaryContactCountryCode\": \"NG\",\r\n            \"businessPrimaryContactNo\": \"232323212\",\r\n            \"businessPrimaryContactNoType\": \"Mobile\",\r\n            \"businessDescription\": \"Electronics wholesale\",\r\n            \"businessEmail\": \"rs.electronics@gmail.com\",\r\n            \"businessCountryCode\": \"NG\",\r\n            \"businessRegistrationType\": \"registrationType\",\r\n            \"businessRegistrationNumber\": \"2312345678912\",\r\n            \"businessRegistrationIssuedBy\": \"NYC_TRADE\",\r\n            \"businessRegistrationIssuedAt\": \"NYC\",\r\n            \"businessRegistrationIssueDate\": \"2002-08-26\",\r\n            \"businessIDValidThru\": \"2036-09-26\",\r\n            \"typeofbusiness\": \"Electronics\",\r\n            \"businessPObox\": \"12345\",\r\n            \"businessMobile\": \"343234433\"\r\n        }\r\n    },\r\n    \"internationalTransferInformation\": {\r\n        \"quoteId\": \"QR037C1NA1XDKDL53E\",\r\n        \"receivingCountry\": \"IN\",\r\n        \"remittancePurpose\": \"Business Travel\",\r\n        \"sourceOfFunds\": \"Business Income\",\r\n        \"relationshipSender\": \"Employer\"\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "amount": "500",
  "currency": "INR",
  "type": "b2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId004",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "waltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA1XDKDL53E",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})

response = https.request(request)
puts response.read_body

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

B2P transaction to bank

B2P transaction to bank Try it

B2P transaction to bank

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions'\
--header 'X-USERNAME:terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:FR'\
--header 'Content-Type: application/json'\
--data--raw
{
    "currency": "NGN",
    "type": "b2p",
    "requestDate": "2020-01-02 10:51:16",
    "amount": "35500.00",
    "descriptionText": "Gift for my brother",
    "requestingOrganisationTransactionReference": "123458w8378400387553",
    "sendingAmount": "35500.00",
    "payinCcyCode": "USD",
    "provider": "23401",
    "paymentMode": "Bank account",
    "authenticationPartnerCode": "4534",
    "paymentOption": "Account Credit",
    "sendingPartnerCode": "343432223",
    "receivingPartnerCode": "343432223",
    "debitParty": [
    {
        "key": "msisdn",
        "value": "+4491509874561"
    } 
    ],
        "creditParty": [
    {
        "key": "bankaccountno",
        "value": "1976010126"
    },
    {
        "key": "sortcode",
        "value": "CITINGLA"
    },
    {
        "key": "organisationid",
        "value": "Citi Bank"
    },
    {
        "key": "banksubcode",
        "value": "0001"
    },
    {
        "key": "bankBranchName",
        "value": "Citi Bank"
    },
    {
        "key": "accountName",
        "value": "Rajesh"
    },
    {
        "key": "accountIBAN",
        "value": "GB29NWBK60161331926819"
    },
    {
        "key": "accountAdditionalNo1",
        "value": "2656915085434"
    }
    ],
        "senderKyc": {

    },
    "recipientKyc":{
        "primaryContactCountryCode": "NG",
        "primaryContactNo": "2349061114853",
        "primaryContactNoType": "personal",
        "emailAddress": "sample@terrapay.com",
        "subjectName":{
            "firstName": "oyugi",
            "lastName": "randy",
            "fullName": "oyugi randy",
        }
    },
        "internationalTransferInformation":{
            "quoteId": "QT0FEO4UG99LQNQC3",
            "receivingCountry": "NG",
            "remittancePurpose": "Business Travel",
            "sourceOfFunds": "Business Income",
            "relationshipSender": "Employer"
    },
    "business": {
        "senderKyc": {
            "businessName": "sample business",
            "businessAddress1": "waltons road",
            "businessAddressCity": "Lyon",
            "businessAddressCountryCode": "US",
            "businessPrimaryContactCountryCode": "US",
            "businessPrimaryContactNo": "3472034605",
            "businessDescription": "Electronics",
            "businessCountryCode": "US",
            "businessRegistrationType": "registrationType",
            "businessRegistrationNumber": "23123456789",
            "businessRegistrationIssueDate": "2001-09-26",
            "businessIDValidThru": "2033-09-26"
        },
        "recepientKyc": {

        }
    }
}

var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "emailAddress": "sample@terrapay.com",
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain",
      "
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = json.dumps({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "emailAddress": "sample@terrapay",
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain",
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"amount\": \"500\",\r\n    \"currency\": \"INR\",\r\n    \"type\": \"b2p\",\r\n    \"descriptionText\": \"Gift for my brother\",\r\n    \"requestDate\": \"2021-05-23 08:19:36\",\r\n    \"requestingOrganisationTransactionReference\": \"SrcTxnId003\",\r\n    \"debitParty\": [\r\n        {\r\n            \"key\": \"msisdn\",\r\n            \"value\": \"+971810456234\"\r\n        }\r\n    ],\r\n    \"creditParty\": [\r\n        {\r\n            \"key\": \"bankaccountno\",\r\n            \"value\": \"50100002965304\"\r\n        },\r\n        {\r\n            \"key\": \"organisationid\",\r\n            \"value\": \"HDFC Bank\"\r\n        },\r\n        {\r\n            \"key\": \"sortcode\",\r\n            \"value\": \"HDFC0001626\"\r\n        }\r\n    ],\r\n    \"senderKyc\": {},\r\n    \"recipientKyc\": {\r\n        \"emailAddress\": \"sample@terrapay.com\",\r\n        \"subjectName\": {\r\n            \"firstName\": \"Deepa\",\r\n            \"lastName\": \"Jain\",\r\n            \"fullName\": \"Deepa Jain\"\r\n        }\r\n    },\r\n        }\r\n    },\r\n    \"sendingAmount\": \"35500.00\",\r\n    \"payinCcyCode\": \"USD\",\r\n    \"paymentMode\": \"cash\",\r\n    \"authenticationPartnerCode\": \"4534\",\r\n    \"paymentOption\": \"Mobile Wallet\",\r\n    \"sendingPartnerCode\": \"343432223\",\r\n    \"receivingPartnerCode\": \"343432223\",\r\n    \"business\": {\r\n        \"senderKyc\": {\r\n            \"businessName\": \"sample business\",\r\n            \"businessAddress1\": \"waltons road\",\r\n            \"businessAddressCity\": \"Lyon\",\r\n            \"businessAddressCountryCode\": \"US\",\r\n            \"businessPrimaryContactCountryCode\": \"US\",\r\n            \"businessPrimaryContactNo\": \"3472034605\",\r\n            \"businessDescription\": \"Electronics\",\r\n            \"businessCountryCode\": \"US\",\r\n            \"businessRegistrationType\": \"registrationType\",\r\n            \"businessRegistrationNumber\": \"23123456789\",\r\n            \"businessRegistrationIssueDate\": \"2001-09-26\",\r\n            \"businessIDValidThru\": \"2033-09-26\",\r\n            \"businessEmail\":\"test@testemail.com\"\r\n        },\r\n        \"recepientKyc\": {}\r\n    },\r\n    \"internationalTransferInformation\": {\r\n        \"quoteId\": \"QR037C1NZWQLJ42P1F\",\r\n        \"receivingCountry\": \"IN\",\r\n        \"remittancePurpose\": \"Business Travel\",\r\n        \"sourceOfFunds\": \"Business Income\",\r\n        \"relationshipSender\": \"Employer\"\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain"
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})

response = https.request(request)
puts response.read_body

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

B2P transaction to mobile wallet

B2P transaction to mobile wallet Try it

B2P transaction to mobile wallet

curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions'\
--header 'X-USERNAME: terrapayuser'\
--header 'X-PASSWORD: 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b'\
--header 'X-DATE: 2019-08-25 12:00:00'\
--header 'X-ORIGINCOUNTRY:FR'\
--header 'Content-Type: application/json'\
--data-raw
{
    "currency": "NGN",
    "type": "b2p",
    "requestDate": "2020-01-02 10:51:16",
    "amount": "35500.00",
    "descriptionText": "Gift for my brother",
    "requestingOrganisationTransactionReference": "123458w8378400387553",
    "sendingAmount": "35500.00",
    "payinCcyCode": "USD",
    "provider": "23401",
    "paymentMode": "cash",
    "authenticationPartnerCode": "4534",
    "paymentOption": "Mobile Wallet",
    "sendingPartnerCode": "343432223",
    "receivingPartnerCode": "343432223",
    "debitParty": [
    {
        "key": "msisdn",
        "value": "+4491509874561"
    } 
    ],
    "creditParty": [
        {
        "key": "msisdn",
        "value": "+2349061114853"
        }
    ],
        "senderKyc": {

    },
    "recipientKyc":{
        "primaryContactCountryCode": "NG",
        "primaryContactNo": "2349061114853",
        "primaryContactNoType": "personal",
        "emailAddress": "sample@terrapay.com",
        "subjectName":{
            "firstName": "Kevin",
            "lastName": "Hawkins",
            "fullName": "Kevin Hawkins",
        }
    },
        "internationalTransferInformation":{
            "quoteId": "QT0FEO4UG99LQNQC3",
            "receivingCountry": "NG",
            "remittancePurpose": "Business_Travel",
            "sourceOfFunds": "Business_Income",
            "relationshipSender": "Employer"
    },
    "business": {
        "senderKyc": {
            "businessName": "sample business",
            "businessAddress1": "waltons road",
            "businessAddressCity": "Lyon",
            "businessAddressCountryCode": "US",
            "businessPrimaryContactCountryCode": "US",
            "businessPrimaryContactNo": "3472034605",
            "businessDescription": "Electronics",
            "businessCountryCode": "US",
            "businessRegistrationType": "registrationType",
            "businessRegistrationNumber": "23123456789",
            "businessRegistrationIssueDate": "2001-09-26",
            "businessIDValidThru": "2033-09-26"
        },
        "recepientKyc": {

        }
    }
}

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+2349061114853"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "emailAddress": "sample@terrapay.com",
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain,
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = json.dumps({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+2349061114853"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "emailAddress": "sample@terrapay.com",
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain",
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"amount\": \"500\",\r\n    \"currency\": \"INR\",\r\n    \"type\": \"b2p\",\r\n    \"descriptionText\": \"Gift for my brother\",\r\n    \"requestDate\": \"2021-05-23 08:19:36\",\r\n    \"requestingOrganisationTransactionReference\": \"SrcTxnId003\",\r\n    \"debitParty\": [\r\n        {\r\n\t\t\"key\": \"msisdn\",\r\n\t\t\"value\": \"+4491509874561\"\r\n\t} \r\n    ],\r\n    \"creditParty\": [\r\n        {\r\n\t\t\"key\": \"msisdn\",\r\n\t\t\"value\": \"+2349061114853\"\r\n\t\t}\r\n    ],\r\n    \"senderKyc\": {},\r\n    \"recipientKyc\": {\r\n    \"emailAddress\": \"sample@terrapay.com\",\r\n        \"subjectName\": {\r\n            \"firstName\": \"Deepa\",\r\n            \"lastName\": \"Jain\",\r\n            \"fullName\": \"Deepa Jain\",\r\n        }\r\n    },\r\n    \"sendingAmount\": \"35500.00\",\r\n    \"payinCcyCode\": \"USD\",\r\n    \"paymentMode\": \"cash\",\r\n    \"authenticationPartnerCode\": \"4534\",\r\n    \"paymentOption\": \"Mobile Wallet\",\r\n    \"sendingPartnerCode\": \"343432223\",\r\n    \"receivingPartnerCode\": \"343432223\",\r\n    \"business\": {\r\n        \"senderKyc\": {\r\n            \"businessName\": \"sample business\",\r\n            \"businessAddress1\": \"waltons road\",\r\n            \"businessAddressCity\": \"Lyon\",\r\n            \"businessAddressCountryCode\": \"US\",\r\n            \"businessPrimaryContactCountryCode\": \"US\",\r\n            \"businessPrimaryContactNo\": \"3472034605\",\r\n            \"businessDescription\": \"Electronics\",\r\n            \"businessCountryCode\": \"US\",\r\n            \"businessRegistrationType\": \"registrationType\",\r\n            \"businessRegistrationNumber\": \"23123456789\",\r\n            \"businessRegistrationIssueDate\": \"2001-09-26\",\r\n            \"businessIDValidThru\": \"2033-09-26\",\r\n            \"businessEmail\":\"test@testemail.com\"\r\n        },\r\n        \"recepientKyc\": {}\r\n    },\r\n    \"internationalTransferInformation\": {\r\n        \"quoteId\": \"QR037C1NZWQLJ42P1F\",\r\n        \"receivingCountry\": \"IN\",\r\n        \"remittancePurpose\": \"Business Travel\",\r\n        \"sourceOfFunds\": \"Business Income\",\r\n        \"relationshipSender\": \"Employer\"\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "amount": "500",
  "currency": "INR",
  "type": "b2p",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId003",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+4491509874561"
    }
  ],
  "creditParty": [
    {
      "key": "msisdn",
      "value": "+2349061114853"
    }
  ],
  "senderKyc": {},
  "recipientKyc": {
    "emailAddress": "sample@terrapay",
    "subjectName": {
      "firstName": "Deepa",
      "lastName": "Jain",
      "fullName": "Deepa Jain",
    }
  },
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {
      "businessName": "sample business",
      "businessAddress1": "waltons road",
      "businessAddressCity": "Lyon",
      "businessAddressCountryCode": "US",
      "businessPrimaryContactCountryCode": "US",
      "businessPrimaryContactNo": "3472034605",
      "businessDescription": "Electronics",
      "businessCountryCode": "US",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "23123456789",
      "businessRegistrationIssueDate": "2001-09-26",
      "businessIDValidThru": "2033-09-26",
      "businessEmail": "test@testemail.com"
    },
    "recepientKyc": {}
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NZWQLJ42P1F",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})

response = https.request(request)
puts response.read_body

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

P2B transaction to bank

P2B transaction to bank Try it

P2B transaction to bank

 curl --location --request POST 'https://uat-connect.terrapay.com:21211/eig/gsma/transactions'\
 --header 'X-USERNAME: terrapayuser'\
 --header 'X-PASSWORD:
 101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825'\
--header 'X-DATE: 2017-05-03 11:00:00'\
--header 'X-ORIGINCOUNTRY:FR'\
--header 'Content-Type: application/json'\
--data-raw
{
    "currency": "NGN",
    "type": "p2b",
    "requestDate": "2020-01-02 10:51:16",
    "amount": "35500.00",
    "descriptionText": "Gift for my brother",
    "requestingOrganisationTransactionReference": "123458w8378400387553",
    "sendingAmount": "35500.00",
    "payinCcyCode": "USD",
    "provider": "23401",
    "paymentMode": "Bank account",
    "authenticationPartnerCode": "4534",
    "paymentOption": "Account Credit",
    "sendingPartnerCode": "343432223",
    "receivingPartnerCode": "343432223",
    "debitParty": [
    {
        "key": "msisdn",
        "value": "+4491509874561"
    } 
    ],
        "creditParty": [
    {
        "key": "bankaccountno",
        "value": "1976010126"
    },
    {
        "key": "sortcode",
        "value": "CITINGLA"
    },
    {
        "key": "organisationid",
        "value": "Citi Bank"
    },
    {
        "key": "banksubcode",
        "value": "0001"
    },
    {
        "key": "bankBranchName",
        "value": "Citi Bank"
    },
    {
        "key": "accountName",
        "value": "Rajesh"
    },
    {
        "key": "accountIBAN",
        "value": "GB29NWBK60161331926819"
    },
    {
        "key": "accountAdditionalNo1",
        "value": "2656915085434"
    }
    ],
    "senderKyc": {
        "nationality": "US",
        "dateOfBirth": "1986-06-28",
        "gender": "M",
        "primaryContactCountryCode": "NG",
        "primaryContactNo": "2349061114853",
        "primaryContactNoType": "personal",
        "idDocument": [
            {
                "idType": "nationalidcard",
                "idNumber": "123456789",
                "issueDate": "2003-09-26",
                "expiryDate": "2033-09-26",
                "issuerCountry": "US"
            }
        ],
        "postalAddress": {
            "addressLine1": "49",
            "addressLine2": "park street",
            "addressLine3": "wwaltons road",
            "city": "Lyon",
            "stateProvince": "Lyon",
            "postalCode": "123456",
            "country": "US"
        },
        "subjectName": {
            "title": "Mr.",
            "firstName": "Einstein",
            "middleName": "James",
            "lastName": "Bela",
            "fullName": "Einstien James Bela"
        }
    },
    "recipientKyc":{

    },
    "internationalTransferInformation":{
        "quoteId": "QT0FEO4TUIMN33Z6B",
        "receivingCountry": "NG",
        "remittancePurpose": "Business profits to Parents",
        "sourceOfFunds": "Savings",
        "relationshipSender": "Brother"
    },
    "business": {
        "senderKyc": {

        },
        "recepientKyc": {
            "businessName": "oyugi randy",
            "businessPINCode": "123456",
            "businessAddress1": "24",
            "businessAddress2": "waltons road",
            "businessAddressCity": "newyork",
            "businessAddressState": "NYC",
            "businessAddressCountryCode": "NG",
            "businessAddressZip": "123456",
            "businessPrimaryContactCountryCode": "NG",
            "businessPrimaryContactNo": "232323212",
            "businessPrimaryContactNoType": "Mobile",
            "businessDescription": "Electronics wholesale",
            "businessEmail": "vrs.electronics@gmail.com",
            "businessCountryCode": "NG",
            "businessRegistrationType": "registrationType",
            "businessRegistrationNumber": "2312345678912",
            "businessRegistrationIssuedBy": "NYC_TRADE",
            "businessRegistrationIssuedAt": "NYC",
            "businessRegistrationIssueDate": "2002-09-26",
            "businessIDValidThru": "2036-09-26",
            "typeofbusiness": "Electronics",
            "businessPObox": "12345",
            "businessMobile": "343234433"
        }
    }
}

var myHeaders = new Headers();
myHeaders.append("X-USERNAME", "terrapayuser");
myHeaders.append("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b");
myHeaders.append("X-DATE", "2018-04-04 09:27:16");
myHeaders.append("X-ORIGINCOUNTRY", "US");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "amount": "500",
  "currency": "INR",
  "type": "p2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId005",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {
    "nationality": "AE",
    "dateOfBirth": "1967-05-28",
    "gender": "M",
    "idDocument": [
      {
        "idType": "VOTER_CARD",
        "idNumber": "13321115521",
        "issueDate": "1967-05-28",
        "expiryDate": "2067-05-28",
        "issuerCountry": "AE"
      }
    ],
    "postalAddress": {
      "addressLine1": "49 , park street",
      "addressLine2": "12",
      "addressLine3": "12",
      "city": "12",
      "stateProvince": "12",
      "postalCode": "50000",
      "country": "US"
    },
    "subjectName": {
      "firstName": "Test",
      "middleName": "",
      "lastName": "Sender2",
      "fullName": "Test Sender2"
    }
  },
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {},
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "wwaltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA6ZXBSQ88B",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://uat-connect.terrapay.com:21211/eig/gsma/transactions", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://uat-connect.terrapay.com:21211/eig/gsma/transactions"

payload = json.dumps({
  "amount": "500",
  "currency": "INR",
  "type": "p2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId005",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {
    "nationality": "AE",
    "dateOfBirth": "1967-05-28",
    "gender": "M",
    "idDocument": [
      {
        "idType": "VOTER_CARD",
        "idNumber": "13321115521",
        "issueDate": "1967-05-28",
        "expiryDate": "2067-05-28",
        "issuerCountry": "AE"
      }
    ],
    "postalAddress": {
      "addressLine1": "49 , park street",
      "addressLine2": "12",
      "addressLine3": "12",
      "city": "12",
      "stateProvince": "12",
      "postalCode": "50000",
      "country": "US"
    },
    "subjectName": {
      "firstName": "Test",
      "middleName": "",
      "lastName": "Sender2",
      "fullName": "Test Sender2"
    }
  },
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {},
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "wwaltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA6ZXBSQ88B",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})
headers = {
  'X-USERNAME': 'terrapayuser',
  'X-PASSWORD': '101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b',
  'X-DATE': '2018-04-04 09:27:16',
  'X-ORIGINCOUNTRY': 'US',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"amount\": \"500\",\r\n    \"currency\": \"INR\",\r\n    \"type\": \"p2b\",\r\n    \"descriptionText\": \"Gift for my brother\",\r\n    \"requestDate\": \"2021-05-23 08:19:36\",\r\n    \"requestingOrganisationTransactionReference\": \"SrcTxnId005\",\r\n    \"debitParty\": [\r\n        {\r\n            \"key\": \"msisdn\",\r\n            \"value\": \"+971810456234\"\r\n        }\r\n    ],\r\n    \"creditParty\": [\r\n        {\r\n            \"key\": \"bankaccountno\",\r\n            \"value\": \"50100002965304\"\r\n        },\r\n        {\r\n            \"key\": \"organisationid\",\r\n            \"value\": \"HDFC Bank\"\r\n        },\r\n        {\r\n            \"key\": \"sortcode\",\r\n            \"value\": \"HDFC0001626\"\r\n        }\r\n    ],\r\n    \"senderKyc\": {\r\n        \"nationality\": \"AE\",\r\n        \"dateOfBirth\": \"1967-05-28\",\r\n        \"gender\": \"M\",\r\n        \"idDocument\": [\r\n            {\r\n                \"idType\": \"VOTER_CARD\",\r\n                \"idNumber\": \"13321115521\",\r\n                \"issueDate\": \"1967-05-28\",\r\n                \"expiryDate\": \"2067-05-28\",\r\n                \"issuerCountry\": \"AE\"\r\n            }\r\n        ],\r\n        \"postalAddress\": {\r\n            \"addressLine1\": \"49 , park street\",\r\n            \"addressLine2\": \"12\",\r\n            \"addressLine3\": \"12\",\r\n            \"city\": \"12\",\r\n            \"stateProvince\": \"12\",\r\n            \"postalCode\": \"50000\",\r\n            \"country\": \"US\"\r\n        },\r\n        \"subjectName\": {\r\n            \"firstName\": \"Test\",\r\n            \"middleName\": \"\",\r\n            \"lastName\": \"Sender2\",\r\n            \"fullName\": \"Test Sender2\"\r\n        }\r\n    },\r\n    \"recipientKyc\": {},\r\n    \"sendingAmount\": \"35500.00\",\r\n    \"payinCcyCode\": \"USD\",\r\n    \"paymentMode\": \"cash\",\r\n    \"authenticationPartnerCode\": \"4534\",\r\n    \"paymentOption\": \"Mobile Wallet\",\r\n    \"sendingPartnerCode\": \"343432223\",\r\n    \"receivingPartnerCode\": \"343432223\",\r\n    \"business\": {\r\n        \"senderKyc\": {},\r\n        \"recepientKyc\": {\r\n            \"businessName\": \"Oyugi Randy Electric Sale Pvt. Ltd.\",\r\n            \"businessPINCode\": \"123456\",\r\n            \"businessAddress1\": \"24\",\r\n            \"businessAddress2\": \"wwaltons road\",\r\n            \"businessAddressCity\": \"newyork\",\r\n            \"businessAddressState\": \"NYC\",\r\n            \"businessAddressCountryCode\": \"NG\",\r\n            \"businessAddressZip\": \"123456\",\r\n            \"businessPrimaryContactCountryCode\": \"NG\",\r\n            \"businessPrimaryContactNo\": \"232323212\",\r\n            \"businessPrimaryContactNoType\": \"Mobile\",\r\n            \"businessDescription\": \"Electronics wholesale\",\r\n            \"businessEmail\": \"rs.electronics@gmail.com\",\r\n            \"businessCountryCode\": \"NG\",\r\n            \"businessRegistrationType\": \"registrationType\",\r\n            \"businessRegistrationNumber\": \"2312345678912\",\r\n            \"businessRegistrationIssuedBy\": \"NYC_TRADE\",\r\n            \"businessRegistrationIssuedAt\": \"NYC\",\r\n            \"businessRegistrationIssueDate\": \"2002-08-26\",\r\n            \"businessIDValidThru\": \"2036-09-26\",\r\n            \"typeofbusiness\": \"Electronics\",\r\n            \"businessPObox\": \"12345\",\r\n            \"businessMobile\": \"343234433\"\r\n        }\r\n    },\r\n    \"internationalTransferInformation\": {\r\n        \"quoteId\": \"QR037C1NA6ZXBSQ88B\",\r\n        \"receivingCountry\": \"IN\",\r\n        \"remittancePurpose\": \"Business Travel\",\r\n        \"sourceOfFunds\": \"Business Income\",\r\n        \"relationshipSender\": \"Employer\"\r\n    }\r\n}");
Request request = new Request.Builder()
  .url("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")
  .method("POST", body)
  .addHeader("X-USERNAME", "terrapayuser")
  .addHeader("X-PASSWORD", "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b")
  .addHeader("X-DATE", "2018-04-04 09:27:16")
  .addHeader("X-ORIGINCOUNTRY", "US")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
require "uri"
require "json"
require "net/http"

url = URI("https://uat-connect.terrapay.com:21211/eig/gsma/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-USERNAME"] = "terrapayuser"
request["X-PASSWORD"] = "101dfd2422f23f06120b77ab17d39229ff9bb40563eae042bc6cc6e8f9f1825b"
request["X-DATE"] = "2018-04-04 09:27:16"
request["X-ORIGINCOUNTRY"] = "US"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "amount": "500",
  "currency": "INR",
  "type": "p2b",
  "descriptionText": "Gift for my brother",
  "requestDate": "2021-05-23 08:19:36",
  "requestingOrganisationTransactionReference": "SrcTxnId005",
  "debitParty": [
    {
      "key": "msisdn",
      "value": "+971810456234"
    }
  ],
  "creditParty": [
    {
      "key": "bankaccountno",
      "value": "50100002965304"
    },
    {
      "key": "organisationid",
      "value": "HDFC Bank"
    },
    {
      "key": "sortcode",
      "value": "HDFC0001626"
    }
  ],
  "senderKyc": {
    "nationality": "AE",
    "dateOfBirth": "1967-05-28",
    "gender": "M",
    "idDocument": [
      {
        "idType": "VOTER_CARD",
        "idNumber": "13321115521",
        "issueDate": "1967-05-28",
        "expiryDate": "2067-05-28",
        "issuerCountry": "AE"
      }
    ],
    "postalAddress": {
      "addressLine1": "49 , park street",
      "addressLine2": "12",
      "addressLine3": "12",
      "city": "12",
      "stateProvince": "12",
      "postalCode": "50000",
      "country": "US"
    },
    "subjectName": {
      "firstName": "Test",
      "middleName": "",
      "lastName": "Sender2",
      "fullName": "Test Sender2"
    }
  },
  "recipientKyc": {},
  "sendingAmount": "35500.00",
  "payinCcyCode": "USD",
  "paymentMode": "cash",
  "authenticationPartnerCode": "4534",
  "paymentOption": "Mobile Wallet",
  "sendingPartnerCode": "343432223",
  "receivingPartnerCode": "343432223",
  "business": {
    "senderKyc": {},
    "recepientKyc": {
      "businessName": "Oyugi Randy Electric Sale Pvt. Ltd.",
      "businessPINCode": "123456",
      "businessAddress1": "24",
      "businessAddress2": "wwaltons road",
      "businessAddressCity": "newyork",
      "businessAddressState": "NYC",
      "businessAddressCountryCode": "NG",
      "businessAddressZip": "123456",
      "businessPrimaryContactCountryCode": "NG",
      "businessPrimaryContactNo": "232323212",
      "businessPrimaryContactNoType": "Mobile",
      "businessDescription": "Electronics wholesale",
      "businessEmail": "rs.electronics@gmail.com",
      "businessCountryCode": "NG",
      "businessRegistrationType": "registrationType",
      "businessRegistrationNumber": "2312345678912",
      "businessRegistrationIssuedBy": "NYC_TRADE",
      "businessRegistrationIssuedAt": "NYC",
      "businessRegistrationIssueDate": "2002-08-26",
      "businessIDValidThru": "2036-09-26",
      "typeofbusiness": "Electronics",
      "businessPObox": "12345",
      "businessMobile": "343234433"
    }
  },
  "internationalTransferInformation": {
    "quoteId": "QR037C1NA6ZXBSQ88B",
    "receivingCountry": "IN",
    "remittancePurpose": "Business Travel",
    "sourceOfFunds": "Business Income",
    "relationshipSender": "Employer"
  }
})

response = https.request(request)
puts response.read_body

URL

https://uat-connect.terrapay.com:21211/eig/gsma/transactions

HTTP Request

POST /eig/gsma/transactions HTTP/1.1

Business transaction request parameter list

Business transaction request parameter list

Parameter name Description Data Type Requirement Field Length
requestDate The creation date and time of the transaction as supplied by the sending partner in YYYY-MM-DD HH:mm:ss format String Mandatory 19
amount Destination amount payable to the beneficiary with precision of 2 decimal places. String Mandatory 10,2
currency Destination amount currency in ISO 4217 format. e.g. NGN String Mandatory 3
type The harmonized Transaction Type. Fixed value - b2b, b2p, p2b String Mandatory 3
descriptionText Free format text description of the transaction provided by the client. This can be provided as a message for the receiver on the account statement. String Optional 1-256
requestingOrganisationTransactionReference Unique Transaction reference generated by the sending partner. String Mandatory 4-50
provider Provider value should be same as sent in the validation request. If a different value is sent then the transaction will be rejected.
Note: Mandatory/Optional requirement of this field is destination country specific.
Numeric Conditional 5-12
sendingAmount Paying Amount with precision of 2 decimal places String Optional 10,2
payingCcyCode Paying Currency in ISO 4217 format. e.g. USD String Optional 3
paymentMode Type of Payment i.e. Cash, Card, Bank account or Others String Mandatory 0-20
authenticationPartnerCode Multi factor authentication partner code. Unique code with a combination of 4 letters of the Company' first name, Country Code, City Code String Optional 4-20
paymentOption Mobile Wallet/Account Credit String Mandatory 4-100
sendingPartnerCode Unique send partner code. Unique code with a combination of 4 letters of the Company' first name, Country Code, City Code String Optional 4-20
recievingPartnerCode Unique Receive Partner Code String Optional 4-20

debitParty:

Parameter name Description Data Type Requirement Field Length
key msisdn String Mandatory 6
value Sender Mobile Number with country code. e.g. +254123456789 String Mandatory 10-18

creditParty:

Parameter name Description Data Type Requirement Field Length
Key msisdn String Mandatory 6
Value Beneficiary wallet Number with country code. e.g.+254123456789. String Optional - For Bank Accounts Mandatory - For Mobile Wallet 5-50
Key beneficiarySmsNotify String Optional 20
Value Status Update through SMS notification. Values are true or false. true indicates ntofication required. Notification will be sent for b2b and p2b transactions on BusinessMsisdn number (part of business receipient kyc) String Optional 4-5
Key bankaccountno String Conditional 13
Value Beneficiary bank account or IBAN number as applicable and required in the destination country for receiving funds. e.g. 2365417895 or AT483200000012345864. This key/value pair is optional if the transfer is to a mobile wallet. String Mandatory - For bank accounts Optional - For mobile wallets 5-50
Key accounttype String Optional 11
Value Type of the bank account. Supported account types:
Checking
Savings
The default account type for p2p transactions is Savings.
String 0-20
Key sortcode String Conditional 8
Value Bank Code as required in the destination Country. It is the IFSC code for India and Swift BIC for all other countries. The requirement of this code is destination country specific. String Mandatory - For bank accounts Optional - For mobile wallets 4-25
Key organisationid String Conditional 14
Value Full name of the beneficiary bank String Mandatory - For bank accounts Optional - For mobile wallets 4-60
Key banksubcode String Conditional 11
Value This is a code that indicates the branch code or routing code or routing number of the specific bank branch to which the transaction is to be sent. String Mandatory - For bank accounts Optional - For mobile wallets 1-10
Key accountIBAN String Conditional 11
Value Recieve Account IBAN Number for receiving funds. This should be the same as the value in bankaccountno. String Mandatory - For bank accounts Optional - For mobile wallets 13
Key accountAdditionalNo1 String Optional 20
Value If any additional accounts to be provided. String Optional 13
Key accountAdditionalNo2 String Optional 20
Value If any additional accounts to be provided. String Optional 13

senderKyc: Applicable for p2b type transactions

Parameter name Description Data Type Requirement Field Length
nationality Nationality of the customer in ISO Alpha-2 format. e.g. US String Mandatory 2
dateOfBirth Sender's Date of Birth in YYYY-MM-DD format String Mandatory 10
gender Sender's Gender. Enumeration = (M)ale, (F)emale, (U)nspecified String Optional 1
primaryContactCountryCode Primary Contact Country Code String Optional 2
primaryContactNo Primary Contact Number String Optional 10-15
primaryContactNoType Primary Contact Number type i.e. Personal/Office String Optional 4-50

senderKyc:idDocument

Parameter name Description Data Type Requirement Field Length
idType Sender's Id document type: For example nationalidcard, drivinglicense, passport, etc String Mandatory 1-20
idNumber Sender's Id document number String Mandatory 1-30
issueDate Sender's Id document issue date in YYYY-MM-DD format. String Optional 10
expiryDate Sender's Id document expiry date in YYYY-MM-DD format. String Mandatory 10
issuerCountry Country where the identification type was issued in ISO Alpha-2 format. String Optional 2

senderKyc:postalAddress

Parameter name Description Data Type Requirement Field Length
addressLine1 First line of the address String Mandatory 1-256
addressLine2 Second line of the address String Optional 4-20
addressLine3 Third line of the address String Optional 4-20
city City/Town of sender's address String Mandatory 4-20
stateProvince Sender's address state
Note: State in ISO Alpha-2 format if the transaction originated in US, Canada and payout is in Guatemala.
Mandatory/Optional requirement of this field is payout country specific.
String Conditional 2-20
postalCode Postal Code of sender's address String Conditional 6-8
country Country in ISO Alpha-2 format String Mandatory 2

senderKyc:subjectName

Parameter name Description Data Type Requirement Field Length
title Title of the Sender String Optional 0-6
firstName First name of the Sender String Mandatory 1-50
middleName Middle name of the Sender String Optional 0-20
lastName Last name of the Sender String Mandatory 1-50
fullName Full name of the Sender String Optional 1-128

recipientKyc: Applicable for b2p type transactions

Parameter name Description Data Type Requirement Field Length
nationality Nationality of the customer in ISO Alpha-2 format. e.g. US String Optional 2
dateOfBirth Beneficiary's Date of Birth in YYYY-MM-DD format String Optional 10
gender Beneficiary's Gender. Enumeration = (M)ale, (F)emale, (U)nspecified String Optional 1
emailAddress Personal email Id String Optional 0-60

recipientKyc:subjectName

Parameter name Description Data Type Requirement Field Length
firstName First name of the beneficiary String Mandatory 1-50
lastName Last name of the beneficiary String Mandatory 1-50
fullName Full name of the beneficiary String Mandatory 1-120
regionalBeneficiaryName Regional Beneficiary Name as per bank account (Japanese language: Katakana) String Conditional 1-50

recipientKyc:idDocument

Parameter name Description Data Type Requirement Field Length
idType Beneficiary's Id document as required in the destination country. Please click here for the list of required document in each country.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 1-20
idNumber Beneficiary's Id document number.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 1-30
issueDate Beneficiary's Id document issue date in YYYY-MM-DD format. String Optional 10
expiryDate Beneficiary's Id document expiry date in YYYY-MM-DD format.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 10
issuerCountry Country where the identification type was issued in ISO Alpha-2 format. String Optional 2

internationalTransferInformation:

Parameter name Description Data Type Requirement Field Length
quoteId The specific quoteId to be used for the transaction. This quoteId is generated when a quotation is created and it is returned on the quotation response String Mandatory 16-20
receivingCountry Destination country where the payout is to be made. To be specified in ISO Alpha 2 format. e.g. NG String Mandatory 2
remittancePurpose Reason for the transfer. Click here to find the accepted values. String Mandatory 4-30
sourceOfFunds Source of funds. String Mandatory 4-17
relationshipSender The relation between the sender and the beneficiary. String Optional 3-11

businesssenderKyc: Applicable for b2p and b2b business transactions

Parameter name Description Data Type Requirement Field Length
businessName Company Name String Mandatory 4-180
businessPINCode Company Pin Code String Optional 2-20
businessAddress1 Registered Address 1 String Mandatory 4-512
businessAddress2 Registered Address 2 String Optional 4-20
businessAddressCity Registered City.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 4-20
businessAddressState Registered State. String Optional 4-20
businessAddressCountryCode Registered Country Code in ISO Alpha 2 standard String Optional 2
businessAddressZip Registered address Zip Code String Optional 4-20
businessPrimaryContactCountryCode Company Primary Contact Country Code in ISO Alpha 2 standard String Mandatory 2
businessPrimaryContactNo Company Primary Contact Number String Mandatory 10-15
businessDescription Short description of the business String Optional 0-100
businessEmail Company email id String Mandatory 0-100
businessCountryCode Company Country Code in ISO Alpha 2 standard String Mandatory 2
businessRegistrationType Type of Registration String Mandatory 4-100
businessRegistrationIssuedBy Company Incorporation Issued by String Optional 0-20
businessRegistrationIssuedAt Company Incorporation Issued at String Optional 0-20
businessRegistrationNumber Company Incorporation Number String Mandatory 4-20
businessRegistrationIssueDate Company Incorporation Issued Date in YYYY-MM-DD format. String Mandatory 10
businessIDValidThru Company Incorporation Expiry Date in YYYY-MM-DD format. String Mandatory 10

businessrecipientKyc: Applicable for p2b and b2b business transactions

Parameter name Description Data Type Requirement Field Length
businessName Company Name String Mandatory 4-180
businessPINCode Company Pin Code String Optional 2-20
businessAddress1 Registered Address 1 String Optional 4-20
businessAddress2 Registered Address 2 String Optional 4-20
businessAddressCity Registered City String Optional 4-20
businessAddressState Registered State String Optional 4-20
businessAddressCountryCode Registered Country Code in ISO Alpha 2 standard String Mandatory 2
businessAddressZip Registered address Zip Code String Optional 4-20
businessPrimaryContactCountryCode Company Primary contact country code in ISO Alpha 2 standard String Optional 2
businessPrimaryContactNo Company Primary Contact Number String Optional 10-15
businessPrimaryContactNoType Company Primary Contact Number type i.e. Personal/Office String Optional 4-50
businessDescription Short description of the business String Optional 0-100
businessEmail Company email id String Optional 0-100
businessCountryCode Company country code in ISO Alpha 2 standard String Optional 2
businessRegistrationType Type of Registration String Conditional 0-100
businessRegistrationNumber Company Incorporation Number.
Note: Mandatory/Optional requirement of this field is destination country specific.
String Conditional 0-20
businessRegistrationIssuedBy Company Incorporation Issued by String Optional 0-20
businessRegistrationIssuedAt Company Incorporation Issued at String Optional 0-20
businessRegistrationIssueDate Company Incorporation Issued Date String Optional 0-10
businessIDValidThru Company Incorporation Expiry Date String Optional 0-10
typeofbusiness Type of Company String Optional 0-20
businessPObox Company PO Box String Optional 0-10
regionalBeneficiaryName Regional Beneficiary Name as per bank account (Japanese language: Katakana) String Conditional 1-50

Response Codes & Messages

Generic Response

Generic Response Code & Messages

Response Code Response Message Contact TerraPay Transaction Action Remarks/Comments
1000 Invalid [propertyName] No Retry Check for invalid request parameter(s)
1001 [propertyName] value should be between [minlength] to [maxlength] No Retry Check for invalid request parameter(s)
1002 [propertyName] must be [length] No Retry Check for invalid request parameter(s)
1003 Authentication failed. Username or Password is incorrect. Yes Retry Contact TerraPay operations team for valid username and password.
1004 Invalid parameters in the request No Retry Check for invalid request parameter(s).
1005 Mandatory fields are missing No Retry Check for invalid request parameter(s).
1006 Request SHA256 checksum mismatch No Retry Check for invalid checksum sent with request.
1007 Server is busy. Please do a status enquiry to check if your transactions reached TerraPay. No Status check Call the status API till transaction status changes to success/failed.
1010 Source country not allowed Yes Retry Operation team needs to check source country configuration.
1011 Destination country not allowed Yes Retry Operation team needs to check destination country configuration.
1012 Source currency not allowed Yes Retry Operation team needs to check source currency configuration.
1013 Destination currency not allowed Yes Retry Operation team needs to check destination currency configuration.
1014 Source country inactive Yes Retry Operation team needs to check source country configuration.
1015 Destination country inactive Yes Retry Operation team needs to check destination country configuration.
1016 Failed to get destination partner Yes Retry Operation team needs to check corridor configuration.
1017 Source partner validity fail Yes Retry operations team needs to extend validity of source partner in system.
1018 Destination partner validity fail Yes Retry operations team needs to extend validity of destination partner in system.
1019 Source partner suspended Yes Retry operations team needs to check activation status of partner.
1020 Destination partner suspended Yes Retry operations team needs to check activation status of partner.
1021 Source partner inactive Yes Retry operations team needs to check activation status of partner.
1022 Destination partner inactive Yes Retry operations team needs to check activation status of partner.
1023 Corridor validity failed Yes Retry operations team needs to check corridor validity.
1024 Corridor Suspended Yes Retry operations team needs to check corridor activation status.
1026 Source MSISDN not allowed. No Cancel Invalid source/sender's mobile number.
1027 Source MSISDN Blacklisted. No Cancel Source/sender's mobile number is black listed.
1028 Destination MSISDN not allowed. No Cancel Invalid destination mobile number.
1029 Destination MSISDN Blacklisted. No Cancel Destination mobile number is black listed.
1030 Corridor not exists Yes Retry Operation team needs to check corridor configuration.
1031 Source currency inactive Yes Retry Operation team needs to check currency configuration.
1032 Destination currency inactive Yes Retry Operation team needs to check currency configuration.
1046 Invalid Transaction ID. No Retry Check for transaction Id format (special characters).
1061 Destination Country Sanctioned. No Cancel Destination country is on sanction list.Transaction cannot be delievered.
1062 Source Country Sanctioned. No Cancel Source country is on sanctionlist. Transaction cannot be delievered.
1073 Routing Failed. Yes Retry Route is inactive.Check with TerraPay operations team to enable the route and retry.
1603 Beneficiary name invalid. No Cancel Transaction failed as beneficary name is invalid.
1604 Sender name invalid. No Cancel Transaction failed as sender name is invalid.

Beneficiary Validation Responses

Beneficiary Validation Responses Codes & Messages

Response Code Response Message Contact TerraPay Transaction Action Remarks/Comments
6000 Beneficiary MSISDN Validation Success No No Transaction validation is success.
6001 Corridor does not exists Yes Retry Operation team needs to check the corridor configuration.
6002 Corridor inactive Yes Retry Operation team needs to check the corridor configuration.
6003 Beneficiary MSISDN blacklisted No Cancel Beneficiary MSISDN has been blacklisted on TerraPay system..
6004 Beneficiary validation failed Yes Cancel Operation team needs to check.
6005 Beneficiary Registered but not KYCed No Cancel Beneficiary is registered with destination partner network with incomplete KYC details.
6006 Beneficiary MSISDN not found No Cancel Beneficiary is not registered with destination partner network.
6007 Beneficiary Suspended No Cancel Beneficiary is in suspended state on TerraPay system.
6008 Beneficiary name does not match No Cancel Beneficiary validation failed.
6009 Beneficiary validation failed. Request timed out at destination partner Yes Retry Operation team needs to check the time out issue.
6010 Mandatory KYC parameter check failed Yes Retry Resend the transaction with required KYC parameters.
6011 Validation Failed. Beneficiary must register or upgrade KYC Level to receive transactions No Cancel Beneficiary validation failed.
6012 Beneficiary KYC Verification Pending No Cancel Beneficiary validation failed.
6013 Receiver Name Missing No Cancel Beneficiary validation failed.
6014 Customer Not Registered No Cancel Beneficiary validation failed.
6017 Beneficiary Account is locked No Cancel Beneficiary validation failed.
6019 Destination Partner Timed Out - Please retry. Yes Retry Operation team needs to check time out issue.
6022 Beneficiary Account Inactive No Cancel Beneficiary validation failed.
6020 Validation Invalid MSISDN No Cancel Invalid Phone Number
6041 Beneficiary document type is invalid. No Cancel Beneficiary document type is invalid.
6042 Beneficiary is under age. No Cancel Beneficiary is under age
6043 Beneficiary Account amount limit exceeded. No Cancel Beneficiary has exceeded the maximum amount they can receive in the specified currency.
6044 Sender does not comply with the partner's policies. No Cancel The sender does not comply with our internal policies for sending money.
6045 Receiver does not comply with the partner's policies. No Cancel The receiver does not comply with our internal policies for receiving money.
6046 Sender's country does not comply with the partner's policies. No Cancel The country of the sender does not comply with our internal policies for receiving money.
6047 Beneficiary has not accepted the automatic payment. No Success/Cancel Beneficiary is not configured to receive automatic payments. The transaction can still be sent but will be pending at the beneficiary to accept the payment.
6101 Destination bank not configured Yes Retry Operation team needs to check configuration.
6102 Invalid Bank Account Number No Cancel Send the transaction with valid account number.
6103 Destination bank not reachable Yes Retry Operation team needs to check.
6104 Validation Failed at Destination Partner Yes Retry Operation team needs to check.
6105 BankSubCode is missing No Retry Retry with correct data.
6023 Provider code/bank subcode is missing No Cancel Send the transaction with valid provider code.
6024 Provider code does not match operator network No Cancel Send the transaction with valid provider code.
6025 Invalid UPI ID format No Cancel Send the transaction with valid UPI address.
6026 Bank UPI Not Supported No Cancel Beneficiary validation failed.
6027 Incorrect IFSC Code No Retry Retry with correct data.
6028 Validation Penny Drop Service down Yes Retry Operation team needs to check.
6030 Account cannot be validated No Cancel Beneficiary validation failed.
6033 IMPS Node down Yes Retry Operation team needs to check.
6034 Unable to process request Yes Retry Operation team needs to check.
6035 Invalid response from partner Yes Retry Operation team needs to check.
6036 Invalid sort code No Retry Retry with correct data.

Quote Response

Quote Response Codes & Messages

Response Code Response Message Contact TerraPay Transaction Action Remarks/Comments
2000 Quote Success No No Quotation is success.
2001 Source amount is invalid No Retry Send correct/valid source amount with quote request.
2002 Beneficiary MSISDN validation failed No Cancel Beneficiary validation is in failure state for which quote request is initiated.
2003 Failed to get Forex rate Yes Retry Operation team needs to check rate configuration.

Quotations Response Code v2

Quotations Response Code v2

Additional response codes in quotations V2:

Response Code Response Message
2011 Invalid scheme.
2012 Scheme or pan mandatory.
2013 Scheme is not supported.
2014 Scheme mismatch.

Additionally, validation will be conducted between quote and remit parameters:

  1. If a quote is done on p2p, the transaction should be initiated for p2p only.
  2. If they are sending a quote with default and transaction with p2b, after deployment there will be a failure on the transaction.
  3. If a quote is done on default scheme for bank and wallet, transactions can be done for both PRI and NON PRI quote for bank and wallet.
  4. If a scheme-specific quote is done, transactions with the same scheme will only be processed. If the scheme does not match, an error will be given.
  5. For Card, either the scheme or PAN field is mandatory. If both are given, the PAN will be validated to match the scheme. If no match, an error will be given.

Remit Response

Remit Response Codes & Messages

Response Code Response Message Contact TerraPay Transaction Action Remarks/Comments
3000 Remit Success No No Transaction is in success state.
3050 Remit Acknowledged, status PENDING No Status check Call the status API till transaction status changes to success/failed.
3001 Transaction request should be current date. No Retry Correct the date in the request and retry the transaction with the same reference or id.
3002 Beneficiary Validation failed No Retry Beneficiary validation is in failure state. Send another validation request and then re-initiate the transaction.
3003 Transaction id is invalid No Retry Retry the status check with a valid partner or TerraPay transaction reference or id.
3004 Duplicate transaction Id No Status check There is already a transaction being processed with the same reference or id. Please do a status check to get an update
3005 Quote and Remit parameters do not match No Retry The amount sent in the transaction request does not match the amount returned back by the quotation response. Please chck and resend with correct details.
3006 Sender KYC validation failed No Cancel Transaction failed. Please reach out to compliance for further details.
3007 Beneficiary KYC validation failed No Cancel Transaction failed. Please reach out to compliance for further details.
3008 Quote expired No Cancel Initiate a new a quote request and then send a new transaction with the quote reference generated.
3009 Failed to process quote request Yes Retry Operation team needs to check the forex configuration
3010 Mandatory KYC parameter check failed No Retry Check for sender's KYC parameters in remit request.
3011 Invalid Fx Rate Yes Retry Operation team needs to check the forex configuration
3022 Corridor validation failed Yes Retry Operation team needs to check the corridor configuration.
3030 Possible duplicate transaction received within configured time. Yes Retry Wait for sometime and send the transaction again.
3031 Connection timeout while connecting to destination partner Yes Retry Wait for sometime and send the transaction again.
3032 Remit failed Yes Cancel The transaction has failed.
3049 Remit Failed. Insufficient funds No Retry Check your balance at TerraPay and retry after balance is funded.
3060 Beneficiary daily transaction count limit reached No Cancel Beneficiary has reached the daily transaction count.
3061 Beneficiary weekly transaction count limit reached No Cancel Beneficiary has reached the weekly transaction count.
3062 Beneficiary monthly transaction count limit reached No Cancel Beneficiary has reached the monthly transaction count.
3072 Beneficiary daily transaction amount limit reached. No Cancel Beneficiary daily transaction amount limit reached.
3073 Beneficiary weekly transaction amount limit reached. No Remit Beneficiary weekly transaction amount limit reached.
3074 Beneficiary monthly transaction amount limit reached No Cancel Beneficiary monthly transaction amount limit reached.
3075 Sending Partner Min allowed amount check failed. No Cancel Sending partner is sending less than minimum configured transaction amount.
3076 Sending Partner Max allowed amount check failed. No Cancel Sending partner is sending more than maximum configured transaction amount.
3077 Receiving Partner Min allowed amount check failed. No Cancel Receiving partner is receiving less than minimum configured transaction amount.
3078 Receiving Partner Max allowed amount check failed. No Cancel Receiving partner is receiving more than maximum configured transaction amount.
3079 Sender Min allowed amount check failed. No Cancel Sender is sending less than minimum configured transaction amount.
3080 Sender Max allowed amount check failed. No Cancel Sender is sending more than maximum configured transaction amount.
3081 Receiver Min allowed amount check failed. No Cancel Beneficiary is receiving less than minimum configured transaction amount.
3082 Receiver Max allowed amount check failed. No Cancel Beneficiary is receiving more than maximum configured transaction amount.
3100 Credit Failed. Msisdn not found. No Cancel Transaction has failed due to invalid wallet account.
3101 Bank Credit Failed. Invalid Account. No Cancel Transaction has failed by bank due to invalid bank account.
3102 Bank Credit Failed. Bank Not Reachable. No Cancel Transaction failed by destination partner as bank is not reachable.
3103 Bank credit failed. Account name mismatch. No Cancel Transaction failed by bank due to account name mismatch.
3104 Bank credit failed. Transaction limit exceeded. No Cancel Transaction failed by bank as transaction limit exceeded.
3105 Bank credit failed. Transaction not permitted. No Cancel Transaction failed by bank as transaction is permitted.
3106 Bank credit failed. Unknown Error. No Cancel Transaction
3107 Invalid Amount Limit. No Cancel Transaction failed due to max limit per transaction.
3109 Insufficient funds in the receiving partner account. Yes Cancel Operation team needs to check the prefunding balance.
3110 Invalid Beneficiary Account No Cancel Transaction has failed due to invalid account.
3111 Beneficiary Account not Registered No Cancel Transaction has failed due to account not registed.
3113 Beneficiary Account Limit Reached. No Cancel Transaction failed due to transaction limit exceeded.
3114 Beneficiary Account Barred. No Cancel Transaction failed as account is Barred.
3115 Beneficiary Account Inactive No Cancel Transaction failed as account is inactive.
3116 Beneficiary Account Locked No Cancel Transaction failed as account is locked.
3117 Transfer type not supported No Cancel Please check the transfer type and retry the transaction with the correct Transfer type
3132 Remit Failed - Max retry limit reached. No Cancel Transaction failed as transaction limit exceeded.
3133 Sender KYC Sanctioned No Cancel Transaction failed as sender is on sanction list
3141 Beneficiary yearly transaction amount limit reached No Cancel Beneficiary has reached the yearly amount limit.
3150 Transaction on hold due to compliance reason. Yes Status Check Check with TerraPay compliance team on additional complaince requirements.
3202 Remit failed No Cancel Rejected by destination bank.
3208 Reversal Pending Yes Status Check Reversal is pending for approval.Check with TerraPay Operations team.Call the status API till transaction status changes to success/failed.
3210 Invalid sort code No Cancel Invalid sort code
3211 Beneficiary Opt-in Pending No Status check Call the status API till transaction status changes to success/failed.
3212 Beneficiary Pending Cashout No Status check Call the status API till transaction status changes to success/failed.
3213 Beneficiary Pending Review No Status check Call the status API till transaction status changes to success/failed.
3214 Beneficiary Pending Registration No Status check Call the status API till transaction status changes to success/failed.
3215 Commercial Transaction Yes Retry Operation team needs to check with receive partner.
3216 Invalid Beneficiary contact details No Cancel Resend the transaction with valid beneficiary contact details.
3217 Beneficiary Unresponsive No Cancel Resend the transaction with valid beneficiary details.
3218 Beneficiary Pending Upgrade No Status check Call the status API till transaction status changes to success/failed.
3219 Beneficiary Pending Adjustment No Status check Call the status API till transaction status changes to success/failed.
3222 Invalid UPI amount. No Cancel The provided amount is not acceptable for UPI transaction.
3223 Transaction rejected at wallet operator. No Cancel Transaction rejected by the wallet operator. Please cancel and refund the sender.
3224 Transaction rejected due to compliance No Cancel Please cancel and refund the sender.
3225 Cancellation requested by the sender No Cancel Please cancel and refund the sender.
3226 Transaction rejected due to outage/downtime. No Cancel Please cancel and refund the sender.
3227 Duplicate PRI request No Cancel Duplicate PRI transaction.
3251 Remit acknowledged. Transaction is on hold due to a possible duplicate. Yes Status Check TerraPay system detected possible duplicate. Please check with Operations for processing the transaction.
3401 Beneficiary document type is invalid No Cancel Beneficiary document type is invalid.
3402 Sender document type is invalid No Cancel Sender document type is invalid.
3403 Account name is mismatch No Cancel Account name is mismatch.
3404 Sender address is invalid No Cancel Sender address is invalid.
3405 Beneficiary address is invalid No Cancel Beneficiary address is invalid.
3406 Transaction currency is invalid No Cancel Transaction currency is invalid.
3407 Beneficiary is under age No Cancel Beneficiary is under age.
3408 Beneficiary has not accepted the automatic payment. No Status Check The user has not enabled automatic payment. Kindly reach out to them and request that they enable automatic payment on the app.

Remit and Quote Validation V2

Remit and Quote Validation V2

Response Codes for Quotations V2 API:

Response Code Response Message
3014 Quote and Remit parameters do not match: Transaction type does not match.
3015 Quote and Remit parameters do not match: Instrument type does not match.
3016 Quote and Remit request mismatch: Scheme does not match.
3017 Quote and Remit request mismatch: Destination currency does not match.
3018 Quote and Remit request mismatch: Destination Country does not match.

Purpose, Source of Funds, and Relationship

Person To Person

P2P Purpose for Transaction

Sl. no. Purpose
1 Business Profits to Parents
2 Business Travel
3 Family Maintenance
4 Salary
5 Savings
6 Medical Expenses
7 Tuition Fees
8 Education Support
9 Gift
10 Home Improvement
11 Debt Settlement
12 Real Estate
13 Taxes

P2P Source of Funds

Sl. no. Source of Funds Proof
1 Salary
    Latest Bank statement
    ATM Withdrawal slip
    Loan Agreement
2 Savings
3 Lottery
4 Loan
5 Business Income
6 Others

P2P Relationship

Sl. no. Relationship
1 Father
2 Mother
3 Spouse
4 Son
5 Daughter
6 Brother
7 Sister
8 Friend
9 Employer
10 Colleague
11 Self
12 Guardian
13 Husband
14 Wife
15 Employee
16 In-Laws
17 Cousin
18 Partners
19 Aunt
20 Uncle
21 Bank Notes
22 Own Account
23 Sponsor
24 Director
25 Authorized Signatory
26 Corporate Representative
27 Owner
28 Brother In Law
29 Business
30 Child
31 Corporate
32 Daughter In Law
33 Family
34 Father In Law
35 Friend's Father
36 Friend's Mother
37 Grand Daughter
38 Grand Father
39 Grand Mother
40 Grand Son
41 Mother In Law
42 Neighbour
43 Nephew
44 Niece
45 Parent
46 Relative
47 Sister In Law
48 Son In Law
49 Step Child

Person to Business

P2B Purpose for Transaction

Sl. no. Purpose
1 Advanced Goods Payments
2 Business profits to Parents
3 Business Travel
4 Charitable Donation
5 Conference or Training Fee
6 Employee Compensation
7 Events or Competition Participation Expenses
8 Export Goods Payments
9 Goods and Services
10 Goods Exported
11 Loan Repayment
12 Other Business
13 Other Business Services
14 Rent Property Expenses
15 Salary Payment
16 Software Export
17 Travel Cost Accomodation Cost
18 Travel Expenses

P2B Source of Funds

Sl. no. Source of Funds Proof
1 Salary
    Audited Financials
    Loan Agreement
    Invoice Copy
    Latest Bill
2 Savings
3 Lottery
4 Loan
5 Business Income
6 Business Profit
7 Settlement
8 Others

Business to Person

B2P Purpose for Transaction

Sl. no. Purpose
1 Advanced Goods Payments
2 Business profits to Parents
3 Business Travel
4 Charitable Donation
5 Conference or Training Fee
6 Employee Compensation
7 Events or Competition Participation Expenses
8 Export Goods Payments
9 Goods and Services
10 Goods Exported
11 Loan Repayment
12 Other Business
13 Other Business Services
14 Rent Property Expenses
15 Salary Payment
16 Software Export
17 Travel Cost Accomodation Cost
18 Travel Expenses

B2P Source of Funds

Sl. no. Source of Funds Proof
1 Salary
    Audited Financials
    Loan Agreement
    Invoice Copy
    Latest Bill
2 Savings
3 Lottery
4 Loan
5 Business Income
6 Business Profit
7 Settlement
8 Others

Business to Business

B2B Purpose for Transaction

Sl. no. Purpose
1 Advanced Goods Payments
2 Business profits to Parents
3 Business Travel
4 Charitable Donation
5 Conference or Training Fee
6 Employee Compensation
7 Events or Competition Participation Expenses
8 Export Goods Payments
9 Goods and Services
10 Goods Exported
11 Loan Repayment
12 Other Business
13 Other Business Services
14 Rent Property Expenses
15 Salary Payment
16 Software Export
17 Travel Cost Accomodation Cost
18 Travel Expenses

B2B Source of Funds

Sl. no. Source of Funds Proof
1 Salary
    Audited Financials
    Loan Agreement
    Invoice Copy
    Latest Bill
2 Savings
3 Lottery
4 Loan
5 Business Income
6 Business Profit
7 Settlement
8 Others

Country Specific Parameters list

Country Specific Beneficiary Mandatory Parameters List:

Country Name Bank Details Beneficiary Details Remark
Australia Bank name, bank code,bank state branch code & bank account number. Beneficiary first name, last name, address, city, state, postalcode. 6 digit BSB code need to be requested from the sender.
Bangladesh 1. Bank name, bank account number and Routing number.
For Bangladesh bank transactions only, NPSB scheme is allowed for quote transactions.
Beneficiary first name, last name. Routing numbers need to be requested from the sender.
Canada Bank name, bank account number & Routing number. Beneficiary First name, Last name, Address, PostalCode, City, Province and Country.
Note: Province and Country in ISO Aplpha-2 format.
1. Bank name & 8 digit routing numbers (3 digit Bank code + 5 digit transit code ) need to be requested from the sender.
2. Transaction to province Quebec is allowed.
3. Sender State province and Postal Code are mandatory if Sender Country is US or CA
China Static Bank name: (UNION PAY), Provider code: (CNUNIONPAY) & 16 digit card number. Provider Code (CNLIANLIAN) for Business Payout. Beneficiary first name, last name & mobile number.
El Salvador,Nicaragua, Honduras Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name & mobile number.
Hong Kong Bank name, bank code, bank branch code & account number. Beneficiary first name, last name 3 digit bank branch code can be collected from the sender
India 1. Bank name, bank account number & IFSC code for IMPS, NEFT and RTGS payouts
2. Virtual Payment Address (VPA) and provider code (INUPI01)
Beneficiary first name, last name. IFSC code and Bank name to be requested from the sender.
Israel 1. Bank name, Bank account number, Bank code and Branch Code.
Beneficiary first name, last name. Branch Code need to be requested from the sender.
Jamaica Bank name, bank account number, account type, & Branch Code. Beneficiary first name, last name, address, city, stateProvince, country. Branch Code (5 digits) need to be requested from the sender.
Japan Bank name, bank account number & zengin code. Beneficiary first name, last name,full name, Address,city,country,mobile number,Postal code 1. 7 digit zengin code (4 digit Bank code + 3 digit branch code ) need to be requested from the sender.
Kuwait Bank name, IBAN & SWIFT/BIC code. Beneficiary first name, last name, mobile number,ID number,ID type,ID expiry date
LATAM Region
(Except Mexico, Guatemala)
Bank name, bank code, bank account number, bank branch code, account type.
Note: 1. Account type is mandatory only for business transactions.
2. Branch code is mandatory for transaction to Brazil.
3. Provider code is mandatory for PIX key based transaction to Brazil.
- For Phone number code is BR_PIX_T
- For E-mail code is BR_PIX_E
- For Id Number code is BR_PIX_C
- For Random pix key code is BR_PIX_A
Beneficiary first name, last name, Beneficiary address, City, ID type & ID number.
  • Bank branch codes need to be requested from the sender.
  • Supported account types: Checking & Savings
  • Malaysia Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name
    Myanmar Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name, mobile number,ID number, ID type
    Qatar Bank name, IBAN & SWIFT/BIC code. Beneficiary first name, last name, mobile number,ID number,ID type,Nationality
    Pakistan 1. Bank name, bank account number or IBAN & bank code
    2. For PRI payment provider code is PKPRI
    Beneficiary first name, last name.
    Philippines 1. Bank name, bank account number & bank code
    2. For OFW payment provider code is PH_OFW
    Beneficiary first name, last name.
    Russia Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name. Bank name & 9 digit SWIFT/BIC code need to be requested from the sender.
    SEPA Bank name and IBAN. Beneficiary first name, last name. Bank name need to be requested from the sender.
    Singapore Bank name, bank account number,bank code Beneficiary first name, last name,full name,Address,city and country
    South Africa Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name & mobile number.
    South Korea Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name, mobile number
    Turkey Bank name and IBAN. Beneficiary first name, last name. Bank name need to be requested from the sender.
    UAE Bank name, bank code & IBAN Beneficiary first name, last name
    UK 1. Bank name and IBAN.
    OR
    Bank name, bank account number & sort code.
    Beneficiary first name, last name. Bank name & sort code need to be requested from the sender.
    Ukraine IBAN. Beneficiary first name, last name, mobile number
    USA Bank name, SWIFT/BIC code, bank account number & Routing number. Beneficiary first name,last name, address, postalCode, city,province and country
    Note: Province and Country in ISO Aplpha-2 format.
    1. Bank name & 9 digit routing number need to be requested from the sender.
    2. Sender State province and Postal Code are mandatory if Sender Country is US or CA
    Rest all country Bank name, bank account number & SWIFT/BIC code. Beneficiary first name, last name.

    Country Specific Recipient Documents

    Country Specific Recipient Documents

    Country Name ReceiverKYC IDType
    Argentina Tax ID No.
    Bolivia Identity Card, Foreigner ID.
    Brazil CPF, CNPJ.
    Chile Tax ID No.
    Colombia Citizenship card , NIT, Passport, Foreigner ID, Special Stay Permit, Identity Card.
    Costa Rica Identity Card, Legal Identity, Certificate of Residence, Passport, Tax ID No.
    Dominican Republic Identity Card, Tax ID No, Passport.
    Ecuador Identity Card, Tax ID No, Passport.
    Gautemala Tax ID No, Identity Card.
    Kuwait Civil ID, Passport, Health Card, GCC Card, Security Card, and Others.
    Myanmar NRIC, Government issued ID, Passport, Driver's License, PR.
    Panama ID number, Tax Id No, Passport.
    Paraguay Identity Card, Civil National Identity Card.
    Peru Citizen ID, Business ID, Foreign Resident ID, Passport.
    Qatar Passport,QID (Qater ID), Diplomatic ID.
    UAE GCC ID, Passport, National ID, Emirates ID.
    Uruguay Identity Card, Tax ID No, Passport.

    About

    TerraPay is a licensed digital payments infrastructure and solutions provider, paving the global payments highway. For more information about us, click here: https://www.terrapay.com/about-us.php