---
title: "Giving for business customers: donations with the Charitips API"
description: "A SaaS offers giving to its business customers: each gets its own Charitips account, campaign and dashboard, created and billed by the SaaS or by them."
canonical: https://www.charitips.com/docs/use-cases/account-hierarchy/business-customers
---

# Giving for business customers: donations with the Charitips API

> A SaaS offers giving to its business customers: each gets its own Charitips account, campaign and dashboard, created and billed by the SaaS or by them.

- **Use case**: [Donations for your business customers](https://www.charitips.com/docs/use-cases/account-hierarchy.md)
- **Sector**: Software and apps
- **Who pays**: Your business customers (child accounts)
- **What starts the donation**: Each business customer's own campaigns
- **Example**: Each business customer runs its own campaigns
- **Calls**: [`POST /v1/accounts/{accountId}/child-accounts`](https://www.charitips.com/docs/api-reference/create-child-account.md), [`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/accounts/{accountId}/billing-link`](https://www.charitips.com/docs/api-reference/create-shareable-billing-link.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), [`GET /v1/users`](https://www.charitips.com/docs/api-reference/list-users.md), [`POST /v1/authentication/magic-links/users/{userId}`](https://www.charitips.com/docs/api-reference/create-user-magic-link.md)
- **Webhooks**: `campaign_create`, `campaign_update`, `donation_create`, `donation_update`

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

## How it works

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

### 1. Turn on giving for your team

Your platform creates the customer's own Charitips account, its selection and its campaign from the details it already has, then a link to the Charitips billing page of that account.

- Company: Blue Fern Studio
- Billing address: Lyon, France
- The customer picks a charity from your selection.
- Button: Turn on giving

**Your server calls:**

- [`POST /v1/accounts/{accountId}/child-accounts`](https://www.charitips.com/docs/api-reference/create-child-account.md) Create a child account: your accountId in the path; returns the customer's accountId, to store on your side

  ```json
  {
    "name": "Blue Fern Studio",
    "firstName": "Jules",
    "lastName": "Bernard",
    "email": "jules@bluefern.example",
    "legalRegistrationNumber": "832145678",
    "street": "8 quai Saint-Vincent",
    "zip": "69001",
    "city": "Lyon",
    "country": "FR"
  }
  ```
- [`POST /v1/charities-selections`](https://www.charitips.com/docs/api-reference/create-charities-selection.md) Create a charities selection: the charities the admin ticked, on the customer's account

  ```json
  {
    "name": "Team charities",
    "accountId": "<customerAccountId>",
    "charityIds": [
      "<charityId>"
    ]
  }
  ```
- [`POST /v1/campaigns`](https://www.charitips.com/docs/api-reference/create-campaign.md) Create a campaign: on the customer's account; claimed donations are billed monthly

  ```json
  {
    "name": "Team kudos",
    "accountId": "<customerAccountId>",
    "charitiesSelectionId": "<charitiesSelectionId>"
  }
  ```
- [`POST /v1/accounts/{accountId}/billing-link`](https://www.charitips.com/docs/api-reference/create-shareable-billing-link.md) Create a shareable billing link: the customer's accountId in the path; a link to their Charitips billing page

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

### 2. Send the billing link to whoever pays

The admin forwards the Charitips billing link to whoever pays, who saves a card or a SEPA mandate. The paymentmethod_create webhook tells your server, which activates the campaign and updates the page; your platform reminds the payer after three days.

- Button: Card saved

**Your server calls:**

- [`POST /v1/campaigns/{campaignId}/activate`](https://www.charitips.com/docs/api-reference/activate-campaign.md) Activate a campaign: the customer's campaign, once paymentmethod_create arrives for their account

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

### 3. Thank a colleague with 10 €

The sender writes the kudos and picks the amount, within the monthly budget your platform enforces per person. The donation goes out without a charity: the colleague who is thanked chooses it.

- Button: Send kudos with 10 €

**Your server calls:**

- [`POST /v1/donations`](https://www.charitips.com/docs/api-reference/create-donation.md) Create a donation: on the customer's campaign, without charityId: the colleague chooses; amount in cents

  ```json
  {
    "campaignId": "<campaignId>",
    "amount": 1000,
    "uniqueExternalId": "kudos_5120",
    "externalId": "user_nora"
  }
  ```

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

### 4. Nora chooses where the 10 € go

The thanked colleague opens the kudos and picks the charity: two people engaged by one kudos. Without a choice, the donation still goes to one of the team's charities.

- The customer picks a charity from your selection.
- Button: Give 10 €

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

### 5. Your giving dashboard

The admin lands in the Charitips dashboard of their own account, signed in by the link. Creating the child account also created a dashboard user for its contact, so your server only reads that user's id.

- Button: Open the giving dashboard

**Your server calls:**

- [`GET /v1/users`](https://www.charitips.com/docs/api-reference/list-users.md) List users: once: accountId=<customerAccountId> in the query; the user created with the account, store its userId
- [`POST /v1/authentication/magic-links/users/{userId}`](https://www.charitips.com/docs/api-reference/create-user-magic-link.md) Create a user magic link: userId in the path; redirect the admin to the returned link

## Other ways to run it

- [Full guide: edge cases, webhooks, receipts](https://www.charitips.com/docs/use-cases/account-hierarchy.md)
- [All use cases](https://www.charitips.com/docs/use-cases.md)
