Overview


Documentation ( Version: 1.00 )
Updated: 24th June, 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 RoyelPay's payment automation software. No need to handle payments manually anymore.

Setup your panel

Checkpoint Tips:

Setup your Mobile App

Checkpoint Tips:

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://royelpay.net/api/request/payment/create

REST API
API Endpoint (Live Environment): https://royelpay.net/api/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
cus_user_id string (50) Optional - his parameter will be returned only when the request successfully initiates
currency string (10) Mandatory - This parameter will be returned only when the request successfully initiates
is_test string (2) 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
callback_url string (100) Optional - 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 'Accept: application/json', Mandatory
Accept application/json Mandatory
CURLOPT_COOKIEe private_key string (50) Mandatory Your Secret KEY
brand_key string (50) Mandatory Your Brand KEY

Returned Parameters

In GET Request

Param Name Data Type Description
invoice_id string (50) Receive it by $_GET['invoice_id'] in your success url
trxid string (50) Receive it by $_GET['trxid'] in your success url
getway string (50) Receive it by $_GET['getway'] in your success url
status int (2) Receive (0/1) by $_GET['status'] in your success url

Create Payment Request

Security Check Points:

  • Your Public IP must be registered at RoyelPay Live System

Payment Create code


<?php

$curl = curl_init();

$privateKey = 'kq05cefSxrvuHORkFm9DTwu7ftTopqbS1Zjgx4HcGsCw80wSxg';
$Brand_Key = 'HILBRFgR6F';

$data = array(
    'cus_name' => 'demo',
    'cus_email' => 'demo@gmail.com',
    'cus_user_id' => '10',
    'amount' => '10',
    'currency' => 'BDT',
    'is_test' => '0',
    'success_url' => 'success.php',
    'cancel_url' => 'cancel.php',
    'callback_url' => 'callback_url.php',
    
);

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://royelpay.net/api/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 => json_encode($data),
  CURLOPT_HTTPHEADER => array(
        'Accept: application/json',
        'Content-Type: application/json',
  ),
  CURLOPT_COOKIE => "private_key=$privateKey; brand_key=$Brand_Key",
 
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
?>
                

Response from GATEWAY

Response:

  • After Successfull Payment you will be redirect to : success.php?invoice_id=******&trxid=***&getway=**.**&status=**.**&
  • getway can be bkash,nagad,rocket, bkashlive
  • After failure of payment you will be redirect to : cancel.php?invoice_id=******&trxid=***&getway=**.**&status=**;
  • After callback of payment you will be redirect to : callback_url.php?invoice_id=******&trxid=***&getway=**.**&status=**;

Verify Payment

Payment verify code


<?php

$curl = curl_init();


$data = array(
    'invoice_id' => 'lV7KWsuN1g'
);

$jsonData = json_encode($data);

$privateKey = 'ULRtN3Fx1hDKyicmTuss';


curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://royelpay.net/api/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 => $jsonData,
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Content-Type: application/json',
  ),
    CURLOPT_COOKIE => "private_key=$privateKey" ,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
?>
                

Verify Payment Response

Response:

{"cus_name":"Cus Name","cus_email": info@royelpay.com" ","amount":"10", "cus_user_id":"10","transaction_id":"JJTG987652","status":"1","message":"success"}

          

All Modules

WHMCS
WHMCS MODULE V1
SMM PANEL Soon as possible
SMM PANEL MODULE V1.0
WORDPRESS Soon as possible
WORDPRESS MODULE V1.0
SKETCHWARE Soon as possible
SKETCHWARE SWB