POST /payment/white-label
Creates a white-label payment that returns a crypto address directly, without redirecting to a hosted page. Requires authentication.
Request
Section titled “Request”POST /payment/white-labelRequest Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
pay_currency | string | Yes | Cryptocurrency to receive |
amount | number | Yes | Payment amount |
currency | string | No | Price currency (defaults to pay_currency) |
network | string | No | Blockchain network |
lifetime | number | No | Payment lifetime in minutes |
fee_paid_by_payer | 0 | 1 | No | Whether the payer covers network fees |
under_paid_coverage | number | No | Percentage tolerance for underpayment |
to_currency | string | No | Auto-convert received funds to this currency |
callback_url | string | No | Webhook URL for payment updates |
email | string | No | Customer email |
order_id | string | No | Your internal order ID |
description | string | No | Payment description |
Example
Section titled “Example”curl -X POST https://api.nearpayments.io/oxapay/v1/payment/white-label \ -H "merchant_api_key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "pay_currency": "BTC", "amount": 0.001, "order_id": "wl-200", "callback_url": "https://example.com/webhook" }'Response
Section titled “Response”{ "data": { "track_id": "def456", "amount": 0.001, "currency": "BTC", "pay_amount": 0.001, "pay_currency": "BTC", "network": "BTC", "address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh", "callback_url": "https://example.com/webhook", "description": null, "email": null, "fee_paid_by_payer": 0, "lifetime": 60, "order_id": "wl-200", "under_paid_coverage": 0, "rate": 60000, "qr_code": "https://oxapay.com/qr/def456", "expired_at": 1700000000, "date": 1699996400 }, "message": "Operation completed successfully!", "error": {}, "status": 200, "version": "1.0.0"}