Developers

Integrate in an afternoon

A plain REST API with JSON, idempotent by design and documented with OpenAPI. Test everything for free in the sandbox, then switch one URL and one key to go live.

Base URL
https://nodegate.space
Sandbox
https://testnet.nodegate.space
Auth
x-api-key header
Format
JSON, amounts as decimal strings
Webhooks
HMAC-SHA256 signed, retried with backoff
Quickstart

From zero to a paid test invoice

  1. Get sandbox keys

    Create an account and a sandbox API key. Keep the key and webhook secret on your server only.

  2. Create an invoice

    POST /api/v1/invoices with your order ID and amount, then send the customer to checkout_url.

  3. Handle the webhook

    Verify the signature, then mark the order paid on invoice.paid. Retries are safe: the same event can arrive twice.

Code

Create a payment

Retrying with the same order_id returns the same invoice, never a second one.

  • Idempotent. Order IDs and withdrawal references are unique, so retries are always safe.
  • Exact amounts. Decimal strings at full token precision, never floating point.
  • AI-ready. The integration skill lets your AI coding assistant wire NodeGate into your codebase.
curl -X POST https://nodegate.space/api/v1/invoices \
  -H "x-api-key: $NODEGATE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"order_id":"1042","amount_usd":"49.99","network":"TRC20"}'
const res = await fetch(`${NODEGATE_URL}/api/v1/invoices`, {
  method: 'POST',
  headers: { 'x-api-key': API_KEY, 'content-type': 'application/json' },
  body: JSON.stringify({ order_id: '1042', amount_usd: '49.99', network: 'TRC20' }),
});
const { data } = await res.json();
// redirect the customer to data.checkout_url
import os, requests

r = requests.post(f"{os.environ['NODEGATE_URL']}/api/v1/invoices",
    headers={"x-api-key": os.environ["NODEGATE_API_KEY"]},
    json={"order_id": "1042", "amount_usd": "49.99", "network": "TRC20"},
    timeout=10)
invoice = r.json()["data"]  # send the customer to invoice["checkout_url"]
Verify every webhook
// signature = HMAC-SHA256(api_secret, timestamp + "." + raw_body)
const expected = crypto.createHmac('sha256', secret)
  .update(`${headers['x-nodegate-timestamp']}.`).update(rawBody).digest();
const valid = crypto.timingSafeEqual(expected,
  Buffer.from(headers['x-nodegate-signature'], 'hex'));
Webhooks

Events your server receives

EventWhen
invoice.paidA payment is final and can't be reversed
payout.approvedA withdrawal request is approved
payout.rejectedA withdrawal request is rejected; refund your user's balance
payout.completedThe funds reached the recipient
payout.failedAn automatic send failed; no funds left your wallet