Generate Static Address

This endpoint allows you to generate a static address for a specific currency and network. The static address will be linked to a unique track_id, and if a callback_url is provided, your server will receive notifications for any payments made to the address. This enables you to track and receive transactions to the static address, regardless of the amount or timing.

Please note that static addresses with no transactions for six months will be revoked.

post
Header parameters
merchant_api_keystringRequired

Your Merchant API Key for authentication and authorization.

Content-TypestringRequiredDefault: application/json
Body
networkstringRequired

The blockchain network on which the static address should be created.

to_currencystringOptional

The currency symbol of the cryptocurrency you want to convert to.

auto_withdrawalnumber · decimal · max: 1Optional

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.

callback_urlstringOptional

The URL where payment information will be sent. Use this to receive notifications about payments made to the static address.

emailstring · emailOptional

Provide the payer's email address for reporting purposes.

order_idstringOptional

Specify a unique order ID for reference in your system.

descriptionstringOptional

Provide order details or any additional information that will be shown in different reports.

Responses
200

Successful operation

application/json
post
import requests
import json

url = 'https://api.oxapay.com/v1/payment/static-address'

headers = {
    'merchant_api_key': 'YOUR_MERCHANT_API_KEY',
    'Content-Type': 'application/json'
}

data = {
    "network": "TRON",
    "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": {
    "network": "TRON",
    "to_currency": "USDT",
    "auto_withdrawal": false,
    "callback_url": "https://example.com/callback",
    "email": "[email protected]",
    "order_id": "ORD-12345",
    "description": "Order #12345"
  },
  "message": "Operation completed successfully!",
  "error": {},
  "status": 200,
  "version": "1.0.0"
}

Last updated