Live API

Payment Links

Create live shareable payment links for customers. Use your live API key — links accept real payments.

Important

Payment links created with your live API key process real transactions. Share links only with intended customers.

Create Payment Link

POST/api/payment-link
EncryptedAPI Key

Payload encryption required. Encrypt the request JSON and send { "payload": "<iv>:<ciphertext>" }. Decrypt the response payload field. Encryption guide →. Do not share your API key or Encryption Key with anyone.

Creates a shareable payment link that can be sent to customers via email, SMS, or any other channel.

Important

All payment API requests must be encrypted on your server before sending. Build the JSON below, encrypt it with your Encryption Key, and POST {"payload": "<iv_hex>:<ciphertext_hex>"}. Do not share your API key or Encryption Key with anyone — use them only on your backend. See the Encryption guide for code examples.

Request structure (encrypt this JSON)

{
  "merchantOrderId": "ORD-12345",

  "payment": {
    "amount": 100.50,
    "currency": "USD"
  },

  "callback": {
    "returnUrl": "https://your-domain.com/return",
    "webhookUrl": "https://your-domain.com/webhook"
  }
}

Wire format (send this to the API)

Encrypted request body

{
  "payload": "3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a:8e4f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0"
}

Request Parameters

Single reference table grouped by JSON object. Nested fields use dot notation (e.g. payment.amount).

FieldTypeRequiredDescription
Order
merchantOrderIdstringRequiredUnique order identifier
merchantProfileIdnumberOptionalMerchant profile ID. Defaults to PRIMARY if omitted
descriptionstringOptionalPayment link description
customerNamestringOptionalCustomer display name
customerEmailstringOptionalCustomer email address
sendEmailbooleanOptionalSend the payment link to the customer by email
expiresInnumberOptionalLink expiration in hours (default: 24)
metadatastringOptionalAdditional data as a JSON string
Paymentpayment
payment.amountnumberRequiredPayment amount (minimum 0.01)
payment.currencystringRequiredCurrency code (3 letters)
Callbackcallback
callback.returnUrlstringOptionalURL after successful payment
callback.cancelUrlstringOptionalURL if the customer cancels
callback.webhookUrlstringOptionalWebhook URL for transaction notifications

Important

All payment API responses — including success, declined, failed, and validation errors — are returned encrypted when you are authenticated. The wire body is {"success": true|false, "payload": "<iv_hex>:<ciphertext_hex>"}. Decrypt payload with your Encryption Key to read the standard JSON documented below. Outer success mirrors the decrypted outcome (false for declines and errors). Do not share your Encryption Key or API key — keep both on your server only.

Wire format (from API)

{
  "success": true,
  "payload": "7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7:4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8"
}

After decryption

Success Response

200
{
  "success": true,
  "data": {
    "paymentLinkId": "LINK-20240101-ABC123",
    "paymentLink": "https://pay.payoflux.com/pay/LINK-20240101-ABC123",
    "merchantOrderId": "ORD-12345",
    "amount": 100.5,
    "currency": "USD",
    "expiresAt": "2024-01-02T12:00:00Z"
  }
}

Note

Share the paymentLink URL with your customer. The link expires after the specified expiresIn hours.

Get Payment Templates

GET/api/payment-templates
EncryptedAPI Key

Payload encryption required. Responses are returned as { "success": true, "payload": "<iv>:<ciphertext>" }. Decrypt payload on your server. Encryption guide →. Do not share your API key or Encryption Key with anyone.

Returns available payment link templates for customizing the payment page appearance.

Important

This endpoint has no request body. Responses are returned encrypted — decrypt the payload field using your Encryption Key. See the Encryption guide.

Important

All payment API responses — including success, declined, failed, and validation errors — are returned encrypted when you are authenticated. The wire body is {"success": true|false, "payload": "<iv_hex>:<ciphertext_hex>"}. Decrypt payload with your Encryption Key to read the standard JSON documented below. Outer success mirrors the decrypted outcome (false for declines and errors). Do not share your Encryption Key or API key — keep both on your server only.

Wire format (from API)

{
  "success": true,
  "payload": "7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7:4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8"
}

After decryption

Success Response

200
{
  "success": true,
  "data": {
    "templates": [
      {
        "id": "template-1",
        "name": "Default",
        "description": "Default payment template",
        "previewUrl": "https://pay.payoflux.com/templates/default"
      },
      {
        "id": "template-2",
        "name": "Minimal",
        "description": "Minimal payment template",
        "previewUrl": "https://pay.payoflux.com/templates/minimal"
      }
    ]
  }
}