Overview
Impay Merchant API. Our API work with PHP, JAVA, C#, C, Python, Ruby, Javascript, NodeJS, etc. Secure, robust and easy to integrate APIs to make your website integrated with new payment via REST API.
LIVE API
You can use this LIVE API to make transaction with your website (For testing purpose).
Get Merchant Key
POST https://impayworld.com/api/impay/v1/merchant-key
curl --location --request POST 'https://impayworld.com/api/impay/v1/merchant-key' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'name=Murtuza' \
--form '[email protected]' \
--form 'mobile=9300768452'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/merchant-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','name' => 'Murtuza','email' => '[email protected]','mobile' => '9300768452'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
form.append("name", "Murtuza");
form.append("email", "[email protected]");
form.append("mobile", "9300768452");
var settings = {
"url": "https://impayworld.com/api/impay/v1/merchant-key",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/merchant-key")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['name', 'Murtuza'],['email', '[email protected]'],['mobile', '9300768452']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/merchant-key"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'name': 'Murtuza',
'email': '[email protected]',
'mobile': '9300768452'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/merchant-key")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("name", "Murtuza")
.field("email", "[email protected]")
.field("mobile", "9300768452")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/merchant-key");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("name", "Murtuza");
request.AddParameter("email", "[email protected]");
request.AddParameter("mobile", "9300768452");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/merchant-key");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "name");
curl_mime_data(part, "Murtuza", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "email");
curl_mime_data(part, "[email protected]", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "mobile");
curl_mime_data(part, "9300768452", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/merchant-key')
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('name', 'Murtuza')
.field('email', '[email protected]')
.field('mobile', '9300768452')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"status_code": 205,
"data": "324pi3242p3oj32593",
"message": "merchant key successfull"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/merchant-key
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_LIVE_TOKEN generated token |
name | true | Name of the test user |
true | Email of the test user | |
mobile | true | Mobile of the test user |
User Authentication
POST https://impayworld.com/api/impay/v1/user-authentication
curl --location --request POST 'https://impayworld.com/api/impay/v1/user-authentication' \
--header 'Accept: application/json' \
--form 'user=USER_EMAIL_OR_MOBILE' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/user-authentication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('user' => 'USER_EMAIL_OR_MOBILE','token' => 'YOUR_MERCHANT_LIVE_TOKEN'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"async": true,
"crossDomain": true,
"url": "https://impayworld.com/dev/bulk?authorization=YOUR_API_KEY&sender_id=FSTSMS&message=This is test message&language=english&route=p&numbers=9999999999,8888888888,7777777777",
"method": "GET"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/user-authentication")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['user', 'USER_EMAIL_OR_MOBILE'],['token', 'YOUR_MERCHANT_LIVE_TOKEN']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/user-authentication"
payload = {'user': 'USER_EMAIL_OR_MOBILE',
'token': 'YOUR_MERCHANT_LIVE_TOKEN'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/user-authentication")
.header("Accept", "application/json")
.multiPartContent()
.field("user", "USER_EMAIL_OR_MOBILE")
.field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/user-authentication");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/user-authentication");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
);
CURLcode ret = curl_easy_perform(hnd);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/user-authentication')
.headers({
'Accept': 'application/json'
})
.field('user', 'USER_EMAIL_OR_MOBILE')
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Response:
{
"return": true,
"message": "Otp send on your provided email address,please verify it"
}
Following are the parameter to be used:
HTTP Request
POST https://impayworld.com/api/impay/v1/user-authentication
Body
Parameter | Required | Description |
---|---|---|
user | true | Provide either user's email or mobile |
token | true | Provide testing token |
OTP Verify
POST https://impayworld.com/api/impay/v1/otp-verify
curl --location --request POST 'https://impayworld.com/api/impay/v1/otp-verify' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'user=USER_EMAIL_OR_MOBILE' \
--form 'otp=XXXXXX'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/otp-verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','user' => 'USER_EMAIL_OR_MOBILE','otp' => 'XXXXXX'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
form.append("user", "USER_EMAIL_OR_MOBILE");
form.append("otp", "XXXXXX");
var settings = {
"url": "https://impayworld.com/api/impay/v1/otp-verify",
"method": "POST",
"timeout": 0,
"headers": {
"Accept": "application/json"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/otp-verify")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['user', 'USER_EMAIL_OR_MOBILE'],['otp', 'XXXXXX']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/otp-verify"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'user': 'USER_EMAIL_OR_MOBILE',
'otp': 'XXXXXX'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/otp-verify")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user", "USER_EMAIL_OR_MOBILE")
.field("otp", "XXXXXX")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/otp-verify");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
request.AddParameter("otp", "XXXXXX");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/otp-verify");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "otp");
curl_mime_data(part, "XXXXXX", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/otp-verify')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('user', 'USER_EMAIL_OR_MOBILE')
.field('otp', 'XXXXXX')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"token": "f4e42339f0b2c0c7b9ae40795dc41bfdcffbcf60a80b30a7d536a9315792",
"coin": 250
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/otp-verify
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | Provide testing token |
user | true | Provide either user's email or mobile |
otp | true | Provide Generated OTP |
Coin Transaction
POST https://impayworld.com/api/impay/v1/coin-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/coin-transaction' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'amount=100' \
--form 'coin=50' \
--form 'currency=INR' \
--form 'order_id=eefewkdfnn' \
--form 'product_id[]=1' \
--form 'product_name[]=dfdfds' \
--form 'qty[]=2' \
--form 'product_price[]=100'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/coin-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','amount' => '100','coin' => '50','currency' => 'INR','order_id' => 'eefewkdfnn','product_id[]' => '1','product_name[]' => 'dfdfds','qty[]' => '2','product_price[]' => '100'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("amount", "100")
.field("coin", "50")
.field("currency", "INR")
.field("order_id", "eefewkdfnn")
.field("product_id[]", "1")
.field("product_name[]", "dfdfds")
.field("qty[]", "2")
.field("product_price[]", "100")
.asString();
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/coin-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['amount', '100'],['coin', '50'],['currency', 'INR'],['order_id', 'eefewkdfnn'],['product_id[]', '1'],['product_name[]', 'dfdfds'],['qty[]', '2'],['product_price[]', '100']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/coin-transaction"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'amount': '100',
'coin': '50',
'currency': 'INR',
'order_id': 'eefewkdfnn',
'product_id[]': '1',
'product_name[]': 'dfdfds',
'qty[]': '2',
'product_price[]': '100'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("amount", "100")
.field("coin", "50")
.field("currency", "INR")
.field("order_id", "eefewkdfnn")
.field("product_id[]", "1")
.field("product_name[]", "dfdfds")
.field("qty[]", "2")
.field("product_price[]", "100")
.asString();
vvar client = new RestClient("https://impayworld.com/api/impay/v1/coin-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("amount", "100");
request.AddParameter("coin", "50");
request.AddParameter("currency", "INR");
request.AddParameter("order_id", "eefewkdfnn");
request.AddParameter("product_id[]", "1");
request.AddParameter("product_name[]", "dfdfds");
request.AddParameter("qty[]", "2");
request.AddParameter("product_price[]", "100");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/coin-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "amount");
curl_mime_data(part, "100", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "coin");
curl_mime_data(part, "50", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "currency");
curl_mime_data(part, "INR", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "order_id");
curl_mime_data(part, "eefewkdfnn", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_id[]");
curl_mime_data(part, "1", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_name[]");
curl_mime_data(part, "dfdfds", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "qty[]");
curl_mime_data(part, "2", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_price[]");
curl_mime_data(part, "100", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/coin-transaction')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('amount', '100')
.field('coin', '50')
.field('currency', 'INR')
.field('order_id', 'eefewkdfnn')
.field('product_id[]', '1')
.field('product_name[]', 'dfdfds')
.field('qty[]', '2')
.field('product_price[]', '100')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"transaction_id": "5c7de7678176e22fc99d"
},
"message": "please verify the otp to deduct coin"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/coin-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_LIVE_TOKEN generated token |
user_token | true | Token when you verify OTP |
amount | true | Amount to be paid |
coin | true | Coin to be deducted |
currency | true | Currency |
order_id | true | Your order id |
product_id[] | true | Your products ids |
product_name[] | true | Your products names |
qty[] | true | Your products quantities |
product_price[] | true | Your products prices |
Verify Payment OTP
POST https://impayworld.com/api/impay/v1/verify-payment-otp
curl --location --request POST 'https://impayworld.com/api/impay/v1/verify-payment-otp' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'transaction_id=542af92fc6ae3b34794b' \
--form 'otp=162097'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/verify-payment-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','transaction_id' => '542af92fc6ae3b34794b','otp' => '162097'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
data.append("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
data.append("transaction_id", "542af92fc6ae3b34794b");
data.append("otp", "162097");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/verify-payment-otp");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/verify-payment-otp")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['transaction_id', '542af92fc6ae3b34794b'],['otp', '162097']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/verify-payment-otp"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'transaction_id': '542af92fc6ae3b34794b',
'otp': '162097'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/verify-payment-otp")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("transaction_id", "542af92fc6ae3b34794b")
.field("otp", "162097")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/verify-payment-otp");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
request.AddParameter("otp", "162097");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/verify-payment-otp");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "otp");
curl_mime_data(part, "162097", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/verify-payment-otp')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('transaction_id', '542af92fc6ae3b34794b')
.field('otp', '162097')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"message": "Transaction successfully"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/verify-payment-otp
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_LIVE_TOKEN generated token |
user_token | true | Token when you verify OTP |
transaction_id | true | Transaction Id which will be generated in rpevious one |
otp | true | OTP generated |
Re-Send Payment OTP
POST https://impayworld.com/api/impay/v1/resend-payment-otp
curl --location --request POST 'https://impayworld.com/api/impay/v1/resend-payment-otp' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'transaction_id=542af92fc6ae3b34794b'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/resend-payment-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','transaction_id' => '542af92fc6ae3b34794b'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
data.append("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
data.append("transaction_id", "542af92fc6ae3b34794b");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/resend-payment-otp");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/resend-payment-otp")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['transaction_id', '542af92fc6ae3b34794b']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/resend-payment-otp"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'transaction_id': '542af92fc6ae3b34794b'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/resend-payment-otp")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("transaction_id", "542af92fc6ae3b34794b")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/resend-payment-otp");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/resend-payment-otp");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/resend-payment-otp')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('transaction_id', '542af92fc6ae3b34794b')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"message": "OTP sent successfully"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/resend-payment-otp
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_LIVE_TOKEN generated token |
user_token | true | Token when you verify OTP |
transaction_id | true | Transaction Id which will be generated in rpevious one |
Fetch Coin Transaction
POST https://impayworld.com/api/impay/v1/fetch-coin-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/fetch-coin-transaction' \
--header 'Accept: application/json' \
--form 'transaction_id=542af92fc6ae3b34794b' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/fetch-coin-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('transaction_id' => '542af92fc6ae3b34794b','token' => 'YOUR_MERCHANT_LIVE_TOKEN'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("transaction_id", "542af92fc6ae3b34794b");
data.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/fetch-coin-transaction");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/fetch-coin-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['transaction_id', '542af92fc6ae3b34794b'],['token', 'YOUR_MERCHANT_LIVE_TOKEN']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/fetch-coin-transaction"
payload = {'transaction_id': '542af92fc6ae3b34794b',
'token': 'YOUR_MERCHANT_LIVE_TOKEN'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/fetch-coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("transaction_id", "542af92fc6ae3b34794b")
.field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/fetch-coin-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/fetch-coin-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/fetch-coin-transaction')
.headers({
'Accept': 'application/json'
})
.field('transaction_id', '542af92fc6ae3b34794b')
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"id": 41,
"transaction_id": "542af92fc6ae3b34794b",
"merchant_id": 1,
"merchant_user_id": 1,
"order_id": "eefewkdfnn",
"user_id": 4,
"user_type": "t",
"price": "100",
"total_coin": 300,
"coin_used": 50,
"currency": "INR",
"capture": "y",
"payment_type": "t",
"time": 1592544086,
"capture_time": null,
"product_data": [
{
"id": 35,
"transaction_id": "41",
"product_id": 1,
"product_name": "dfdfds",
"qty": 2,
"product_price": "100",
"time": 1592544086
}
]
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/fetch-coin-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | generated token |
transaction_id | true | Transaction Id which will be generated in rpevious one |
Fetch all Transaction
POST https://impayworld.com/api/impay/v1/fetch-all-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/fetch-all-transaction' \
--form 'token=YOUR_MERCHANT_LIVE_TOKEN' \
--form 'user=USER_EMAIL_OR_MOBILE'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/fetch-all-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_LIVE_TOKEN','user' => 'USER_EMAIL_OR_MOBILE'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_LIVE_TOKEN");
data.append("user", "USER_EMAIL_OR_MOBILE");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/fetch-all-transaction");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/fetch-all-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [['token', 'YOUR_MERCHANT_LIVE_TOKEN'],['user', 'USER_EMAIL_OR_MOBILE']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/fetch-all-transaction"
payload = {'token': 'YOUR_MERCHANT_LIVE_TOKEN',
'user': 'USER_EMAIL_OR_MOBILE'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/fetch-all-transaction")
.multiPartContent() .field("token", "YOUR_MERCHANT_LIVE_TOKEN")
.field("user", "USER_EMAIL_OR_MOBILE")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/fetch-all-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_LIVE_TOKEN");
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/fetch-all-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_LIVE_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/fetch-all-transaction')
.field('token', 'YOUR_MERCHANT_LIVE_TOKEN')
.field('user', 'USER_EMAIL_OR_MOBILE')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"current_page": 1,
"data": [
{
"id": 47,
"transaction_id": "5c7de7678176e22fc99d",
"merchant_id": 2,
"merchant_user_id": 1,
"order_id": "eefewkdfnn",
"user_id": 4,
"user_type": "t",
"price": "100",
"total_coin": 250,
"coin_used": 50,
"currency": "INR",
"capture": "y",
"payment_type": "t",
"time": 1600082082,
"capture_time": null,
"product_data": [
{
"id": 41,
"transaction_id": "47",
"product_id": 1,
"product_name": "dfdfds",
"qty": 2,
"product_price": "100",
"time": 1600082082
}
]
}
],
"first_page_url": "https://impayworld.com/api/impay/v1/fetch-all-transaction?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://impayworld.com/api/impay/v1/fetch-all-transaction?page=1",
"next_page_url": null,
"path": "https://impayworld.com/api/impay/v1/fetch-all-transaction",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/fetch-all-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | generated token |
user | true | Email or Mobile of the user. |
DEMO API
You can use this DEMO API to make transaction with your website (For testing purpose).
User Authentication
POST https://impayworld.com/api/impay/v1/testing/user-authentication
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/user-authentication' \
--header 'Accept: application/json' \
--form 'user=USER_EMAIL_OR_MOBILE' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/user-authentication",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('user' => 'USER_EMAIL_OR_MOBILE','token' => 'YOUR_MERCHANT_TESTING_TOKEN'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var settings = {
"async": true,
"crossDomain": true,
"url": "https://impayworld.com/dev/bulk?authorization=YOUR_API_KEY&sender_id=FSTSMS&message=This is test message&language=english&route=p&numbers=9999999999,8888888888,7777777777",
"method": "GET"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/user-authentication")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['user', 'USER_EMAIL_OR_MOBILE'],['token', 'YOUR_MERCHANT_TESTING_TOKEN']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/user-authentication"
payload = {'user': 'USER_EMAIL_OR_MOBILE',
'token': 'YOUR_MERCHANT_TESTING_TOKEN'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/user-authentication")
.header("Accept", "application/json")
.multiPartContent()
.field("user", "USER_EMAIL_OR_MOBILE")
.field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/user-authentication");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/user-authentication");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
);
CURLcode ret = curl_easy_perform(hnd);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/user-authentication')
.headers({
'Accept': 'application/json'
})
.field('user', 'USER_EMAIL_OR_MOBILE')
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Response:
{
"return": true,
"message": "Otp send on your provided email address,please verify it"
}
Following are the parameter to be used:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/user-authentication
Body
Parameter | Required | Description |
---|---|---|
user | true | Provide either user's email or mobile |
token | true | Provide testing token |
OTP Verify
POST https://impayworld.com/api/impay/v1/testing/otp-verify
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/otp-verify' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'user=USER_EMAIL_OR_MOBILE' \
--form 'otp=XXXXXX'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/otp-verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','user' => 'USER_EMAIL_OR_MOBILE','otp' => 'XXXXXX'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
form.append("user", "USER_EMAIL_OR_MOBILE");
form.append("otp", "XXXXXX");
var settings = {
"url": "https://impayworld.com/api/impay/v1/testing/otp-verify",
"method": "POST",
"timeout": 0,
"headers": {
"Accept": "application/json"
},
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/otp-verify")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['user', 'USER_EMAIL_OR_MOBILE'],['otp', 'XXXXXX']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/otp-verify"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'user': 'USER_EMAIL_OR_MOBILE',
'otp': 'XXXXXX'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/otp-verify")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user", "USER_EMAIL_OR_MOBILE")
.field("otp", "XXXXXX")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/otp-verify");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
request.AddParameter("otp", "XXXXXX");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/otp-verify");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "otp");
curl_mime_data(part, "XXXXXX", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/otp-verify')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('user', 'USER_EMAIL_OR_MOBILE')
.field('otp', 'XXXXXX')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"token": "f4e42339f0b2c0c7b9ae40795dc41bfdcffbcf60a80b30a7d536a9315792",
"coin": 250
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/otp-verify
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | Provide testing token |
user | true | Provide either user's email or mobile |
otp | true | Provide Generated OTP |
User Registration
POST https://impayworld.com/api/impay/v1/testing/user-registration
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/user-registration' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'name=Murtuza' \
--form '[email protected]' \
--form 'mobile=9300768452'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/user-registration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','name' => 'Murtuza','email' => '[email protected]','mobile' => '9300768452'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var form = new FormData();
form.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
form.append("name", "Murtuza");
form.append("email", "[email protected]");
form.append("mobile", "9300768452");
var settings = {
"url": "https://impayworld.com/api/impay/v1/testing/user-registration",
"method": "POST",
"timeout": 0,
"processData": false,
"mimeType": "multipart/form-data",
"contentType": false,
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/user-registration")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['name', 'Murtuza'],['email', '[email protected]'],['mobile', '9300768452']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/user-registration"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'name': 'Murtuza',
'email': '[email protected]',
'mobile': '9300768452'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/user-registration")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("name", "Murtuza")
.field("email", "[email protected]")
.field("mobile", "9300768452")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/user-registration");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("name", "Murtuza");
request.AddParameter("email", "[email protected]");
request.AddParameter("mobile", "9300768452");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/user-registration");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "name");
curl_mime_data(part, "Murtuza", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "email");
curl_mime_data(part, "[email protected]", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "mobile");
curl_mime_data(part, "9300768452", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/user-registration')
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('name', 'Murtuza')
.field('email', '[email protected]')
.field('mobile', '9300768452')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"merchant_id": 2,
"name": "Murtuza1",
"email": "[email protected]",
"mobile": "9300768451",
"time": 1600079195,
"id": 7
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/user-registration
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_TESTING_TOKEN generated token |
name | true | Name of the test user |
true | Email of the test user | |
mobile | true | Mobile of the test user |
Coin Transaction
POST https://impayworld.com/api/impay/v1/testing/coin-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/coin-transaction' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'amount=100' \
--form 'coin=50' \
--form 'currency=INR' \
--form 'order_id=eefewkdfnn' \
--form 'product_id[]=1' \
--form 'product_name[]=dfdfds' \
--form 'qty[]=2' \
--form 'product_price[]=100'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/coin-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','amount' => '100','coin' => '50','currency' => 'INR','order_id' => 'eefewkdfnn','product_id[]' => '1','product_name[]' => 'dfdfds','qty[]' => '2','product_price[]' => '100'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("amount", "100")
.field("coin", "50")
.field("currency", "INR")
.field("order_id", "eefewkdfnn")
.field("product_id[]", "1")
.field("product_name[]", "dfdfds")
.field("qty[]", "2")
.field("product_price[]", "100")
.asString();
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/coin-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['amount', '100'],['coin', '50'],['currency', 'INR'],['order_id', 'eefewkdfnn'],['product_id[]', '1'],['product_name[]', 'dfdfds'],['qty[]', '2'],['product_price[]', '100']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/coin-transaction"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'amount': '100',
'coin': '50',
'currency': 'INR',
'order_id': 'eefewkdfnn',
'product_id[]': '1',
'product_name[]': 'dfdfds',
'qty[]': '2',
'product_price[]': '100'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("amount", "100")
.field("coin", "50")
.field("currency", "INR")
.field("order_id", "eefewkdfnn")
.field("product_id[]", "1")
.field("product_name[]", "dfdfds")
.field("qty[]", "2")
.field("product_price[]", "100")
.asString();
vvar client = new RestClient("https://impayworld.com/api/impay/v1/testing/coin-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("amount", "100");
request.AddParameter("coin", "50");
request.AddParameter("currency", "INR");
request.AddParameter("order_id", "eefewkdfnn");
request.AddParameter("product_id[]", "1");
request.AddParameter("product_name[]", "dfdfds");
request.AddParameter("qty[]", "2");
request.AddParameter("product_price[]", "100");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/coin-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "amount");
curl_mime_data(part, "100", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "coin");
curl_mime_data(part, "50", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "currency");
curl_mime_data(part, "INR", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "order_id");
curl_mime_data(part, "eefewkdfnn", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_id[]");
curl_mime_data(part, "1", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_name[]");
curl_mime_data(part, "dfdfds", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "qty[]");
curl_mime_data(part, "2", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "product_price[]");
curl_mime_data(part, "100", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/coin-transaction')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('amount', '100')
.field('coin', '50')
.field('currency', 'INR')
.field('order_id', 'eefewkdfnn')
.field('product_id[]', '1')
.field('product_name[]', 'dfdfds')
.field('qty[]', '2')
.field('product_price[]', '100')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"transaction_id": "5c7de7678176e22fc99d"
},
"message": "please verify the otp to deduct coin"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/coin-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_TESTING_TOKEN generated token |
user_token | true | Token when you verify OTP |
amount | true | Amount to be paid |
coin | true | Coin to be deducted |
currency | true | Currency |
order_id | true | Your order id |
product_id[] | true | Your products ids |
product_name[] | true | Your products names |
qty[] | true | Your products quantities |
product_price[] | true | Your products prices |
Verify Payment OTP
POST https://impayworld.com/api/impay/v1/testing/verify-payment-otp
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/verify-payment-otp' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'transaction_id=542af92fc6ae3b34794b' \
--form 'otp=162097'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/verify-payment-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','transaction_id' => '542af92fc6ae3b34794b','otp' => '162097'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
data.append("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
data.append("transaction_id", "542af92fc6ae3b34794b");
data.append("otp", "162097");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/testing/verify-payment-otp");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/verify-payment-otp")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['transaction_id', '542af92fc6ae3b34794b'],['otp', '162097']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/verify-payment-otp"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'transaction_id': '542af92fc6ae3b34794b',
'otp': '162097'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/verify-payment-otp")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("transaction_id", "542af92fc6ae3b34794b")
.field("otp", "162097")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/verify-payment-otp");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
request.AddParameter("otp", "162097");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/verify-payment-otp");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "otp");
curl_mime_data(part, "162097", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/verify-payment-otp')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('transaction_id', '542af92fc6ae3b34794b')
.field('otp', '162097')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"message": "Transaction successfully"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/verify-payment-otp
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_TESTING_TOKEN generated token |
user_token | true | Token when you verify OTP |
transaction_id | true | Transaction Id which will be generated in rpevious one |
otp | true | OTP generated |
Re-Send Payment OTP
POST https://impayworld.com/api/impay/v1/testing/resend-payment-otp
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/resend-payment-otp' \
--header 'Accept: application/json' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'user_token=845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990' \
--form 'transaction_id=542af92fc6ae3b34794b'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/resend-payment-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','user_token' => '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990','transaction_id' => '542af92fc6ae3b34794b'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
data.append("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
data.append("transaction_id", "542af92fc6ae3b34794b");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/testing/resend-payment-otp");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/resend-payment-otp")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990'],['transaction_id', '542af92fc6ae3b34794b']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/resend-payment-otp"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'user_token': '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990',
'transaction_id': '542af92fc6ae3b34794b'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/resend-payment-otp")
.header("Accept", "application/json")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990")
.field("transaction_id", "542af92fc6ae3b34794b")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/resend-payment-otp");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("user_token", "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990");
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/resend-payment-otp");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user_token");
curl_mime_data(part, "845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/resend-payment-otp')
.headers({
'Accept': 'application/json'
})
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('user_token', '845f25a9b62794914374c2ae94526bbe4c5d338dafe508f45bfcc158a990')
.field('transaction_id', '542af92fc6ae3b34794b')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"message": "OTP sent successfully"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/resend-payment-otp
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | YOUR_MERCHANT_TESTING_TOKEN generated token |
user_token | true | Token when you verify OTP |
transaction_id | true | Transaction Id which will be generated in rpevious one |
Fetch Coin Transaction
POST https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction' \
--header 'Accept: application/json' \
--form 'transaction_id=542af92fc6ae3b34794b' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('transaction_id' => '542af92fc6ae3b34794b','token' => 'YOUR_MERCHANT_TESTING_TOKEN'),
CURLOPT_HTTPHEADER => array(
"Accept: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("transaction_id", "542af92fc6ae3b34794b");
data.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
form_data = [['transaction_id', '542af92fc6ae3b34794b'],['token', 'YOUR_MERCHANT_TESTING_TOKEN']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction"
payload = {'transaction_id': '542af92fc6ae3b34794b',
'token': 'YOUR_MERCHANT_TESTING_TOKEN'}
files = [
]
headers = {
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction")
.header("Accept", "application/json")
.multiPartContent() .field("transaction_id", "542af92fc6ae3b34794b")
.field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AlwaysMultipartFormData = true;
request.AddParameter("transaction_id", "542af92fc6ae3b34794b");
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Accept: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "transaction_id");
curl_mime_data(part, "542af92fc6ae3b34794b", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction')
.headers({
'Accept': 'application/json'
})
.field('transaction_id', '542af92fc6ae3b34794b')
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"id": 41,
"transaction_id": "542af92fc6ae3b34794b",
"merchant_id": 1,
"merchant_user_id": 1,
"order_id": "eefewkdfnn",
"user_id": 4,
"user_type": "t",
"price": "100",
"total_coin": 300,
"coin_used": 50,
"currency": "INR",
"capture": "y",
"payment_type": "t",
"time": 1592544086,
"capture_time": null,
"product_data": [
{
"id": 35,
"transaction_id": "41",
"product_id": 1,
"product_name": "dfdfds",
"qty": 2,
"product_price": "100",
"time": 1592544086
}
]
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/fetch-coin-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | generated token |
transaction_id | true | Transaction Id which will be generated in rpevious one |
Fetch all Transaction
POST https://impayworld.com/api/impay/v1/testing/fetch-all-transaction
curl --location --request POST 'https://impayworld.com/api/impay/v1/testing/fetch-all-transaction' \
--form 'token=YOUR_MERCHANT_TESTING_TOKEN' \
--form 'user=USER_EMAIL_OR_MOBILE'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('token' => 'YOUR_MERCHANT_TESTING_TOKEN','user' => 'USER_EMAIL_OR_MOBILE'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var data = new FormData();
data.append("token", "YOUR_MERCHANT_TESTING_TOKEN");
data.append("user", "USER_EMAIL_OR_MOBILE");
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction");
xhr.send(data);
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/testing/fetch-all-transaction")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
form_data = [['token', 'YOUR_MERCHANT_TESTING_TOKEN'],['user', 'USER_EMAIL_OR_MOBILE']]
request.set_form form_data, 'multipart/form-data'
response = http.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction"
payload = {'token': 'YOUR_MERCHANT_TESTING_TOKEN',
'user': 'USER_EMAIL_OR_MOBILE'}
files = [
]
headers= {}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/testing/fetch-all-transaction")
.multiPartContent() .field("token", "YOUR_MERCHANT_TESTING_TOKEN")
.field("user", "USER_EMAIL_OR_MOBILE")
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/testing/fetch-all-transaction");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
request.AddParameter("token", "YOUR_MERCHANT_TESTING_TOKEN");
request.AddParameter("user", "USER_EMAIL_OR_MOBILE");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "token");
curl_mime_data(part, "YOUR_MERCHANT_TESTING_TOKEN", CURL_ZERO_TERMINATED);
part = curl_mime_addpart(mime);
curl_mime_name(part, "user");
curl_mime_data(part, "USER_EMAIL_OR_MOBILE", CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/testing/fetch-all-transaction')
.field('token', 'YOUR_MERCHANT_TESTING_TOKEN')
.field('user', 'USER_EMAIL_OR_MOBILE')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Success Response:
{
"return": true,
"data": {
"current_page": 1,
"data": [
{
"id": 47,
"transaction_id": "5c7de7678176e22fc99d",
"merchant_id": 2,
"merchant_user_id": 1,
"order_id": "eefewkdfnn",
"user_id": 4,
"user_type": "t",
"price": "100",
"total_coin": 250,
"coin_used": 50,
"currency": "INR",
"capture": "y",
"payment_type": "t",
"time": 1600082082,
"capture_time": null,
"product_data": [
{
"id": 41,
"transaction_id": "47",
"product_id": 1,
"product_name": "dfdfds",
"qty": 2,
"product_price": "100",
"time": 1600082082
}
]
}
],
"first_page_url": "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction?page=1",
"next_page_url": null,
"path": "https://impayworld.com/api/impay/v1/testing/fetch-all-transaction",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1
},
"message": "Data found"
}
Following are the parameter to be used for POST API:
HTTP Request
POST https://impayworld.com/api/impay/v1/testing/fetch-all-transaction
Headers
Parameter | Description |
---|---|
Accept | application/json |
Body
Parameter | Required | Description |
---|---|---|
token | true | generated token |
user | true | Email or Mobile of the user. |
CURRENCY CONVERSION API
You can use this API to get the value of currency in Rupee.
Currency Conversion
POST https://impayworld.com/api/impay/v1/coin-conversion
curl --location --request POST 'https://impayworld.com/api/impay/v1/coin-conversion' \
--header 'Cookie: __cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959' \
--form 'currency_id=3'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://impayworld.com/api/impay/v1/coin-conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('currency_id' => CURRENCY_ID),
CURLOPT_HTTPHEADER => array(
"Cookie: __cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/coin-conversion")
.header("Cookie", "__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959")
.multiPartContent() .field("currency_id", CURRENCY_ID)
.asString();
require "uri"
require "net/http"
url = URI("https://impayworld.com/api/impay/v1/coin-conversion")
https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cookie"] = "__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959"
form_data = [['currency_id', CURRENCY_ID]]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
import requests
url = "https://impayworld.com/api/impay/v1/coin-conversion"
payload = {'currency_id': CURRENCY_ID}
files = [
]
headers = {
'Cookie': '__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959'
}
response = requests.request("POST", url, headers=headers, data = payload, files = files)
print(response.text.encode('utf8'))
Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://impayworld.com/api/impay/v1/coin-conversion")
.header("Cookie", "__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959")
.multiPartContent() .field("currency_id", CURRENCY_ID)
.asString();
var client = new RestClient("https://impayworld.com/api/impay/v1/coin-conversion");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Cookie", "__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959");
request.AlwaysMultipartFormData = true;
request.AddParameter("currency_id", CURRENCY_ID);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://impayworld.com/api/impay/v1/coin-conversion");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Cookie: __cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_mime *mime;
curl_mimepart *part;
mime = curl_mime_init(curl);
part = curl_mime_addpart(mime);
curl_mime_name(part, "currency_id");
curl_mime_data(part, CURRENCY_ID, CURL_ZERO_TERMINATED);
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
res = curl_easy_perform(curl);
curl_mime_free(mime);
}
curl_easy_cleanup(curl);
var unirest = require('unirest');
var req = unirest('POST', 'https://impayworld.com/api/impay/v1/coin-conversion')
.headers({
'Cookie': '__cfduid=de737c2f62ec80bc1ec3160af7d205e441600321959'
})
.field('currency_id', CURRENCY_ID)
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
Response:
{
"return": true,
"currency_in_rupee_value": 10,
"message": "Data found"
}
Following are the parameter to be used:
HTTP Request
POST https://impayworld.com/api/impay/v1/coin-conversion
Body
Parameter | Required | Description |
---|---|---|
currency_id | true | Replace CURRENCY_ID with ID of CURRENCY LIST |
ERROR CODES
412 Invalid Authentication (401 Status Code)
{
"return": false,
"status_code": 412,
"message": "Invalid Authentication, Check Authorization Key"
}
Following error codes will be used in Impay API:
Response Code | Status Code | Message |
---|---|---|
400 | 401 | Invalid merchant key or merchant key secret |
400 | 402 | Credential Blocked |
400 | 403 | Either Invalid merchant token or Your merchant credentials blocked by Admin |
400 | 404 | Page not found |
400 | 405 | You cannot access testing credentials on live |
400 | 406 | Merchant not found |
400 | 407 | Your daily otp send limit is exceed |
400 | 408 | SMS not send |
400 | 409 | Provided email or mobile is not valid or not found |
400 | 410 | Invalid otp |
400 | 411 | Invalid User,No Data Found |
401 | 412 | Invalid merchant |
401 | 413 | Invalid user token |
400 | 414 | No user found |
400 | 415 | You don`t have sufficient coin |
400 | 416 | Please provide new user token it occupied with others |
400 | 417 | You can`t use testing user for live process |
400 | 418 | Invalid transaction ID |
400 | 419 | Otp does not match |
400 | 420 | Invalid user type |
400 | 421 | No transaction found |
400 | 421 | No transaction found |
400 | 422 | You can`t use merchant live crdentials for testing purpose |
400 | 423 | Invalid testing user |
400 | 424 | This currency is not active |
400 | 425 | Token is Missing |
400 | 426 | Salt Key is Missing |
400 | 427 | Salt password is Missing |
400 | 428 | User is Missing |
400 | 429 | User Type is Missing |
400 | 430 | Otp is Missing |
400 | 431 | User token is Missing |
400 | 432 | Amount is Missing |
400 | 433 | Coin is Missing |
400 | 434 | Currency is Missing |
400 | 435 | Order ID is Missing |
400 | 436 | Product ID is Missing |
400 | 437 | Product Name is Missing |
400 | 438 | Quantity is Missing |
400 | 439 | Product Price is Missing |
400 | 440 | Product Price is Missing |
400 | 441 | Name is Missing |
400 | 442 | Email is Missing |
400 | 443 | Email must be Unique |
400 | 444 | Mobile is Misiing |
400 | 445 | Amount must be Numeric |
400 | 446 | Coin must be Numeric |
400 | 447 | Product ID must be Numeric |
400 | 448 | Currency ID is Missing |
400 | 449 | Currency ID does not Exists |
400 | 450 | Mobile must be Unique |
CURRENCY
{
"return": false,
"status_code": 412,
"message": "Invalid Authentication, Check Authorization Key"
}
Following error codes will be used in Impay API:
ID | Name | Symbol | Currency Rupee |
---|