Overview
Documentation ( Version: 1.00 )
Updated: December 18, 2024
General overview
Connect effortlessly through our system. Link apps and data sources, automate tasks, and enjoy smooth workflows with ease.Receive payments directly into your personal account using Paira Pay's payment automation software. No need to handle payments manually anymore.
Setup your panel
- For registration, click the link https://pairapay.com/signup
-
Complete the following process:
- Setup your profile from https://pairapay.com/user/profile
- Buy a plan from https://pairapay.com/user/plans
- Add a domain fromhttps://pairapay.com/user/domain_whitelist
- Setup methods from https://pairapay.com/user/settings
-
Setup your credentials:
- Your Api Key
- Your Secret Key
Setup your Mobile App
- Click the link TO DOWNLOAD MOBILE APP
-
Complete the following process:
- Install the app with necessary permission https://pairapay.com/assets/downloads/pairapay.apk
- Register a device from user panel https://pairapay.com/user/devices
- Copy the device key
- Get Back to mobile app and Enter Your Email and device key.
- Give SMS and Notification Permission to the App.
Payment Process
We have made Live environment to process payments.
Live Environment
All the transaction made using this environment are counted as real transaction, URL starts with https://pay.pairapay.com/request/payment/create
Method: POST
Request Parameters
Param Name | Data Type | Description |
---|---|---|
cus_name |
string (50) | Mandatory - This parameter will be returned only when the request successfully initiates |
cus_email |
string (50) | Mandatory - This parameter will be returned only when the request successfully initiates |
success_url |
string (100) | Mandatory - This parameter will be returned only when the request successfully initiates |
cancel_url |
string (100) | Mandatory - This parameter will be returned only when the request successfully initiates |
amount |
string (50) | Mandatory - This parameter will be returned only when the request successfully initiates |
Request Headers
Param Name | Data Type | Description |
---|---|---|
Content-Type |
application/x-www-form-urlencoded | Mandatory |
app-key |
string (50) | Mandatory Your API KEY |
secret-key |
string (50) | Mandatory Your SECRET KEY |
host-name |
string (50) | Mandatory Valid Domain |
Returned Parameters
In GET Request
Param Name | Data Type | Description |
---|---|---|
transactionId |
string (50) | Receive it by $_GET['transactionId'] in your success and cancel url |
paymentAmount |
string (50) | Receive it by $_GET['paymentAmount'] in your success and cancel url |
paymentFee |
string (50) | Receive it by $_GET['paymentFee'] in your success and cancel url |
success |
int (2) | Receive (0/1) by $_GET['success'] in your success and cancel url |
p_type |
string (50) | Receive it by $_GET['p_type'] in your success url |
Create Payment Request
Security Check Points:
- Your Public IP must be registered at PAIRA PAY Live System
Payment Create code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay.pairapay.com/request/payment/create',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('cus_name' => 'demo','cus_email' => '[email protected]','amount' => '10','success_url' => 'success.php','cancel_url' => 'cancel.php'),
CURLOPT_HTTPHEADER => array(
'app-key: #########',
'secret-key: ######',
'host-name: ######',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
<?php
$client = new Client();
$headers = [
'app-key' => '#####',
'secret-key' => '#####',
'host-name' => '######',
];
$options = [
'multipart' => [
[
'name' => 'cus_name',
'contents' => 'demo'
],
[
'name' => 'cus_email',
'contents' => '[email protected]'
],
[
'name' => 'amount',
'contents' => '10'
],
[
'name' => 'success_url',
'contents' => 'success.php'
],
[
'name' => 'cancel_url',
'contents' => 'cancel.php'
]
]];
$request = new Request('POST', 'https://pay.pairapay.com/request/payment/create', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
?>
const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
data.append('cus_name', 'demo');
data.append('cus_email', '[email protected]');
data.append('amount', '10');
data.append('success_url', 'success.php');
data.append('cancel_url', 'cancel.php');
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://pay.pairapay.com/request/payment/create',
headers: {
'app-key': '#####',
'secret-key': '####',
'host-name': '###',
...data.getHeaders()
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response from GATEWAY
- After Successfull Payment you will be redirect to : success.php?transactionId=******&paid_by=***&paymentAmount=**.**&paymentFee=**.**&success=1&p_type=**** paid_by can be bkash,nagad,rocket,cellfin,upay,ibl,ebl,sonali,paypal,mastercard,basic,jamuna,ific etc.
- After failure of payment you will be redirect to : cancel.php?transactionId=******&paymentAmount=**.**&paymentFee=**.**&success=0
Verify Payment
Payment verify code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay.pairapay.com/request/payment/verify',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('transaction_id' => 'JJTG987652'),
CURLOPT_HTTPHEADER => array(
'app-key: ##########',
'secret-key: #####',
'host-name: ###',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
<?php
$client = new Client();
$headers = [
'app-key' => '#########',
'secret-key' => '#####',
'host-name' => '###',
];
$options = [
'multipart' => [
[
'name' => 'transaction_id',
'contents' => '####'
]
]];
$request = new Request('POST', 'https://pay.pairapay.com/request/payment/verify', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
?>
const axios = require('axios');
const FormData = require('form-data');
let data = new FormData();
data.append('transaction_id', '#####');
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://pay.pairapay.com/request/payment/verify',
headers: {
'app-key': '#########',
'secret-key': '########',
'host-name': '######',
...data.getHeaders()
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Verify Payment Response
{"cus_name":"y8vf","cus_email":"[email protected]","amount":"10","transaction_id":"JJTG987652","status":"1","message":"success"}