Documentation Index
Fetch the complete documentation index at: https://docs.gate.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This page provides a minimum runnable path for merchants who want to complete their first GatePay payment flow from end to end. This document set focuses on the production integration flow. Before you begin integration, complete merchant onboarding, app creation, key setup, and callback URL configuration. If this is your first integration, use the following order:- Obtain
ClientIdand signing secrets - Generate the signed request headers
- Create your first checkout order
- Receive and verify the asynchronous callback
- Use the query endpoint for final confirmation
Step 1: Prepare Credentials
After creating your application in the merchant console, prepare at least the following:| Credential | Purpose |
|---|---|
ClientId | Sent through the X-GatePay-Certificate-ClientId header |
| Payment API Secret | Used to sign payment-related requests |
| Callback URL | Used to receive asynchronous notifications |
Step 2: Build the Signed Headers
At minimum, GatePay request signing uses these headers:X-GatePay-Certificate-ClientIdX-GatePay-TimestampX-GatePay-NonceX-GatePay-Signature
- use UTC milliseconds for
timestamp - use a one-time random string for
nonce - keep
bodyexactly identical to the actual request payload - log the canonical string locally before signing during integration debugging
Python signing example
Node.js signing example
Step 3: Create Your First Payment Order
The hosted checkout flow is the fastest way to validate signing, order creation, callback handling, and order querying. Request- Standard merchant API examples do not include
X-GatePay-On-Behalf-Ofin this temporary release. - In production integration, populate this header according to your subject-attribution model and the endpoint definition.
| Field | Description |
|---|---|
prepayId | GatePay pre-order ID used for later queries |
location | Hosted checkout redirect URL |
qrContent | QR-content URL returned in some modes |
location value directly. Do not construct the checkout page URL manually.
Step 4: Receive the Callback
After the user completes payment, GatePay sends an asynchronous callback to your configured callback URL. Example callback- verify the signature
- apply idempotent business processing
- update the local order state
- return HTTP 200 with the agreed acknowledgement body
Step 5: Query for Final Confirmation
For payment flows, the recommended operating model is callbacks first and query as fallback. Request- callbacks for real-time business progression
- queries for final confirmation and reconciliation
Pre-Go-Live Checklist
ClientId, secret, and callback URL are confirmed- request signing and callback verification are implemented server-side
merchantTradeNoandprepayIdare persisted- callback idempotency is implemented
- query endpoints are integrated as fallback
- monitoring and failure alerting are in place

