> For the complete documentation index, see [llms.txt](https://docs-tron.en.tronify.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-tron.en.tronify.io/stakepal-api/claim-revenue.md).

# Claim Revenue

### Endpoint usage

<mark style="color:green;">`POST`</mark> `https://open.tronify.io/api/staking/claimReward`

The fields with \* are required, and the fields without \* are optional

#### **Headers**

| Name                                           | Type   | Description                               |
| ---------------------------------------------- | ------ | ----------------------------------------- |
| api-key<mark style="color:red;">\*</mark>      | String | `user.apiKey` returned by the "Login" API |
| access-token<mark style="color:red;">\*</mark> | String | `token` returned by the "Login" API       |

#### Request Body

| Name                                         | Type   | Description         |
| -------------------------------------------- | ------ | ------------------- |
| address<mark style="color:red;">\*</mark>    | String | User wallet address |
| sourceFlag<mark style="color:red;">\*</mark> | String | Source identifier   |
| stakingId<mark style="color:red;">\*</mark>  | String | Record ID           |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "resCode": 100,
    "resMsg": "Success",
    "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### code example

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

```
// example
const params = {
    "address": "Txxxxxxxxxxxxxxxxx",
    "sourceFlag": "tronify",
    "stakingId": "1"
}
 const res = await axios.post('https://open.tronify.io/api/staking/claimReward',params)
 console.log(res)
 if(res.resCode === '100'){
   //...  
 }
```

{% endtab %}
{% endtabs %}

### Postman example

<figure><img src="https://3188465811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fnv0Qbx2yTtH3TKQFd528%2Fuploads%2Fa7rH5xxgifE0GDr9ea03%2Fimage.png?alt=media&amp;token=734978fd-b905-4896-9619-1e43baf14d25" alt=""><figcaption></figcaption></figure>
