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
-
Get sandbox keys
Create an account and a sandbox API key. Keep the key and webhook secret on your server only.
-
Create an invoice
POST /api/v1/invoiceswith your order ID and amount, then send the customer tocheckout_url. -
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
| Event | When |
|---|---|
| invoice.paid | A payment is final and can't be reversed |
| payout.approved | A withdrawal request is approved |
| payout.rejected | A withdrawal request is rejected; refund your user's balance |
| payout.completed | The funds reached the recipient |
| payout.failed | An automatic send failed; no funds left your wallet |
Resources