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
Request Body
The request body must be a JSON object.
Example Request Body:
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