---
title: "Game levels: donations with the Charitips API"
description: "In a game, each level gained adds 0,05 € to the day's pot, paid by the studio."
canonical: https://www.charitips.com/docs/use-cases/progress-and-tiers/game-levels
---

# Game levels: donations with the Charitips API

> In a game, each level gained adds 0,05 € to the day's pot, paid by the studio. At midnight, the server sends the day's pot as one donation to the charity the player chose.

- **Use case**: [Progress and tiers](https://www.charitips.com/docs/use-cases/progress-and-tiers.md)
- **Sector**: Software and apps
- **Who pays**: Your company
- **What starts the donation**: A customer action
- **Example**: 0,05 € per level, sent daily
- **Works in**: Mobile games, Console games, PC games, Browser games, Casual games, Hyper-casual games, Hybrid-casual games, Mid-core games, Hardcore games, Idle and incremental games, Puzzle games, Match-3 games, Word games, Trivia games, Arcade games, Platformers, Action games, Adventure games, Role-playing games (RPGs), MMOs, Strategy and 4X games, Tower defense games, Simulation and tycoon games, Sports games, Racing games, Shooters, Battle royale games, Rhythm and music games, Educational games, Fitness games and exergames
- **Calls**: [`POST /v1/charities-selections`](https://www.charitips.com/docs/api-reference/create-charities-selection.md), [`POST /v1/campaigns`](https://www.charitips.com/docs/api-reference/create-campaign.md), [`POST /v1/campaigns/{campaignId}/activate`](https://www.charitips.com/docs/api-reference/activate-campaign.md), [`POST /v1/donations`](https://www.charitips.com/docs/api-reference/create-donation.md), [`POST /v1/donations/{donationId}/claim`](https://www.charitips.com/docs/api-reference/claim-donation.md)
- **Webhooks**: `donation_create`, `donation_update`

Interactive demo on the page. The same flow as a build spec: https://www.charitips.com/docs/demos/progress/game-levels.md

## How it works

The screens of the demo in order, with the calls your server makes at each one.

### Once, before the first customer

- [`POST /v1/charities-selections`](https://www.charitips.com/docs/api-reference/create-charities-selection.md) Create a charities selection: once: the charities you offer, from the catalog

  ```json
  {
    "name": "Your game",
    "charityIds": [
      "<charityId>"
    ]
  }
  ```
- [`POST /v1/campaigns`](https://www.charitips.com/docs/api-reference/create-campaign.md) Create a campaign: once: the campaign the donations go to

  ```json
  {
    "name": "Your game",
    "charitiesSelectionId": "<charitiesSelectionId>",
    "type": "PERMANENT",
    "amountType": "FREE_AMOUNT"
  }
  ```
- [`POST /v1/campaigns/{campaignId}/activate`](https://www.charitips.com/docs/api-reference/activate-campaign.md) Activate a campaign: once: the campaign starts taking donations

### 1. At each level gained

- Button: Finish the quest

No call: this screen only shows the result.

### 2. At midnight

- Button: Skip to midnight

**Your server calls:**

- [`POST /v1/donations`](https://www.charitips.com/docs/api-reference/create-donation.md) Create a donation: from your server, when it happens; amount in cents

  ```json
  {
    "campaignId": "<campaignId>",
    "amount": 35,
    "uniqueExternalId": "levels_5521_day_284",
    "externalId": "player_5521"
  }
  ```

Charitips then sends the `donation_create` webhook to your endpoint.

### 3. When the charity is chosen

- The customer picks a charity from your selection.
- Button: Choose the charity

**Your server calls:**

- [`POST /v1/donations/{donationId}/claim`](https://www.charitips.com/docs/api-reference/claim-donation.md) Claim a donation: donationId from the create-donation response

  ```json
  {
    "charityId": "<charityId>"
  }
  ```

Charitips then sends the `donation_update` webhook to your endpoint.

### 4. The next day at midnight

- Button: Skip to midnight

**Your server calls:**

- [`POST /v1/donations`](https://www.charitips.com/docs/api-reference/create-donation.md) Create a donation: from your server, when it happens; amount in cents

  ```json
  {
    "campaignId": "<campaignId>",
    "amount": 25,
    "uniqueExternalId": "levels_5521_day_285",
    "externalId": "player_5521",
    "charityId": "<charityId>"
  }
  ```

Charitips then sends the `donation_create` webhook to your endpoint.

## Other ways to run it

- [10 000 steps a day](https://www.charitips.com/docs/use-cases/progress-and-tiers/daily-steps.md) (Banking and insurance): 0,10 € per day at 10 000 steps, sent monthly
- [Gym check-ins](https://www.charitips.com/docs/use-cases/progress-and-tiers/gym-check-ins.md) (Health and sport): 0,50 € per check-in, sent monthly
- [Course modules completed](https://www.charitips.com/docs/use-cases/progress-and-tiers/course-modules.md) (Education): 0,10 €, then 0,20 € and up per module, plus 5 € at the end
- [E-learning path](https://www.charitips.com/docs/use-cases/progress-and-tiers/learning-path.md) (Education): 0,20 € per step completed
- [Onboarding milestones](https://www.charitips.com/docs/use-cases/progress-and-tiers/onboarding-milestones.md) (Software and apps): 0,20 € to 1 € per milestone reached
- [Savings tiers](https://www.charitips.com/docs/use-cases/progress-and-tiers/savings-tiers.md) (Banking and insurance): 5 € for each 1 000 € saved
- [Weekly health goal](https://www.charitips.com/docs/use-cases/progress-and-tiers/weekly-goal.md) (Software and apps): 1 € per weekly goal met
- [Follow-up visits on time](https://www.charitips.com/docs/use-cases/progress-and-tiers/follow-up-visits.md) (Health and sport): 1 € or 2 € per visit kept on time
- [Game milestones for a chosen charity](https://www.charitips.com/docs/use-cases/progress-and-tiers/game-milestones.md) (Software and apps): 0,25 € every 20 levels for the charity picked before playing, paid by the studio
- [Full guide: edge cases, webhooks, receipts](https://www.charitips.com/docs/use-cases/progress-and-tiers.md)
- [All use cases](https://www.charitips.com/docs/use-cases.md)
