Welcome to GateKey Payment Gateway
GateKey Payment Gateway is a secure, scalable and reliable payment platform that enables businesses to accept and manage digital payments with ease. Designed for modern payment ecosystems, GateKey provides flexible integration options, robust security and comprehensive transaction management through a unified platform.
This documentation will help you get started with GateKey, integrate payment APIs, configure authentication and security, download and integrate supported plugins, test your integration in the UAT environment and go live with production credentials.
Base URLs
https://api-stage.gatekey.money
https://api.gatekey.om
Quick access
Integration Checklist
Complete the following steps before integrating with GateKey Payment Gateway.
- Register as a GateKey merchant.
- Obtain your API credentials — Client ID, Access Token and Terminal TID.
- Configure your callback (return, fallback and notify) URLs.
- Generate request signatures — see Signature Generation.
- Integrate the Create Payment API to start a hosted checkout session.
- Handle the payment response on your return/notify URL.
- Verify payment status using the Verify Payment API.
- Test the full flow in the UAT (Staging) environment.
- Obtain your Production credentials from the Merchant Portal.
- Switch your base URL to the Production (Live) environment and go live.
Prerequisites
Before you begin, make sure you have the following on hand.
- An active GateKey merchant account
- Merchant Client ID
- Access Token
- Terminal TID
- A return URL for post-checkout redirects
- A callback/notify (webhook) URL for server-to-server updates
- An HTTPS-enabled application to receive redirects and webhooks
Authentication
GateKey authenticates every API request using three merchant credentials, combined with a signed request. Find these in your Merchant Portal under API Credentials.
| Credential | Description |
|---|---|
merchant.clientId | Your merchant client identifier. |
merchant.accessToken | Merchant access token, also used as the signing key. |
merchant.terminalTid | Terminal ID associated with your merchant account. |
Environments
GateKey provides two environments. Use Staging (UAT) to test your integration end-to-end before switching to Production.
https://api-stage.gatekey.money
Used for testing and integration.
https://api.gatekey.om
Used for live transactions.
Create Payment
Creates a new hosted checkout session and returns a checkoutUrl to redirect your customer to.
Body parameters
| Name | Type | Description |
|---|---|---|
| merchant.clientId required |
string | Your merchant client identifier. |
| merchant.accessToken required |
string | Merchant access token issued by VaultX. |
| merchant.terminalTid required |
string | Terminal ID associated with your merchant account. |
| payment.authType required |
string | Authentication type, e.g. 3DS |
| payment.txnType required |
string | Transaction type, e.g. PURCHASE |
| payment.amount required |
string | Decimal amount as a string, e.g. "12.500" |
| payment.currency required |
string | ISO 4217 currency code. |
| payment.reference required |
string | Your own unique reference for this payment. |
| callbackUrls.returnUrl required |
string | Where the customer is redirected after completing checkout. |
| callbackUrls.fallbackUrl optional |
string | Redirect used if checkout cannot be completed. |
| callbackUrls.notifyUrl optional |
string | Server-to-server webhook for async status updates. |
| checkoutContext.integrationMode required |
string | e.g. HOSTED |
| checkoutContext.deviceChannel required |
string | e.g. BROWSER |
| checkoutContext.locale optional |
string | Locale for the hosted checkout page, e.g. en-OM |
| customer.firstName optional |
string | Customer's first name. |
| customer.middleName optional |
string | Customer's middle name. |
| customer.lastName optional |
string | Customer's last name. |
| customer.email optional |
string | Customer's email address. |
| customer.countryCode optional |
string | Customer's ISO country code, e.g. OM |
| customer.mobileNumber optional |
string | Customer's mobile number. |
| orderInfo.orderId optional |
string | Your internal order ID. |
| orderInfo.orderName optional |
string | Short order name shown on the hosted checkout page. |
| orderInfo.orderSummary optional |
string | Short human-readable summary of the order. |
| orderInfo.details optional |
object | Free-form key/value map with extra order metadata. |
Handle Payment Response
1. Return URL
During the Create Payment request, the merchant provides the URL to which the customer should be returned after the payment flow is completed.
The return URL is provided under:
{
"callbackUrls": {
"returnUrl": "https://merchant.example.com/payment/response"
}
}
After the payment is completed, failed, or cancelled, the Payment Gateway sends the payment response to the configured:
callbackUrls.returnUrl
The response is submitted using an HTTP POST form submission.
2. Response Format
The Payment Gateway sends a single POST form parameter:
payload
The payload value is encoded using Base64URL encoding.
The individual payment response fields are not sent as separate form parameters.
Conceptually, the Payment Gateway sends:
<form
method="POST"
action="https://merchant.example.com/payment/response">
<input
type="hidden"
name="payload"
value="<BASE64URL_ENCODED_PAYMENT_RESPONSE>" />
</form>
The form is automatically submitted to the merchant's configured callbackUrls.returnUrl.
3. Example Create Payment Request
The merchant provides the return URL while creating the payment.
{
"transaction": {
"type": "SALE",
"reference": "ORD-100234",
"amount": {
"value": "25.000",
"currencyCode": "OMR"
}
},
"callbackUrls": {
"returnUrl": "https://merchant.example.com/payment/response"
}
}
The Payment Gateway stores the provided returnUrl for the payment transaction.
After completion of the payment flow, the payment result is returned to this URL using an HTTP POST form submission.
4. Example Payment Gateway Response
The merchant application receives an HTTP POST similar to the following:
POST /payment/response HTTP/1.1
Host: merchant.example.com
Content-Type: application/x-www-form-urlencoded
payload=eyJwYXltZW50UmVmIjoiUEFZLTIwMjYwODE0MDAwMSIsInJlZmVyZW5jZSI6Ik9SRC0xMDAyMzQifQ
The value of payload is a Base64URL-encoded payment response.
The merchant application must not attempt to directly parse this value as JSON.
5. Payload Decoding
After receiving the POST request, the merchant application must first retrieve the payload form parameter and perform Base64URL decoding.
The recommended processing flow is:
HTTP POST
|
v
Read "payload"
|
v
Validate payload
|
v
Base64URL Decode
|
v
UTF-8 JSON
|
v
Parse JSON
|
v
Extract Response Fields
|
v
Verify Signature
|
v
Process Payment Result
After Base64URL decoding, the decoded bytes should be converted to a UTF-8 string before parsing the JSON response.
Conceptually:
encodedPayload = POST["payload"]
decodedBytes = Base64UrlDecode(encodedPayload)
decodedPayload = UTF8Decode(decodedBytes)
paymentResponse = JsonParse(decodedPayload)
6. Base64URL vs Standard Base64
Merchants must use a Base64URL decoder rather than assuming that the payload uses standard Base64 encoding.
Base64URL is a URL-safe variation of Base64.
The main character differences are:
Standard Base64 Base64URL
+ -
/ _
Base64URL values may also be transmitted without trailing = padding characters.
For example:
Standard Base64:
YWJjZGVmZw==
Base64URL:
YWJjZGVmZw
The merchant should use the native Base64URL decoding capability provided by the programming language or framework.
If the selected library requires Base64 padding, the application may need to restore the required = padding before decoding.
Important: Base64URL is an encoding format only. It does not provide encryption, authentication, or integrity protection.
7. Example Decoded Payload
After successfully decoding the Base64URL value, the merchant receives the Payment Gateway response in JSON format.
Example:
{
"paymentRef": "PAY-202608140001",
"reference": "ORD-100234",
"status": "SUCCESS",
"amount": "25.000",
"currency": "OMR",
"traceNumber": "483920",
"authCode": "739281",
"maskedCard": "512345******1234",
"timestamp": "2026-08-14T10:30:25Z",
"nonce": "74981af8",
"signVersion": "v1",
"signature": "..."
}
The exact fields returned in the response depend on the Payment Gateway transaction and response specification.
The decoded JSON response should be parsed using the standard JSON parser available in the merchant's programming language.
After parsing the payload, the merchant application can extract the required transaction and signature-related fields.
For example:
paymentRef
reference
status
amount
currency
traceNumber
authCode
maskedCard
timestamp
nonce
signVersion
signature
Important: The decoded payload must not yet be considered trusted. The merchant must perform signature verification before relying on the transaction status or processing the payment result.
Verify Payment
Confirms the outcome of a checkout session after the customer completes (or abandons) authentication. Call this from your returnUrl or notifyUrl handler.
Body parameters
| Name | Type | Description |
|---|---|---|
| merchant.clientId required |
string | Your merchant client identifier. |
| merchant.accessToken required |
string | Merchant access token issued by VaultX. |
| merchant.terminalTid required |
string | Terminal ID associated with your merchant account. |
| payment.reference required |
string | The reference you supplied on Init. |
| payment.verifyToken required |
string | Token returned to your returnUrl after checkout. |
| payment.entryRef required |
string | Session entry reference returned by Init. |
Check Payment Status
Polls the current status of a previously initiated payment using the same reference and tokens as Verify. In the source collection this shares the /payments/verify path with the Verify operation — confirm with your backend whether a dedicated /payments/status path exists before shipping this as a separate call.
Body parameters
| Name | Type | Description |
|---|---|---|
| merchant.clientId required |
string | Your merchant client identifier. |
| merchant.accessToken required |
string | Merchant access token issued by VaultX. |
| merchant.terminalTid required |
string | Terminal ID associated with your merchant account. |
| payment.reference required |
string | The reference you supplied on Init. |
| payment.verifyToken required |
string | Token returned to your returnUrl after checkout. |
| payment.entryRef required |
string | Session entry reference returned by Init. |
Generate Signature
Every request to GateKey must be signed so we can verify it came from you and was not tampered with in transit. Attach the following headers to each API call.
| Header | Description |
|---|---|
X-Vaultx-Timestamp | UTC request time in ISO 8601 format, e.g. 2026-07-17T10:15:30Z. |
X-Vaultx-Nonce | A unique UUID v4 generated fresh for every request, preventing replay attacks. |
X-Vaultx-Signature | HMAC-SHA256 signature of the canonical request string, hex-encoded. |
Canonical string & signing steps
- Build the canonical string by joining the HTTP method, request path, timestamp, nonce, and the raw JSON request body with newline characters.
- Compute an HMAC-SHA256 hash of the canonical string using your merchant Access Token as the secret key.
- Hex-encode the resulting hash — this is your X-Vaultx-Signature value.
- Send the Timestamp, Nonce, and Signature headers along with the request, matching the values used to build the string exactly.
Verify Signature
GateKey signs every redirect and webhook it sends back to you using the same scheme you use to sign your own requests. Verify this signature before trusting a callback.
Verification steps
- Read the X-Vaultx-Timestamp, X-Vaultx-Nonce and X-Vaultx-Signature headers from the incoming request.
- Rebuild the same canonical string locally using the method, path, timestamp, nonce and raw request body you received.
- Compute the HMAC-SHA256 of that string using your Access Token, then hex-encode it.
- Compare the result to the X-Vaultx-Signature header using a constant-time comparison. Reject the request if they do not match.
- Reject the request if the timestamp is older than 5 minutes or the nonce has already been seen.
WooCommerce — Installation Guide
Prefer not to integrate the API directly? Install the official GateKey Payment Gateway plugin and accept payments on your WordPress or WooCommerce store in minutes.
Installation steps
- Download the plugin ZIP from the Download Plugin page.
- In your WordPress dashboard, go to
Plugins → Add New → Upload Plugin. - Select the downloaded ZIP file and click Install Now.
- Click Activate Plugin once installation finishes.
- Continue to the Configuration Guide to connect your merchant credentials.
WooCommerce — Configuration Guide
Once the plugin is active, connect it to your GateKey merchant account and confirm it appears at checkout.
- Go to
WooCommerce → Settings → Payments → GateKey Payment Gateway. - Enter your Client ID, Access Token and Terminal TID from the Merchant Portal.
- Choose the environment — UAT for testing, Production once you are ready to go live.
- Copy the generated notify (webhook) URL and add it to your GateKey merchant configuration.
- Save changes, then place a test order in UAT to confirm GateKey appears and completes checkout correctly.
Download Plugin
Get the latest official GateKey Payment Gateway plugin for WooCommerce.
Download GateKey WordPress PluginAfter downloading, follow the Installation Guide, then the Configuration Guide to finish setup.
Merchant Portal
Manage your merchant account, transactions, settlements, reports and payment configuration from the Merchant Portal.
Open Merchant PortalSections
- DashboardAt-a-glance view of recent activity.
- TransactionsSearch and inspect individual payments.
- ReportsExport transaction and settlement data.
- RefundsIssue full or partial refunds.
- SettlementsTrack payouts to your bank account.
- Payment ConfigurationEnable payment methods and checkout options.
- API CredentialsView and rotate your Client ID, Access Token and Terminal TID.
- WebhooksConfigure notify URLs and view delivery logs.
- User ManagementInvite teammates and set access roles.
Test Cards
Use the following card numbers in the UAT (Staging) environment to simulate different payment outcomes. Do not use these cards in Production.
| Scenario | Card | Network | Card Number | Expiry | CVV |
|---|---|---|---|---|---|
| Successful Payment | Visa - Standard | Visa | 4111 1111 1111 1111 |
12/30 |
123 |
Error Codes
A complete list of API response codes and troubleshooting guidance.
| Code | Description |
|---|---|
| 200 | Success — the request was completed. |
| 400 | Bad Request — one or more fields are missing or invalid. |
| 401 | Authentication Failed — the signature, timestamp or nonce is invalid or expired. |
| 403 | Access Denied — your credentials do not have permission for this action. |
| 404 | Resource Not Found — the reference, token or endpoint does not exist. |
| 500 | Internal Server Error — something went wrong on GateKey's side. Retry, and contact support if it persists. |
FAQs
Common questions related to authentication, signature generation, callback handling, payment status, UAT testing and production onboarding.
What credentials do I need to authenticate a request?
Your Client ID, Access Token and Terminal TID, combined with a valid request signature. See Authentication and Generate Signature.
Why is my request rejected with a 401?
Usually an incorrect signature, an expired timestamp (older than 5 minutes), or a reused nonce. Recheck the canonical string you signed.
How do I handle the customer's return to my site after checkout?
GateKey redirects the customer to your returnUrl with a verifyToken and entryRef. Call Verify Payment with those values to confirm the final status — do not trust the redirect alone.
How can I check a payment's status later?
Use Check Payment Status with the same reference and tokens you used on Verify Payment.
How do I test my integration before going live?
Point your integration at the UAT base URL and use your staging credentials. Once every flow — create, redirect, verify, refund — works as expected, request Production credentials from the Merchant Portal.
What changes when I switch to Production?
Swap the base URL and credentials from UAT to Production, and update your notify/return URLs if they differ between environments.