Generate White Label
This endpoint allows you to generate white-labeled payment solutions, delivering a fully branded payment experience powered by the OxaPay gateway. Instead of generating an invoice URL, this endpoint provides comprehensive payment details, including the payment address, currency, amount, expiration time, and other relevant information, enabling you to manage the payment process within your own interface.
Your Merchant API Key for authentication and authorization.
application/json
Specify the currency symbol if you want the invoice to be paid in a specific currency. Defines the currency in which you wish to receive your settlements.
The amount for the payment. If the currency field is not filled, the amount should be specified in dollars. If the currency
field is filled, the amount should correspond to the specified currency.
Specify the currency symbol if you want the invoice amount calculated with a specific currency. You can also generate invoices in fiat currencies.
The blockchain network on which the payment should be created. If not specified, the default network will be used.
Set the expiration time for the payment link in minutes.
60
Specify whether the payer will cover the invoice commission. 1 indicates that the payer will pay the fee, while 0 indicates that the merchant will pay the fee.
Merchant setting
Example: 1
Specify the acceptable inaccuracy in payment. Determines the maximum acceptable difference between the requested and paid amount.
Merchant setting
Example: 10
The currency symbol of the cryptocurrency you want to convert to. You only can convert paid crypto currencies to USDT.
1 indicates that the received currency will be sent to the address specified in your Address List on the Settings page and 0 indicates that the amount will be credited to your OxaPay balance.
The URL where payment information will be sent. Use this to receive notifications about the payment status.
Provide the payer's email address for reporting purposes.
Specify a unique order ID for reference in your system.
Provide order details or any additional information that will be shown in different reports.
Successful operation
Bad request
import requests
import json
url = 'https://api.oxapay.com/v1/payment/white-label'
headers = {
'merchant_api_key': 'YOUR_MERCHANT_API_KEY',
'Content-Type': 'application/json'
}
data = {
"amount": 100,
"currency": "USD",
"pay_currency": "TRX",
"network": "TRC20",
"lifetime": 60,
"fee_paid_by_payer": 1,
"under_paid_coverage": 20,
"to_currency": "USDT",
"auto_withdrawal": False,
"callback_url": "https://example.com/callback",
"email": "[email protected]",
"order_id": "ORD-12345",
"description": "Order #12345",
}
response = requests.post(url, data=json.dumps(data), headers=headers)
result = response.json()
print(result)
{
"data": {
"track_id": "197218291",
"amount": 1,
"currency": "usd",
"pay_amount": 3.6819352872888,
"pay_currency": "trx",
"network": "Tron Network",
"address": "TQraad2MBFgYUYhTFYeXS5jVpaLZuBwr3w",
"callback_url": "https://example.com/callback",
"description": "Order #12345",
"email": "[email protected]",
"fee_paid_by_payer": 1,
"lifetime": 60,
"order_id": "ORD-12345",
"under_paid_coverage": 20,
"rate": 3.67376929,
"qr_code": "https://api.qrserver.com/v1/create-qr-code/?data=tron:TQraad2MBFgYUYhTFYeXS5jVpaLZuBwr3w?amount=3&size=150x150",
"expired_at": 1734514150,
"date": 1734510550
},
"message": "Operation completed successfully!",
"error": {},
"status": 200,
"version": "1.0.0"
}
Last updated