Quick start
Create an order — Returns pay_url for your customer. After they pay we send them to your redirect_url and fire order.paid to your webhook.
# 1. Create an order
curl -X POST https://getgateway.online/checkout/create \
-H "Authorization: Bearer
gg_live_XXXX:YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 99.00,
"customer_phone": "9876543210", # optional - if omitted, we ask the customer on the pay page
"customer_email": "
[email protected]", # optional
"note": "Order #5821",
"redirect_url": "https://shop.example.com/orders/5821/thanks"
}'
# Response
{
"ok": true,
"order_uid": "GG-A93XQ12",
"pay_url": "https://getgateway.online/pay/GG-A93XQ12",
"amount": "99.42",
"expires_at": "2026-10-04 19:30:00"
}
Webhook — when paid, we POST signed JSON to every endpoint you registered below.
# POST to your webhook URL
POST /webhooks/pay HTTP/1.1
X-Gateway-Event: order.paid
X-Gateway-Signature: sha256<hex>
Content-Type: application/json
{
"event": "order.paid",
"data": {
"order_uid": "GG-A93XQ12",
"amount": "99.42",
"utr": "423901782341",
"txn_id": "TXN789..",
"merchant": "DEPU STORE"
},
"created": "2026-10-04T19:25:18+05:30"
}
# Verify the signature server-side
hash_hmac('sha256', $rawBody, $endpoint_secret);
# The redirect_url query params are signed with the SAME secret:
$msg = $_GET['order_uid']. '|' . $_GET['status'] . '|' . $_GET['amount'] . '|' . $_GET['utr'];
$expect = hash_hmac('sha256', $msg, $endpoint_secret);
hash_equals($expect, $_GET['signature']);
Telegram Bot — add "platform": "telegram" to get QR data inline (no redirect needed).
# Create order for Telegram bot
curl -X POST https://getgateway.online/checkout/create \
-H "Authorization: Bearer gg_live_XXXX:YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"amount": 99.00,
"customer_phone": "9876543210",
"note": "Order #5821",
"platform": "telegram"
}'
# Response — includes QR + UPI data for inline display
{
"ok": true,
"order_uid": "GG-A93XQ12",
"pay_url": "https://getgateway.online/pay/GG-A93XQ12",
"amount": "99.42",
"qr_url": "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=...", # send as photo
"upi_uri": "upi://pay?pa=merchant@upi&am=99.42...",
"upi_id": "merchant@upi",
"amount_charged": "99.42",
"merchant_name": "DEPU STORE",
"verify_url": "https://getgateway.online/checkout/verify",
"verify_token": "eyJhbGciOi...",
"expires_in": 600
}
# Poll for payment status (every 4s)
curl -X POST https://getgateway.online/checkout/verify \
-d "t=VERIFY_TOKEN_FROM_RESPONSE"
# -> {"status":"PENDING"} or {"status":"SUCCESS","amount":"99.42","utr":"423901782341"}