Skip to main content

What is NaaS?

Noxpay as a Service (NaaS) lets a master merchant operate sub-merchant accounts programmatically. Using your master API key plus a cryptographic signature, you can enroll sub-merchants, trigger KYB onboarding, create checkout links, manage wallets, initiate withdrawals, and query splits — all scoped to a specific sub-merchant via a correlation_id.

Base URL

All NaaS endpoints are under the /v2/naas/ prefix.

Key setup

1. Generate an RSA key pair

The key must be at least 2048 bits. 4096 bits is recommended for long-lived keys.
A PKCS#1 public key format is also accepted:
Keep naas_private.pem on your servers and never share it. Only the public key is registered with Noxpay.

2. Register the public key

In the Noxpay dashboard, go to NaaS → Setup → Public Key, paste the contents of naas_public.pem, and save. The key takes effect immediately. You can rotate it at any time — the previous key is deactivated automatically.

Authentication

Every NaaS request requires an api-key header. The authentication mechanism differs by HTTP method:
  • POST requests carry authentication in the request body as a signed JSON envelope.
  • GET requests carry authentication entirely in request headers — no body is sent.

POST requests — signed envelope

Every POST body is a JSON envelope:
To sign a request:
  1. Build the JSON envelope with the current UTC timestamp, optionally the correlation_id, and the endpoint payload.
  2. Serialize it to bytes — do not re-serialize after signing.
  3. Compute SHA-256 of the bytes.
  4. Sign with your RSA private key using PKCS#1 v1.5 padding.
  5. Base64-encode the signature and send it as X-Signature.

GET requests — signed headers

GET endpoints carry no body. Pass authentication in three additional headers: To sign a request, build the canonical string <X-Timestamp>\n<X-Correlation-ID> — the exact X-Timestamp value, a newline (\n), then the exact X-Correlation-ID value — sign its SHA-256 hash with your RSA private key (PKCS#1 v1.5), and Base64-encode the result as X-Signature.

Replay protection

Each (timestamp, correlation_id, signature) triple is treated as a one-time token. Always use the current time when building the envelope or signing headers — never reuse a previously signed request.

Webhook verification

All NaaS webhooks are signed with HMAC-SHA256 using your webhook secret. The signature is delivered in two headers: Verify either header — they carry the same digest. Register your webhook secret at NaaS → Setup → Webhook Secret. The secret must be 32–512 printable characters with no spaces.