# Revoking Static Wallet

You can revoke a static wallet by providing the merchant API key and the address associated with the static wallet. This action will disable the static wallet and prevent any further transactions from being credited to the specified address.

<mark style="color:green;">`POST`</mark> `https://api.oxapay.com/merchants/revoke/staticaddress`

#### Request Body

<table><thead><tr><th width="136">Name</th><th width="100">Type</th><th width="515">Description</th></tr></thead><tbody><tr><td>merchant<mark style="color:red;">*</mark></td><td>String</td><td>Your merchant API key for authentication and authorization.</td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>The address of the static wallet you want to revoke.</td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK The response will contain the following fields:" %}

```json
{
    "result": integer, // The result code indicates the success or failure of the request.
    "message": string // A message providing additional information about the result.
}
```

{% endtab %}
{% endtabs %}

Now, you can proceed with integrating this functionality into your application using the provided endpoint, parameters, and response codes. If you encounter any issues or have questions, feel free to reach out to our support team for assistance.

Please note that a successful request will return a result code 100. In case of any issues or validation problems, refer to the corresponding [result codes](/legacy/api-reference/result-code-table.md) for further details.

### Example codes

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.oxapay.com/merchants/revoke/staticaddress \
  -d '{
    "merchant": "YOUR_MERCHANT_API_KEY",
    "address": "WALLET_ADDRESS_TO_REVOKE"
  }'
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$url = 'https://api.oxapay.com/merchants/revoke/staticaddress';

$data = array(
    'merchant' => 'YOUR_MERCHANT_API_KEY',
    'address' => 'WALLET_ADDRESS_TO_REVOKE'
);

$options = array(
    'http' => array(
        'header' => 'Content-Type: application/json',
        'method'  => 'POST',
        'content' => json_encode($data),
    ),
);

$context  = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$result = json_decode($response);
var_dump($result);
?>
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const axios = require('axios');
const url = 'https://api.oxapay.com/merchants/revoke/staticaddress';
const data = JSON.stringify({
    merchant: 'YOUR_MERCHANT_API_KEY',
    address: 'WALLET_ADDRESS_TO_REVOKE'
});

axios.post(url, data)
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error(error);
    });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = 'https://api.oxapay.com/merchants/revoke/staticaddress'
data = {
    'merchant': 'YOUR_MERCHANT_API_KEY',
    'address': 'WALLET_ADDRESS_TO_REVOKE'
}
response = requests.post(url, data=json.dumps(data))
result = response.json()
print(result)
```

{% endtab %}
{% endtabs %}

Please replace `YOUR_MERCHANT_API_KEY` with your actual merchant API key and `WALLET_ADDRESS_TO_REVOKE` with the address of the static wallet, you want to revoke. Each of these code snippets sends a POST request to the API endpoint with the specified parameters and checks the response to determine whether the revocation was successful or not.

<br>


---

# 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/legacy/api-reference/revoking-static-wallet.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.
