# 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.

{% hint style="warning" icon="triangle-exclamation" %}
For **XRP transactions**, if you forget to include the **Destination Tag** or enter it incorrectly, your funds may be permanently lost.
{% endhint %}

## POST /payment/static-address

>

```json
{"openapi":"3.0.0","info":{"title":"Payments","version":"1.0.0"},"servers":[{"url":"https://api.oxapay.com/v1"}],"security":[],"paths":{"/payment/static-address":{"post":{"operationId":"generateStaticAddress","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["network"],"properties":{"network":{"type":"string","description":"The blockchain network on which the static address should be created."},"to_currency":{"type":"string","description":"The currency symbol of the cryptocurrency you want to convert to."},"auto_withdrawal":{"type":"number","format":"decimal","description":"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.","minimum":0,"maximum":1},"callback_url":{"type":"string","description":"The URL where payment information will be sent. Use this to receive notifications about payments made to the static address."},"email":{"type":"string","format":"email","description":"Provide the payer's email address for reporting purposes."},"order_id":{"type":"string","description":"Specify a unique order ID for reference in your system."},"description":{"type":"string","description":"Provide order details or any additional information that will be shown in different reports."}}}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"track_id":{"type":"string","description":"Unique identifier for each payment session in the OxaPay payment gateway. It can be used to query the payment status and generate reports."},"network":{"type":"string","description":"The blockchain network where the cryptocurrency payment is expected to be received (e.g., 'Bitcoin Network')."},"address":{"type":"string","description":"The generated cryptocurrency address where the payer should send the payment."},"memo":{"type":"string","description":"Additional memo, tag, or destination note required for some blockchain networks. Empty if not required."},"qr_code":{"type":"string","description":"URL to a QR code image containing the cryptocurrency address and payment amount for easier transactions."},"date":{"type":"integer","description":"Timestamp (UNIX epoch) indicating when the static payment address was created."}}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error"},"key":{"type":"string","description":"Key related to the error"},"message":{"type":"string","description":"Error message"}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors)."},"version":{"type":"string","description":"The version of the API being used."}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{}},"message":{"type":"string","description":"A message containing additional information about the result of the request."},"error":{"type":"object","description":"An object that provides details about any errors that occurred.","nullable":true,"properties":{"type":{"type":"string","description":"Type of the error"},"key":{"type":"string","description":"Key related to the error"},"message":{"type":"string","description":"Error message"}}},"status":{"type":"integer","description":"The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors)."},"version":{"type":"string","description":"The version of the API being used."}}}}}}},"tags":["Static-address"],"parameters":[{"in":"header","name":"merchant_api_key","required":true,"schema":{"type":"string"},"description":"Your Merchant API Key for authentication and authorization."},{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","default":"application/json"}}]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oxapay.com/api-reference/payment/generate-static-address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
