# Demo: A gift sent by email, Slack or post: Greeting card by post

> A company orders a year-end card for each client: Charitips prints and posts it with a 25 € gift, and the client picks the charity online. The sender pays.

One variant of **A gift sent by email, Slack or post**, in Professional services: A year-end card with a 25 € gift, posted to each client.

A made-up site, app.your-crm.example, walked through screen by screen with the Charitips API calls the product makes at each step. Rebuild it in your own project to start from a working flow.

The charity choice in this demo is the Charitips [charity selection widget](https://www.charitips.com/docs/widgets/charity_selection.md), a ready-made proposal. Use it whole, use parts of it, or build your own experience from scratch with the API: [List charities](https://www.charitips.com/docs/api-reference/list-charities.md) gives the charities to show, and the calls below carry the chosen `charityId`.

Charitips widget: the charity cards, their profiles and the thank-you card. Your own UI, built with the API: the back-office screen that orders the card; Charitips prints and posts it and hosts the page where the gift is claimed.

The full guide, with edge cases: https://www.charitips.com/docs/use-cases/delivered-gift.md.

**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": "Year-end cards",
    "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": "Year-end cards",
    "charitiesSelectionId": "<charitiesSelectionId>",
    "type": "PERMANENT",
    "amountType": "FREE_AMOUNT",
    "sendingMode": "POSTAL",
    "momentSlug": "cadeau-client-fin-d-annee"
  }
  ```
- [`POST /v1/campaigns/{campaignId}/activate`](https://www.charitips.com/docs/api-reference/activate-campaign.md) Activate a campaign: once: the campaign starts taking donations

## Screens and calls

### 1. When the card is scheduled

- Button: Post Camille's card

**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": 2500,
    "uniqueExternalId": "year_end_card_2026_client_0412",
    "externalId": "client_contact_0412",
    "donor": {
      "firstName": "Camille",
      "lastName": "Martin",
      "companyName": "Architects' office",
      "street": "12 rue des Lilas",
      "zip": "69003",
      "city": "Lyon",
      "country": "FR"
    },
    "sendingDate": "2026-12-14"
  }
  ```

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

### 2. At the posting batch

- Button: Run the 16:00 batch

No call: this screen only shows the result.

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

### 3. On the choice, on the Charitips page

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

No call: this screen only shows the result.

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

## Clone it with a coding agent

```prompt
Clone the Charitips demo "A gift sent by email, Slack or post: Greeting card by post" into this project. Read https://www.charitips.com/docs/demos/delivered/posted-card.md: it lists each screen and the Charitips API calls behind it. Build the same flow in this codebase, on the sandbox (https://api.sandbox.charitips.com), with my client id and secret read from environment variables, and follow the rules of https://www.charitips.com/docs/skill.md. Make every API call from the server, never from the browser. When it works, show me each call and its response.
```
