Checkout Method
To pass the parameters, we accept both POST method and GET method. You may use any of POST or GET.
End Point URL |
Ask to account provider
|
Method |
POST or GET
|
Function |
Accept Check or Credit card payment online from the customers
|
Remark |
10 mandatory parameters, the others are all optional
|
Parameter |
Parameter Type |
Description |
api_token |
Required |
Website API Token is a string value. You can find it by following My Website Website API Token (as created inside area of New Website)
|
website_id |
Required |
Website Id is very important parameter can find 'Website Id' as a numeric value the My Website area or you can find it easily by following My Website → Add New Websit
|
cardsend |
Required |
cardsend, a string for default (fixed) value CHECKOUT.
|
client_ip |
Required |
Client IP a php code dynamic get IP value ($_SERVER['HTTP_X_FORWARDED_FOR']? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']).
|
action |
Required |
action, a string for default (fixed) value product.
|
source |
Required |
source, a string for default (fixed) value Host-Redirect-Card-Payment (Core PHP).
|
source_url |
Required |
source_url, Product or Service url of source_url as per your domain - a string for default (fixed) value isset($_SERVER["HTTPS"]) ? 'https://':'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'].
|
checkout_url |
Not Required |
checkout_url as per your domain - a string for default (fixed) value Merchant checkout page url(https://xyz.com/?id_order=12345678).
|
price |
Required |
Order Amount, currency format in decimal(10.00)
|
curr |
Required |
Currency name of Order Amount, should be string
|
product_name |
Required |
Product Name
|
fullname |
Required |
Customer full name
|
email |
Required |
Customer billing email
|
bill_street_1 |
Required |
Customer's shipping street
|
bill_street_2 |
Required |
Customer's shipping street 2
|
bill_city |
Required |
Customer's shipping city
|
bill_state |
Required |
Customer's shipping state - For the USA, Canada, Australia and Japan's please use 2 letters state code.
|
bill_country |
Required |
Customer's shipping country - full country name in english or two digit ISO code
|
bill_zip |
Required |
Customer's shipping zip code
|
bill_phone |
Required |
Customer billing phone
|
id_order |
Required |
Merchant’s order ID that will be returned back in a callback.
|
notify_url |
Required |
Synchronous notification URL, you can find it in the response data.
|
success_url |
Required |
Redirect url of success as per your domain
|
error_url |
Required |
Redirect url of error as per your domain
|
Example of Checkout Method
<form method="post" action="**************" name="paymentform">
<!-- Replace of 2 very important parameters * your Website API Token and Website ID -->
<input type="hidden" name="api_token" value="*****************"/>
<input type="hidden" name="website_id" value="****"/>
<!-- default (fixed) value * default -->
<input type="hidden" name="cardsend" value="CHECKOUT"/>
<input type="hidden" name="client_ip" value="<?php echo ($_SERVER['HTTP_X_FORWARDED_FOR']?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']);?>"/>
<input type="hidden" name="action" value="product"/>
<input type="hidden" name="checkout_url" value="Merchant checkout page url(https://xyz.com/?id_order=12345678)"/>
<input type="hidden" name="source" value="<Host-Redirect-Card-Payment (Core PHP)>"/>
<input type="hidden" name="source_url" value="<?php echo (isset($_SERVER["HTTPS"])?'https://':'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);?>"/>
<!-- product price and product name * by cart total amount -->
<input type="hidden" name="price" value="10.00"/>
<input type="hidden" name="curr" value="USD"/>
<input type="hidden" name="product_name" value="Testing Product"/>
<!-- billing details of .* customer -->
<input type="hidden" name="fullname" value="Customer Full Name"/>
<input type="hidden" name="email" value="test@gmail.com"/>
<input type="hidden" name="bill_street_1" value="2666 Wilkinson Court"/>
<input type="hidden" name="bill_street_2" value="2666 Wilkinson Court"/>
<input type="hidden" name="bill_city" value="Fort Myers"/>
<input type="hidden" name="bill_state" value="Florida"/>
<input type="hidden" name="bill_country" value="United States of America"/>
<input type="hidden" name="bill_zip" value="33901"/>
<input type="hidden" name="bill_phone" value="239-533-0838"/>
<input type="hidden" name="id_orde" value="2021013120170131"/>
<input type="hidden" name="notify_url" value="https://yourdomain.com/notify.php"/>
<input type="hidden" name="success_url" value="https://yourdomain.com/success.php"/>
<input type="hidden" name="error_url" value="https://yourdomain.com/failed.php"/>
<input type="submit" name="submit" value="SUBMIT"/>
<script>document.paymentform.submit();</script>
Server 2 Server (S2S)
Registered merchants can use the parameters by using POST method
to make sure the values won’t be changed.
End Point URL |
Ask to account provider
|
Method |
POST
|
Function |
Accept credit card payment online from the customers
|
Remark |
11 mandatory parameters, the others are all optional
|
Parameter |
Parameter Type |
Description |
api_token |
Required |
Website API Token is a string value. You can find it by following My Website Website API Token (as created inside area of New Website)
|
website_id |
Required |
Website Id is very important parameter can find 'Website Id' as a numeric value the My Website area or you can find it easily by following My Website → Add New Website
|
cardsend |
Required |
cardsend, a string for default (fixed) value curl.
|
client_ip |
Required |
Client IP a php code dynamic get IP value ($_SERVER['HTTP_X_FORWARDED_FOR']? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']).
|
action |
Required |
action, a string for default (fixed) value product.
|
source |
Required |
source, a string for default (fixed) value Curl-Direct-Card-Payment.
|
source_url |
Required |
source_url, Product or Service url of source_url as per your domain - a string for default (fixed) value isset($_SERVER["HTTPS"]) ? 'https://':'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'].
|
checkout_url |
Not Required |
checkout_url as per your domain - a string for default (fixed) value Merchant checkout page url(https://xyz.com/?id_order=12345678).
|
price |
Required |
Order Amount, currency format in decimal(10,2)
|
curr |
Required |
Currency name of Order Amount, should be string
|
product_name |
Required |
Product Name
|
fullname |
Required |
Customer full name
|
email |
Required |
Customer billing email
|
bill_street_1 |
Required |
Customer's shipping street
|
bill_street_2 |
Required |
Customer's shipping street 2
|
bill_city |
Required |
Customer's shipping city
|
bill_state |
Required |
Customer's shipping state - For the USA, Canada, Australia and Japan's please use 2 letters state code.
|
bill_country |
Required |
Customer's shipping country - full country name in english or two digit ISO code
|
bill_zip |
Required |
Customer's shipping zip code
|
bill_phone |
Required |
Customer billing phone
|
id_order |
Required |
Merchant’s order ID that will be returned back in a callback.
|
notify_url |
Required |
Synchronous notification URL, you can find it in the response data.
|
success_url |
Required |
Redirect url of success as per your domain
|
error_url |
Required |
Redirect url of error as per your domain
|
Example of Server 2 Server (S2S)
$gateway_url="**********";
$protocol = isset($_SERVER["HTTPS"])?'https://':'http://';
$referer=$protocol.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$curlPost=array();
/*Replace of 2 very important parameters * your Website API Token and Website ID*/
$curlPost["api_token"]="**************"; // Website API Token
$curlPost["website_id"]="****"; // Website Id
/*default (fixed) value * default*/
$curlPost["cardsend"]="curl";
$curlPost["client_ip"]=($_SERVER['HTTP_X_FORWARDED_FOR']?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']);
$curlPost["action"]="product";
$curlPost["source"]="Curl-Direct-Card-Payment";
$curlPost["source_url"]=$referer;
/*product price,curr and product name * by cart total amount*/
$curlPost["price"]="30.00";
$curlPost["curr"]="USD";
$curlPost["product_name"]="Testing Product";
/*billing details of .* customer*/
$curlPost["fullname"]="Test Full Name";
$curlPost["email"]="test.5458@test.com";
$curlPost["bill_street_1"]="25A Alpha";
$curlPost["bill_street_2"]="tagore lane";
$curlPost["bill_city"]="Jurong";
$curlPost["bill_state"]="Singapore";
$curlPost["bill_country"]="Singapore";
$curlPost["bill_zip"]="787602";
$curlPost["bill_phone"]="+65 62200944";
$curlPost["id_order"]="20170131";
$curlPost["notify_url"]="https://yourdomain.com/notify.php";
$curlPost["success_url"]="https://yourdomain.com/success.php";
$curlPost["error_url"]="https://yourdomain.com/failed.php";
/*card details of .* customer*/
$curlPost["ccno"]="4242424242424242";
$curlPost["ccvv"]="123";
$curlPost["month"]="01";
$curlPost["year"]="20";
$curlPost["notes"]="Remark for transaction";
$curl_cookie="";
$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($curl, CURLOPT_URL, $gateway_url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl, CURLOPT_REFERER, $referer);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlPost);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
curl_close($curl);
$results = json_decode($response,true);
$status = strtolower($results["status"]);
$sub_query = http_build_query($results);
if(isset($results["pay_url"]) && $results["pay_url"]){
$redirecturl = $results["pay_url"];
header("Location:$redirecturl");exit;
}elseif($status=="completed" || $status=="success" || $status=="test" || $status=="test transaction"){
$redirecturl = $curlPost["success_url"];
if(strpos($redirecturl,'?')!==false){
$redirecturl = $redirecturl."&".$sub_query;
}else{
$redirecturl = $redirecturl."?".$sub_query;
}
header("Location:$redirecturl");exit;
}elseif($status=="pending"){
$redirecturl = $referer;
if(strpos($redirecturl,'?')!==false){
$redirecturl = $redirecturl."&".$sub_query;
}else{
$redirecturl = $redirecturl."?".$sub_query;
}
header("Location:$redirecturl");exit;
}else{
$redirecturl = $curlPost["error_url"];
if(strpos($redirecturl,'?')!==false){
$redirecturl = $redirecturl."&".$sub_query;
}else{
$redirecturl = $redirecturl."?".$sub_query;
}
header("Location:$redirecturl");exit;
}
if(isset($results["pay_url"]) && $results["pay_url"]){
$redirecturl = $results["pay_url"];
header("Location:$redirecturl");exit;
}
Note - After using this code you will receive pay_url in response, after receiving the pay_url, you need to redirect your
customer to that url for 3D Authentication.
Webhook
You can find Notify URL in the area of Website Settings to set the value of the parameter. Notify URL parameter’s name is 'notify_url'. However, it is optional because it has to be added dynamically during the payment processing. You will receive the Notify parameters via HTTP POST method. The value of all parameters must be treated as strings.
Merchants may receive the status code by using the CURL or GET method.
Parameter |
Type |
Description |
status_nm |
int |
Numeric ID of status.
Status code and their meaning are defined in Order status illustration.
|
status |
string |
Status of a transaction. See the Transaction Status section.
|
amount |
decimal(10,2) |
Amount of virtual currency to give it to a user.
|
transaction_id |
bigint(20) |
ID of transaction.
|
descriptor |
string |
Memo of Payment Receiver.
|
tdate |
timestamp |
Current Date and time when created the transaction
|
curr |
string(3) |
Currency of transaction. Price, deposit and earned parameters are in this curr.
|
reason |
string |
May contain a reason for transaction.
|
order_id |
string |
Your order ID, if it was provided.
|
Example Request of curl notify_url
{
"status_nm":"1",
"status":"Success",
"amount":"20",
"stransaction_id":"20210928115044",
"descriptor":"*********",
"tdate": "2017-09-28 11:50:44",
"curr": "USD",
"reason": "Success",
"id_order":"20210131",
}
Order Query API
End Point URL |
/validate.do
|
Method |
GET
|
Function |
Requests data from a resource by get method
|
Remark |
2 mandatory parameter only (Website API Token + (Transaction ID or Order ID))
|
Parameter |
Type |
Description |
api_token |
required |
Website API Token is a string value. You can find it by following My Website → Website API Token
|
transaction_id |
required |
ransaction ID,an integer and you will use it to login to the merchant dashboard. You will find it at the "Transactions List" page. You may find merchant login by following View All Transaction → Transaction Id.
Mandatory any one from Transaction ID or Order ID.
|
id_order |
required |
Your order ID, if it was provided.
Mandatory any one from Transaction ID or Order ID.
|
Example of Order API Query:
$url="/validate.do?transaction_id=20170928115044&api_token=***************";
<!-- Transaction Status by get method -->
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, false);
$response = curl_exec($ch);
curl_close($ch);
$json_response = json_decode($response,true);
echo $json_response['status_nm'];
echo $json_response['status'];
echo $json_response['amount'];
echo $json_response['transaction_id'];
echo $json_response['descriptor'];
echo $json_response['tdate'];
echo $json_response['curr'];
echo $json_response['reason'];
echo $json_response['id_order'];
Transaction Status for data you will get below response:
{
"status_nm":"1",
"status":"Success",
"amount": 20,
"transaction_id":"20170928115044",
"descriptor": "**********",
"tdate": "2017-09-28 11:50:44",
"curr": "USD",
"reason": "Success",
"id_order": ""
}
Example of Transaction Status
{
"status": Success | Failed | Pending | Test
}
Refund Order API
End Point URL |
/refund.do?api_token=************* &transaction_id=20170928115044&amount=95.50
|
Method |
GET
|
Function |
Requests data from a resource by get method
|
Remark |
3 mandatory parameters only
|
Parameter |
Type |
Description |
transaction_id |
required |
Transaction ID,an integer and you will use it to login to the merchant dashboard. You will find it at the "Transactions List" page. You may find merchant login by following View All Transaction → Transaction Id.
|
api_token |
required |
Website API Token is a string value. You can find it by following My Website → Website API Token
|
amount |
required |
This is Order Amount and currency format is set to be in decimal (10,2)
|
Example of Refund Order API:
<!-- Refund Request by get method -->
$url="/refund.do?api_token=**************&transaction_id=20170928115044&amount=95.50";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, false);
$response = curl_exec($ch);
curl_close($ch);
$json_response = json_decode($response,true);
echo $json_response['status_nm'];
echo $json_response['message'];
echo $json_response['status'];
echo $json_response['amount'];
echo $json_response['transaction_id'];
echo $json_response['descriptor'];
echo $json_response['tdate'];
echo $json_response['curr'];
echo $json_response['reason'];
echo $json_response['id_order'];
Transaction Status after refund for data you will get below response:
{
"status_nm":"8",
"message":"Request Processed",
"status":"Request Processed",
"amount": 20,
"transaction_id":"20170928115044",
"descriptor": "***********",
"tdate": "2017-09-28 11:50:44",
"curr": "USD",
"reason": "Success",
"id_order": ""
}
Example of Transaction Status
{
"status": Success | Failed | Pending
}
Error Code
Error Code |
Description |
81 |
Name can not be empty.
|
82 |
Email address can not be empty & should be valid.
|
83 |
Billing Address street 2 can not be empty.
|
84 |
Billing city can not be empty.
|
85 |
Billing state can not be empty.
|
86 |
Billing country can not be empty.
|
87 |
Billing zip address can not be empty.
|
88 |
Billing phone number can not be empty.
|
95 |
Not Store Available
|
101 |
Wrong Website API Token - Kindly check your API or contact to support team.
|
102 |
Inactive Website Id - Kindly create a ticket for activate your website id.
|
104 |
Your account have not been approved yet - You need to contact with support team for approve your account.
|
105 |
Account Currency missing under Merchant User Profile
|
106 |
Contact to Support Team
|
150 |
Card Name missing from Bank Gateway
|
151 |
Card number can not be empty
|
152 |
Wrong card number
|
153 |
No Payment Channel Available to process this card
|
154 |
Card CCVV number can not be empty.
|
155 |
Expiry date month of card can not be empty.
|
156 |
Expiry date year of card can not be empty.
|
157 |
Settlement Period missing in Acquirer. Contact to Support.
|
666 |
Id Order should be unique.
|
1021 |
Inactive Merchant. Contact to Support Team!!!
|
1022 |
Deleted Website Id
|
1023 |
Rejected Website Id
|
1024 |
Under review Website Id
|
1025 |
Awaiting Terminal Website Id
|
1026 |
Terminated Website Id
|
1040 |
Required parameters are missing
|
1041 |
Required parameters are missing
|
1042 |
Invalid IP address!!!
|
1051 |
Passing currency not supported
|
1044 |
Requested mid has been terminated!!!
|