Crypto Payments API
Accept cryptocurrency payments, create crypto payment links, and process crypto exchanges.
Crypto Payment Link (Production)
/api/live/crypto/payment-linkPayload 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 crypto payment link with wallet address and QR code for customers to send cryptocurrency.
Important
{"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"
},
"crypto": {
"currency": "BTC"
},
"callback": {
"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).
| Field | Type | Required | Description |
|---|---|---|---|
| Order | |||
| merchantOrderId | string | Required | Unique order identifier |
| merchantProfileId | number | Optional | Merchant profile ID. Defaults to PRIMARY if omitted |
| description | string | Optional | Payment description |
| metadata | string | Optional | Additional data as a JSON string |
| Paymentpayment | |||
| payment.amount | number | Required | Fiat payment amount (minimum 0.01) |
| payment.currency | string | Required | Fiat currency code (3 letters) |
| Cryptocrypto | |||
| crypto.currency | string | Optional | Cryptocurrency code (BTC, ETH, etc.) |
| crypto.walletAddress | string | Optional | Destination wallet address for the payment |
| Callbackcallback | |||
| callback.webhookUrl | string | Optional | Webhook URL for transaction notifications |
| callback.returnUrl | string | Optional | URL to redirect after payment |
Important
{"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": "CRYPTO-LINK-20240101-ABC123",
"paymentLink": "https://pay.payoflux.com/crypto/CRYPTO-LINK-20240101-ABC123",
"walletAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"qrCode": "https://pay.payoflux.com/qr/CRYPTO-LINK-20240101-ABC123",
"cryptoAmount": 0.0025,
"cryptoCurrency": "BTC",
"amount": 100.5,
"currency": "USD"
}
}Note
paymentLink or qrCode with your customer. They can send cryptocurrency to the provided walletAddress to complete the payment.Crypto Exchange/On-Ramp (Production)
/api/live/cryptoPayload 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.
Processes crypto exchange or on-ramp transaction. Uses the same nested request body as the payment link endpoint above.
Important
{"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"
},
"crypto": {
"currency": "BTC"
},
"callback": {
"webhookUrl": "https://your-domain.com/webhook"
}
}Wire format (send this to the API)
Encrypted request body
{
"payload": "3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a:8e4f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0"
}Crypto Exchange (Sandbox)
/api/test/cryptoPayload 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.
Processes crypto exchange in sandbox mode for testing.
Same request body as production endpoint.
Important
{"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"
},
"crypto": {
"currency": "BTC"
},
"callback": {
"webhookUrl": "https://your-domain.com/webhook"
}
}Wire format (send this to the API)
Encrypted request body
{
"payload": "3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a:8e4f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0"
}Crypto Payin (Production)
/api/live/crypto/payinPayload 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.
Processes crypto payin transaction.
Important
{"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"
},
"crypto": {
"currency": "BTC"
},
"callback": {
"webhookUrl": "https://your-domain.com/webhook"
}
}Wire format (send this to the API)
Encrypted request body
{
"payload": "3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a:8e4f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0"
}Crypto Payin (Sandbox)
/api/test/crypto/payinPayload 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.
Processes crypto payin in sandbox mode for testing.
Same request body as production endpoint.
Important
{"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"
},
"crypto": {
"currency": "BTC"
},
"callback": {
"webhookUrl": "https://your-domain.com/webhook"
}
}Wire format (send this to the API)
Encrypted request body
{
"payload": "3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a:8e4f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0"
}Get Crypto Currencies
/api/live/crypto/currenciesPayload 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 list of supported cryptocurrencies.
Important
payload field using your Encryption Key. See the Encryption guide.Important
{"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": {
"currencies": [
{
"code": "BTC",
"name": "Bitcoin",
"symbol": "₿",
"minAmount": 0.0001
},
{
"code": "ETH",
"name": "Ethereum",
"symbol": "Ξ",
"minAmount": 0.001
}
]
}
}