---
title: "The tournament winner picks: donations with the Charitips API"
description: "An e-sport league puts 2 € per entry into a charity pot. An interactive demo of the Charitips donation API, with its calls."
canonical: https://www.charitips.com/docs/use-cases/vote-on-a-budget/tournament-winner
---

# The tournament winner picks: donations with the Charitips API

> An e-sport league puts 2 € per entry into a charity pot. Players sign up and compete; the tournament winner picks the charity the whole pot goes to; the league pays.

- **Use case**: [Customers vote on a budget](https://www.charitips.com/docs/use-cases/vote-on-a-budget.md)
- **Sector**: Software and apps
- **Who pays**: Your company
- **What starts the donation**: A customer action
- **Example**: 2 € per entry, the winner picks the charity
- **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/vote/tournament-winner.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": "Autumn charity cup",
    "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": "Autumn charity cup",
    "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 sign-up

- Button: Sign up for 10 €

No call: this screen only shows the result.

### 2. At the end of the tournament

- Button: Play the final

**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": 25600,
    "uniqueExternalId": "tournament_2026_autumn_cup",
    "externalId": "player_camille"
  }
  ```

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

### 3. When the winner chooses

- 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.

## Other ways to run it

- [Customers vote on a budget](https://www.charitips.com/docs/use-cases/vote-on-a-budget/budget-vote.md) (Retail): A yearly budget split by the votes
- [Visitors vote at an exhibition](https://www.charitips.com/docs/use-cases/vote-on-a-budget/exhibition-ballot.md) (Culture and events): 1 € per ticket, split by the votes
- [Collective adoption goal](https://www.charitips.com/docs/use-cases/vote-on-a-budget/adoption-goal.md) (Software and apps): 0,50 € per user, paid once the goal is reached
- [Poll after a webinar](https://www.charitips.com/docs/use-cases/vote-on-a-budget/webinar-poll.md) (Education): 5 % of each ticket, the attendees choose
- [Full guide: edge cases, webhooks, receipts](https://www.charitips.com/docs/use-cases/vote-on-a-budget.md)
- [All use cases](https://www.charitips.com/docs/use-cases.md)
