Introduction to Payget

Payget is a simple and secure payment automation system that allows merchants to collect payments using personal or business accounts. Payget enables websites and applications to accept payments instantly through a secure payment gateway.

API Introduction

The Payget API allows merchants to create payments, redirect customers to a secure payment page, and receive instant verification through callback or webhook URLs.

API Operation

Payget supports Sandbox for testing & Live for production. Use test credentials for sandbox and switch to live credentials when ready.

Live API Endpoint (Create Payment):
https://api.payget.xyz/v1/payment/create

Create Payment Examples

The following examples show how to create a payment request with the Payget API in various programming languages.


<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.payget.xyz/v1/payment/create',
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 => json_encode([
"redirect_url" => "https://yourdomain.com/success",
"cancel_url" => "https://yourdomain.com/cancel",
"webhook_url" => "https://yourdomain.com/webhook",
"metadata" => ["phone" => "016****"],
"amount" => "10"
]),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'payget-api-key: YOUR_BRAND_API_KEY'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response Example


{
"status": true,
"message": "Payment URL generated successfully",
"payment_url": "https://secure.payget.xyz/payment/abc123xyz"
}

Required Parameters

Parameter Description Required Example
amount Payment amount Yes 10.00
redirect_url Redirect after payment Yes https://yourdomain.com/success
cancel_url Cancel redirect Yes https://yourdomain.com/cancel
cus_email Customer email Yes john@example.com
metadata Extra data No {"orderId":"12345"}
webhook_url Callback for verification Yes https://yourdomain.com/webhook

Verify Payment

Verify Endpoint:
https://api.payget.xyz/v1/payment/verify

PHP Verify Example


Warning: Undefined array key "invoiceId" in /home/paygetxy/public_html/doc.php on line 411

Response Example

{
"transaction_id": "PGX123456",
"invoiceId": "553ca0ac-28c0",
"amount": "900.00",
"status": "COMPLETED",
"customerEmail": "john@example.com"
}

API Reference

  • POST /v1/payment/create — Create payment
  • POST /v1/payment/verify — Verify payment

WordPress / WooCommerce Plugin

Payget provides a WordPress plugin for WooCommerce to accept payments via bKash, Nagad, and Rocket.

Steps:

  1. Download plugin
  2. Upload → Install → Activate
  3. Go to WooCommerce → Payments
  4. Enter Payget API Key & Secret
© 2025 Payget — Documentation