Create Payment Invoice

Creates a dynamic invoice tied to a specific payment link template, allowing merchants to pass customer and product details.

Authentication - HMAC-SHA256

All requests MUST include custom headers for security and verification:

Required Headers:

  • Content-Type: Must be application/json
  • x-api-key: Merchant's Public Key (pk_...)
  • x-timestamp: Current time in milliseconds (e.g., 1758957600000)
  • x-signature: HMAC-SHA256 hash
  • X-Api-Version: API version (v1)

Optional Headers:

  • x-trace-id: Request trace ID for logging

HMAC Signature Calculation

const method = 'POST';
const path = '/checkout/payment-link/invoice';
const timestamp = Date.now().toString();
const body = JSON.stringify(requestBody);
const message = method + path + timestamp + body;
const signature = crypto.createHmac('sha256', SECRET_KEY).update(message).digest('hex');

Environment & Security

  • Organizations with status !== 'live' can only use sandbox API keys
  • Live organizations can use both sandbox and live API keys
  • Production requests must come from whitelisted IPs
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Invoice details with customer and product information

string
required

Unique ID of the payment link template created in the Merchant Dashboard

string
required

Payment amount (passed as string to avoid floating-point precision errors)

string
enum
required

Three-letter currency code (ISO 4217)

productDetails
object
required
individual
object
required
uri
required

URL to redirect the user to after a successful payment

uri
required

URL to redirect the user to after a failed payment

string
required
length between 1 and 100

Unique order identifier from the merchant's system. Highly recommended to use a unique identifier like order-{{timestamp}}

Headers
string
required

The Merchant's Public Key (pk_...) for identification

string
required

Current time in milliseconds since Unix epoch - Used to prevent replay attacks

string
required

HMAC-SHA256 hash calculated as: crypto.createHmac('sha256', secretKey).update(method + path + timestamp + body).digest('hex')

string
enum
required

API version, currently fixed at v1

Allowed:
string

Optional trace ID for request tracking and debugging

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json