GG
GG Pay BD

Developer Documentation

Integrate GG Pay BD with your website, application or e-commerce platform and accept online payments through a simple REST API.

● API Version 1.00   •   Updated: 30 September, 2026

Overview

General Overview

GG Pay BD is an online payment automation platform designed for websites, applications and digital businesses. Using our REST API, you can create payment requests and automatically receive payment status information.

Our API-based payment system allows your application to redirect customers to the payment page and receive the transaction result after the payment process is completed.

GG Pay BD

Payment API Base URL: https://pay.ggtopup.shop

Setup Your Panel

Setup Checklist
  • Create an account from your GG Pay BD panel.
  • Complete your profile information.
  • Purchase an available plan if required.
  • Add and verify your website domain.
  • Configure your payment methods.
  • Copy your API credentials.

API Credentials

Your application requires the following credentials to communicate securely with GG Pay BD.

  • API Key — identifies your application.
  • Secret Key — authenticates your API requests.
  • Host Name — your registered website domain.
Security Warning

Never expose your Secret Key inside frontend JavaScript, mobile client code or public repositories.

Payment Environment

GG Pay BD currently provides a live environment for processing real transactions.

Live Environment

All transactions created through the live environment are real transactions.

Base URL: https://pay.ggtopup.shop

REST API

API Endpoint

https://pay.ggtopup.shop/request/payment/create

Method

POST

Create Payment

Send a POST request to the GG Pay BD payment endpoint to create a new payment session.

Request Parameters

Parameter Type Description
cus_name string Required Customer name.
cus_email string Required Customer email address.
success_url string URL where the customer is redirected after successful payment.
cancel_url string URL where the customer is redirected after cancelled or failed payment.
amount string Payment amount.

Request Headers

Header Type Description
Content-Type application/x-www-form-urlencoded Request content type.
app-key string Your GG Pay BD API Key.
secret-key string Your GG Pay BD Secret Key.
host-name string Your registered domain.

Payment Create Code

PHP cURL
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://pay.ggtopup.shop/request/payment/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',

    CURLOPT_POSTFIELDS => array(
        'cus_name' => 'Demo User',
        'cus_email' => 'demo@gmail.com',
        'amount' => '10',
        'success_url' => 'https://example.com/success.php',
        'cancel_url' => 'https://example.com/cancel.php'
    ),

    CURLOPT_HTTPHEADER => array(
        'app-key: YOUR_API_KEY',
        'secret-key: YOUR_SECRET_KEY',
        'host-name: example.com'
    ),
));

$response = curl_exec($curl);

curl_close($curl);

echo $response;

?>
PHP Guzzle
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;

$client = new Client();

$headers = [
    'app-key' => 'YOUR_API_KEY',
    'secret-key' => 'YOUR_SECRET_KEY',
    'host-name' => 'example.com'
];

$options = [
    'multipart' => [

        [
            'name' => 'cus_name',
            'contents' => 'Demo User'
        ],

        [
            'name' => 'cus_email',
            'contents' => 'demo@gmail.com'
        ],

        [
            'name' => 'amount',
            'contents' => '10'
        ],

        [
            'name' => 'success_url',
            'contents' => 'https://example.com/success.php'
        ],

        [
            'name' => 'cancel_url',
            'contents' => 'https://example.com/cancel.php'
        ]

    ]
];

$request = new Request(
    'POST',
    'https://pay.ggtopup.shop/request/payment/create',
    $headers
);

$response = $client
    ->sendAsync($request, $options)
    ->wait();

echo $response->getBody();

?>
Node.js / Axios
const axios = require('axios');
const FormData = require('form-data');

const data = new FormData();

data.append('cus_name', 'Demo User');
data.append('cus_email', 'demo@gmail.com');
data.append('amount', '10');

data.append(
    'success_url',
    'https://example.com/success.php'
);

data.append(
    'cancel_url',
    'https://example.com/cancel.php'
);

const config = {
    method: 'post',

    url: 'https://pay.ggtopup.shop/request/payment/create',

    headers: {
        'app-key': 'YOUR_API_KEY',
        'secret-key': 'YOUR_SECRET_KEY',
        'host-name': 'example.com',
        ...data.getHeaders()
    },

    data: data
};

axios.request(config)

.then((response) => {
    console.log(response.data);
})

.catch((error) => {
    console.error(error);
});

Payment Response

After the payment request is successfully created, the customer can be redirected to the payment page.

Successful Payment

Success Redirect

Your success URL may receive the following GET parameters:

success.php?transactionId=XXXX &paid_by=bkash &paymentAmount=10.00 &paymentFee=0.00 &success=1 &p_type=XXXX

Failed / Cancelled Payment

Cancel Redirect

Your cancel URL may receive:

cancel.php?transactionId=XXXX &paymentAmount=10.00 &paymentFee=0.00 &success=0

Returned Parameters

Parameter Type Description
transactionId string Unique transaction identifier.
paymentAmount string Payment amount.
paymentFee string Applicable payment fee.
success integer 1 for success, 0 for failure/cancel.
p_type string Payment method/type.

Verify Payment

Always verify the transaction from your server before marking an order as paid. Do not rely only on frontend redirect parameters.

Security Check

Your server should verify the transaction using the official GG Pay BD verification endpoint before delivering any product or service.

Verify Endpoint

POST

https://pay.ggtopup.shop/request/payment/verify

Verify Parameters

Parameter Type Description
transaction_id string Transaction ID received from the payment process.

PHP Verification

PHP cURL
<?php

$curl = curl_init();

curl_setopt_array($curl, array(

    CURLOPT_URL => 'https://pay.ggtopup.shop/request/payment/verify',

    CURLOPT_RETURNTRANSFER => true,

    CURLOPT_ENCODING => '',

    CURLOPT_MAXREDIRS => 10,

    CURLOPT_TIMEOUT => 30,

    CURLOPT_FOLLOWLOCATION => false,

    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

    CURLOPT_CUSTOMREQUEST => 'POST',

    CURLOPT_POSTFIELDS => array(
        'transaction_id' => 'TRANSACTION_ID'
    ),

    CURLOPT_HTTPHEADER => array(
        'app-key: YOUR_API_KEY',
        'secret-key: YOUR_SECRET_KEY',
        'host-name: example.com'
    ),

));

$response = curl_exec($curl);

curl_close($curl);

echo $response;

?>

Verification Response

Example Response
{
    "cus_name": "Demo User",
    "cus_email": "demo@gmail.com",
    "amount": "10",
    "transaction_id": "JJTG987652",
    "status": "1",
    "message": "success"
}

Response Status

Value Meaning
1 Payment verified successfully.
0 Payment not verified / unsuccessful.

Available Modules

Ready-to-use integrations can be provided for supported platforms.

WHMCS
WHMCS Payment Module
Download
WordPress
WordPress Payment Module
Download
SMM Panel
SMM Panel Integration
Download
Sketchware
Mobile App Integration
Download