---
title: "Card cashback as a donation"
description: "Give a share of card spending to the charity each customer chose, with the calls a bank or a card program makes."
canonical: https://www.charitips.com/docs/use-cases/card-cashback
---

# Card cashback as a donation

> Give a share of card spending to the charity each customer chose, with the calls a bank or a card program makes.

This use case is one variant of **A saved choice, a periodic statement**: https://www.charitips.com/docs/use-cases/periodic-statement.md
- **Who pays**: Your company
- **Starts with**: Every period
- **Tax receipt**: In your company's name
- Needs [API access](https://www.charitips.com/docs/overview/plans.md#api-access-for-webhooks-and-credentials) on a validated account. [Plans](https://www.charitips.com/docs/overview/plans.md#what-every-flow-needs)

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

**This demo is one example**: 1 % of card spending each month. The same flow also covers:

- [A bonus for moving a salary](https://www.charitips.com/docs/use-cases/achievement.md): A bank gives a donation when a customer has their income paid into it.
- [A share of the average balance](https://www.charitips.com/docs/use-cases/periodic-statement.md): Once a year, a share of each customer's average balance goes to their charity.
- [Savings and investment products](https://www.charitips.com/docs/use-cases/periodic-statement/card-fee-share.md): A savings account or a fund gives part of its fees or interest to the charity each customer chose.

## Build it
- **Calls**: [`create-charities-selection`](https://www.charitips.com/docs/api-reference/create-charities-selection.md), [`create-campaign`](https://www.charitips.com/docs/api-reference/create-campaign.md), [`activate-campaign`](https://www.charitips.com/docs/api-reference/activate-campaign.md), [`create-donation`](https://www.charitips.com/docs/api-reference/create-donation.md), [`claim-donation`](https://www.charitips.com/docs/api-reference/claim-donation.md)
- **Webhooks**: `donation_create`, `donation_update`

### Create the campaign

Once, create a charities selection, create the campaign with its `charitiesSelectionId`, then activate it, as in [steps 3 to 5 of Your first donation](https://www.charitips.com/docs/get-started/first-donation.md#3-pick-your-charities).

```bash
curl -X POST https://api.sandbox.charitips.com/v1/campaigns \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Card cashback",
    "charitiesSelectionId": "<charitiesSelectionId>"
  }'
```

### Let each customer pick a charity

In your app, show the charities of the selection and let each customer pick one. Store the `charityId` with the customer on your side.

```bash
curl "https://api.sandbox.charitips.com/v1/charities-selections/<charitiesSelectionId>?includeCharities=true" \
  -H "Authorization: Bearer $CHARITIPS_TOKEN"
```

### Give the cashback each period

At the end of each period, compute the cashback per customer and create one donation each. With the saved `charityId`, the donation is linked to the charity at once; on a campaign that validates its donations, it then waits for the validation. When the customer has no charity yet, leave `charityId` out: the donation waits for their choice.

```bash
curl -X POST https://api.sandbox.charitips.com/v1/donations \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "<campaignId>",
    "amount": 412,
    "uniqueExternalId": "cashback_2026_10_customer_7781",
    "externalId": "customer_7781",
    "charityId": "<charityId>"
  }'
```

### Claim it when the customer picks

When a customer picks a charity for a waiting donation, claim it with that charity. Save the charity for the next periods.

```bash
curl -X POST https://api.sandbox.charitips.com/v1/donations/<donationId>/claim \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "charityId": "<charityId>"
  }'
```

## Edge cases

- **A customer never chooses.** The waiting donation is assigned automatically when it expires or when the campaign closes (with `fiscalReceiptType: SINGLE_DONATION`, only when it closes): none is lost.
- **Fiscal receipts.** You fund these donations, so the receipt goes to your account: yearly receipts by default (`fiscalReceiptType: YEARLY`), or, when the campaign is created with `fiscalReceiptType: SINGLE_DONATION`, one per charity once the campaign is closed and paid. Read them with [List fiscal receipts](https://www.charitips.com/docs/api-reference/list-fiscal-receipts.md).

## Related pages

- [Billing and fiscal receipts](https://www.charitips.com/docs/concepts/billing-and-receipts.md)
- [Donation lifecycle](https://www.charitips.com/docs/concepts/donation-lifecycle.md)
- [Charities and selections](https://www.charitips.com/docs/concepts/charities.md)
