GSM Pay
GSM PAY DEVELOPER PLATFORM

Build secure payment integrations

Create invoices, redirect customers to hosted checkout, verify signed callbacks and reconcile invoice status using one server-side API.

Production APIhttps://pay.gsmpk.comHTTPS · API key · idempotency · signed callbacks
QUICK START

Production payment flow

1CreateYour server creates a pending invoice.
2CheckoutRedirect the customer to hosted checkout.
3VerifyGSM Pay verifies provider evidence.
4CallbackYour server validates the signed event.
AUTHENTICATION

Keep credentials server-side

Merchant API requests use HTTPS and X-API-KEY. Never expose merchant credentials in browser JavaScript, public HTML or URLs.

Use idempotency for writes.Send one stable X-Idempotency-Key for every merchant business operation.
POST/api/payment.php

Create a pending invoice

POST https://pay.gsmpk.com/api/payment.php
Content-Type: application/json
X-API-KEY: YOUR_SERVER_SIDE_API_KEY
X-Idempotency-Key: order-123456-unique

{
  "amount": "12.50000000",
  "currency": "USDT",
  "customer_name": "Customer",
  "cus_email": "customer@example.com",
  "additional_id": "order-123456",
  "callback_url": "https://merchant.example/payment-callback"
}
GET/api/ascertain.php

Read invoice status

GET https://pay.gsmpk.com/api/ascertain.php?invoice_id=INVOICE_REFERENCE
X-API-KEY: YOUR_SERVER_SIDE_API_KEY
HOSTED CHECKOUT

Send customers to GSM Pay

Use the hosted payment URL returned by the invoice API. GSM Pay presents approved receiving routes and performs server-side payment verification.

A browser return is not proof of payment.Use verified invoice state or a valid signed callback before changing the merchant order.
SIGNED CALLBACKS

Validate every callback

expected = HMAC_SHA256(
    timestamp + "." + exact_raw_body,
    callback_signing_key
)

constant-time compare with X-GSM-Signature
reject stale X-GSM-Timestamp values
consume each X-GSM-Event-ID exactly once
INTEGRATION HUB

One secure protocol, multiple platforms

Custom PHPSelf-contained server-side PHP SDK.
WooCommerceBackend gateway adapter + hosted checkout.
WHMCSServer-side gateway module + callback reconciliation.
ShopifyPrivate/custom backend bridge.
WixBackend integration without browser credentials.
Dhru / GSMOrder adapter + invoice reconciliation.
PAYMENT INTEGRITY

What never proves payment

  • Screenshots or edited browser values
  • Unsigned callbacks
  • Customer-controlled expected amounts
  • Browser return URLs
  • Raw balance differences
DEVELOPER RESOURCES

Download integration resources