# Incentives

**URL:** https://heroiclabs.com/docs/hiro/typescript/incentives/
**Keywords:** incentives, hiro
**Categories:** hiro, typescript, incentives

---


# Incentives

Read more about the Incentive system in Hiro [here](../../concepts/incentives/).

## Sender incentives

### Listing sender incentives

You can list all sender incentives for the user.

```js
let incentivesList = await hiroClient.incentivesSenderList(session);
incentivesList.forEach(incentive => {
    // Iterate over the key-value pairs in the Claims object
    Object.entries(incentive.Claims).forEach(([key, value]) => {
        console.log(`${key} claimed at ${value.ClaimTimeSec}.`);
    });

    // Iterate over the UnclaimedRecipients array
    incentive.UnclaimedRecipients.forEach(userId => {
        console.log(`${userId} has not yet claimed.`);
    });
});
```

### Creating sender incentives

You can create a sender incentive for the user.

```js
let incentiveSenderCreateRequest : IncentiveSenderCreateRequest = {
    id: "coin-invite"
};
let result = await hiroClient.incentivesSenderCreate(session, incentiveSenderCreateRequest);
console.log(result.incentives[0].code); // <- code to send to another player!
```

### Claiming sender incentives

You can claim a sender incentive for the user.

```js
let incentiveSenderCreateRequest : IncentiveSenderClaimRequest = {
    code
};
let result = await hiroClient.incentivesSenderClaim(session, incentiveSenderCreateRequest);
```

### Deleting sender incentives

You can delete a sender incentive for the user.

```js
let incentiveSenderDeleteRequest : IncentiveSenderDeleteRequest = {
  code
};
let result = await hiroClient.incentivesSenderDelete(session, incentiveSenderDeleteRequest);
```

## Recipient incentives

### Getting recipient incentives

You can get a recipient incentive for the user.

```js
let incentiveSenderCreateRequest : IncentivesRecipientGetRequest = {
    code
};
let result = await hiroClient.incentivesRecipientGet(session, incentiveSenderCreateRequest);
```

### Claiming 

You can claim a reciever incentive for the user.

```js
let incentivesRecipientClaimRequest : IncentiveRecipientClaimRequest = {
    code
};
let result = await hiroClient.incentivesRecipientClaim(session, incentivesRecipientClaimRequest);
console.log(result.reward);
```