# Incentives

**URL:** https://heroiclabs.com/docs/hiro/dart/incentives/
**Keywords:** incentives, hiro
**Categories:** hiro, dart, 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.

```dart
var incentivesList = await hiro.incentivesSenderList(session!);
for (var incentive in incentivesList) {
  // Iterate over the key-value pairs in the Claims object
  for (var key in incentive.Claims.keys) {
    var value = incentive.Claims[key];
    print("$key claimed at ${value.ClaimTimeSec}.");
  }

  // Iterate over the UnclaimedRecipients array
  for (var userId in incentive.UnclaimedRecipients) {
    print("$userId has not yet claimed.");
  }
}
```

### Creating sender incentives

You can create a sender incentive for the user.

```dart
var incentive_sender_create_request = IncentiveSenderCreateRequest();
incentive_sender_create_request.id = "coin-invite";

var result = await hiro.incentivesSenderCreate(session!, incentive_sender_create_request);
print(result.incentives[0].code); // <- code to send to another player!;
```

### Claiming sender incentives

You can claim a sender incentive for the user.

```dart
var incentive_sender_claim_request = IncentiveSenderClaimRequest();
incentive_sender_claim_request.code = code;

var result = await hiro.incentivesSenderClaim(session!, incentive_sender_claim_request);
```

### Deleting sender incentives

You can delete a sender incentive for the user.

```dart
var incentive_sender_delete_request = IncentiveSenderDeleteRequest();
incentive_sender_delete_request.code = code;

var result = await hiro.incentivesSenderDelete(session!, incentive_sender_delete_request);
```

## Recipient incentives

### Getting recipient incentives

You can get a recipient incentive for the user.

```dart
var incentives_recipient_get_request = IncentivesRecipientGetRequest();
incentives_recipient_get_request.code = code;

var result = await hiro.incentivesRecipientGet(session!, incentives_recipient_get_request);
```

### Claiming 

You can claim a receiver incentive for the user.

```dart
var incentives_recipient_claim_request = IncentiveRecipientClaimRequest();
incentives_recipient_claim_request.code = code;

var result = await hiro.incentivesRecipientClaim(session!, incentives_recipient_claim_request);
print(result.reward);
```