This is the API reference for integrating Nomad Pay’s “API Order” method.Documentation Index
Fetch the complete documentation index at: https://docs.nomadpay.io/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
All API requests should be sent to:https://api.nomadpay.io
Create a Payment
This endpoint is used to initiate a payment request and generate a payment URL for the user.- Endpoint:
POST /v1/payments - Method:
POST - Content-Type:
application/json - Signature Algorithm:
Ed25519
Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | Must be application/json. |
x-api-key | Yes | Your Public Key obtained from the merchant dashboard. |
x-signature | Yes | The Ed25519 signature of the request body, Hex encoded. |
Request Body
The request body must be a JSON object.| Field | Type | Required | Description |
|---|---|---|---|
secret_id | string | Yes | Your unique order ID from your own system. |
nonce | int64 | Yes | A unique, increasing number, like a millisecond timestamp. |
amount | float64 | Yes | The payment amount. |
currency | string | Yes | The pricing currency code (e.g., USD, EUR, HKD). |
callback_url | string | Yes | The URL the user will be redirected to after a successful payment. |
forward_url | string | Yes | The URL the user is redirected to if they cancel or the payment fails. |
sender | string | No | An identifier for the payer (e.g., your user’s ID). |
reciever | string | No | An identifier for the receiver (e.g., your merchant’s ID). |
meta_data | map[string]any | No | Any additional metadata you want to associate with the order. |
Generating the Signature
To create thex-signature, you must sign the raw JSON request body using your Ed25519 Secret Key (Private Key).
Process:
- Serialize the Body: Convert your JSON request body into a raw string, with no extra spaces or line breaks.
- Sign the String: Use your Ed25519 private key (from your hex seed) to sign the byte array of the string from step 1.
- Encode the Signature: Convert the resulting signature into a Hex-encoded string.
- Set the Header: Place this Hex string into the
x-signatureheader.
Responses
Success Response- Code:
HTTP 200 OK - Body:
- Action: You must redirect your user to the
payment_urlprovided.
- Code:
HTTP 4xx/5xx - Body:
- Error Codes:
1001: Parameter validation failed1002: API key is required1003: Invalid signature1004: Nonce has already been used2001: Internal server error