Skip to content

Merchant API Documentation

Everything needed to integrate GateNOC into your application.

API v1 Operational https://gatenoc.com Open Demo

Getting Started

Create a merchant, generate a payment API key, and call the checkout session endpoint. Most integrations ship in under an hour.

Credentials

Dashboard → Merchants → Integration: payment API key (outbound) and webhook secret (verify inbound POSTs).

Log in or register for API keys.

Authentication

All Merchant API requests require a Bearer token (or X-Merchant-Key).

Bearer token

Authorization: Bearer YOUR_PAYMENT_API_KEY

  • Keep keys server-side only
  • Rotate keys if exposed
  • Optional merchant_id must match the key’s merchant

Never embed payment API keys in client-side apps or public repositories.

Headers
Authorization: Bearer YOUR_PAYMENT_API_KEY
Content-Type: application/json
Accept: application/json

Quick Start

Create a checkout session and redirect the customer to checkout_url.

curl -X POST https://gatenoc.com/api/v1/merchant/checkout-session \
  -H "Authorization: Bearer YOUR_PAYMENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount":10.50,"note":"order_123"}'

Response

JSON
{
  "checkout_url": "https://…/checkout/…",
  "expires_at": "2026-07-31T12:30:00+00:00",
  "merchant_id": 1
}

Payments

Retrieve a single payment or list payments for a merchant. Same auth. ~300 requests/min per merchant.

GET https://gatenoc.com/api/v1/merchant/payments/{id}

Authentication required · Returns the same fields as the webhook payload.

GET https://gatenoc.com/api/v1/merchant/payments

Query: status, from, to, per_page

Invoices

Create a hosted checkout session (invoice). Amount is USD (USDT 1:1).

POST https://gatenoc.com/api/v1/merchant/checkout-session
Authentication required · Rate limit ~300/min · Optional Idempotency-Key (24h replay)
Request body
{
  "amount": 10.50,
  "note": "order_123",
  "notify_url": "https://yoursite.com/webhooks/paid",
  "success_url": "https://yoursite.com/thanks",
  "return_url": "https://yoursite.com/cancel"
}

Optional Template 2 preselect

When Checkout Template 2 is active, optional gateway, currency/token, and chain/network can skip or prefill stage 1.

Refunds

Request a refund against a paid payment.

POST https://gatenoc.com/api/v1/merchant/payments/{id}/refund

Body: amount, optional reason.

Merchants

Merchant records, API keys, and gateway enablement are managed in the dashboard under Merchants → Integration. API calls are scoped to the authenticated merchant key.

Balances

GET https://gatenoc.com/api/v1/merchant/balance

Authentication required. Returns the merchant’s credited balance summary.

Withdrawals

Payout requests are initiated from the merchant dashboard. Configure withdrawal methods in account settings, then request a payout when your balance is ready.

Webhooks

JSON POST to your notify_url when a payment settles. Verify HMAC with the webhook secret (not the API key).

Your system creates a checkout session and stores the reference.
Customer opens checkout_url and completes payment on the hosted page.
GateNoc POSTs payment.completed, payment.overpaid, or payment.underpaid to notify_url with signature headers.
Return HTTP 200 quickly. Retry policy applies on non-2xx responses.
Use status + amount (credited gross). Over/underpaid amount is what the customer actually sent.

Headers: X-Gateway-Timestamp, X-Gateway-Signature as t=<ts>,v1=<hex> — HMAC-SHA256 of <timestamp>.<raw_body>.

status / event

  • completedevent: payment.completed (exact invoice amount credited)
  • overpaidevent: payment.overpaid (credits FlowNoc amount_fiat_received / amount_received_usd, e.g. invoice 10 / received 10.59)
  • underpaidevent: payment.underpaid (credits received fiat the same way when shortfall)

success is true for all three. Wallet credit uses amount minus the merchant receive fee (same as exact paid).

Exact paid
{
  "event": "payment.completed",
  "success": true,
  "status": "completed",
  "merchant_id": 1,
  "amount": "10.50",
  "currency": "USD",
  "payment_id": 42,
  "paid_at": "2026-03-24T12:00:00+00:00"
}
Overpaid
{
  "event": "payment.overpaid",
  "success": true,
  "status": "overpaid",
  "merchant_id": 1,
  "amount": "10.59",
  "currency": "USD",
  "payment_id": 43,
  "paid_at": "2026-08-06T13:39:17+00:00"
}
Underpaid
{
  "event": "payment.underpaid",
  "success": true,
  "status": "underpaid",
  "merchant_id": 1,
  "amount": "16.00",
  "currency": "USD",
  "payment_id": 44,
  "paid_at": "2026-08-06T14:00:00+00:00"
}

Errors

Standard HTTP status codes. Search the table below.

Code Meaning Action
401Invalid or missing keyCheck Bearer token / X-Merchant-Key
404Not foundVerify payment or resource id
422Validation errorFix request body fields
429Rate limitedBackoff and retry

SDKs

Official SDKs are not required—the REST API works with any HTTP client. Use the Quick Start samples for cURL, PHP, JavaScript, Python, and Go.

Changelog

API v1

Checkout session, payments, balance, refunds, and signed webhooks.

Partial settlements

Webhook/API status overpaid and underpaid with events payment.overpaid / payment.underpaid. Credited amount is what the customer sent (minus receive fee on wallet).

Copied to clipboard.