Documentation (Version: 1.00)
Updated: 1st September, 2023
Overview
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 UniquePay BD's payment automation software. No need to handle payments manually anymore.
01
Create requestSend customer details, amount and URLs with your API keys.02
Customer paysCustomer completes the payment with their preferred method.03
Redirect backCustomer returns to your success or cancel URL with the result.04
Verify paymentConfirm the payment using the transaction ID.Setup your panel
Checkpoint Tips
Register
For registration, click the link https://shobarpay.xyz/signup
Complete the following process:
- Setup your profile from https://shobarpay.xyz/user/profile
- Buy a plan from https://shobarpay.xyz/user/plans
- Add a domain from https://shobarpay.xyz/user/domain_whitelist
- Setup methods from https://shobarpay.xyz/user/settings
Setup your credentials:
Your Api Key
Your Secret Key
Setup your Mobile App
Checkpoint Tips
Download Mobile App
Install the app
Install the app with necessary permission https://shobarpay.xyz/assets/downloads/shobarpay_sms.apk
Register a device
Register a device from user panel https://shobarpay.xyz/user/devices
Copy the device key
Copy the device key from your device list.
Sign in on the app
Get Back to mobile app and Enter Your Email and device key.
Allow permissions
Give SMS and Notification Permission to the App.
Payment Process
We have made Live environment to process payments.
Live Environment LIVE
All the transaction made using this environment are counted as real transaction, URL starts with https://pay.shobarpay.xyz/request/payment/create
POST
https://pay.shobarpay.xyz/request/payment/create
Request Parameters
| Param Name | Data Type | Description |
|---|---|---|
cus_name | string (50) | MandatoryCustomer's full name. |
cus_email | string (50) | MandatoryCustomer's email address. |
success_url | string (100) | MandatoryURL the customer is redirected to after a successful payment. |
cancel_url | string (100) | MandatoryURL the customer is redirected to if the payment fails or is cancelled. |
amount | string (50) | MandatoryPayment amount (e.g. 10). |
Request Headers
| Param Name | Data Type | Description |
|---|---|---|
Content-Type | application/x-www-form-urlencoded | Mandatory |
app-key | string (50) | MandatoryYour API KEY |
secret-key | string (50) | MandatoryYour SECRET KEY |
host-name | string (50) | MandatoryValid 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 PointsYour Public IP must be registered at SHOBAR PAY Live System
Payment Create code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay.shobarpay.xyz/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' => 'demo@gmail.com','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' => 'demo@gmail.com'
],
[
'name' => 'amount',
'contents' => '10'
],
[
'name' => 'success_url',
'contents' => 'success.php'
],
[
'name' => 'cancel_url',
'contents' => 'cancel.php'
]
]];
$request = new Request('POST', 'https://pay.shobarpay.xyz/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', 'demo@gmail.com');
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.shobarpay.xyz/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=****
After failure of payment you will be redirect to :
cancel.php?transactionId=******&paymentAmount=**.**&paymentFee=**.**&success=0
paid_by can be:
bkashnagadrocketcellfinupayibleblsonalipaypalmastercardbasicjamunaificetc.
Verify Payment
Payment verify code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay.shobarpay.xyz/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.shobarpay.xyz/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.shobarpay.xyz/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":"f@m.m","amount":"10","transaction_id":"JJTG987652","status":"1","message":"success"}