---
title: "Unused gift card balance"
description: "Let card holders give what is left on a gift card to a charity, or redistribute the value of expired cards."
canonical: https://www.charitips.com/docs/use-cases/gift-card-balance
---

# Unused gift card balance

> Let card holders give what is left on a gift card to a charity, or redistribute the value of expired cards.

This use case is one variant of **Loyalty points turned into donations**: https://www.charitips.com/docs/use-cases/loyalty-points.md
- **Who pays**: Your company
- **Starts with**: A customer action
- **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/gift-cards.md

**This demo is one example**: Remaining balance given by the holder. The same flow also covers:

- [Expired cards redistributed](https://www.charitips.com/docs/use-cases/gift-card-balance.md#redistribute-expired-cards): Once a month, the value of expired cards goes to charities you choose, without asking anyone.
- [A gift card that is a donation](https://www.charitips.com/docs/use-cases/delivered-gift/card-gift.md): The card itself is a donation: the person who receives it picks the charity on a Charitips page.
- [The person who receives it tops up](https://www.charitips.com/docs/use-cases/donation-matching.md#or-let-them-top-up-your-gift): After choosing the charity, the beneficiary adds their own money to your donation.

## 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`

### Set up the campaign

Once, set up a campaign as in [steps 3 to 5 of Your first donation](https://www.charitips.com/docs/get-started/first-donation.md#3-pick-your-charities): a charities selection, a campaign created with its `charitiesSelectionId`, then activated. Both ways below use it.

### Offer to give the balance

On the card's balance page, keeping the balance stays the default. For a small balance or a card about to expire, suggest giving it. The holder picks the charity first, then confirms once.

### Give the remaining balance

Create one donation for the balance with the chosen `charityId` and the card id as `uniqueExternalId`, then set the card to zero in your system. With `charityId`, the donation is assigned at once, with no separate claim. Your store funds the donation and gets the fiscal receipt.

```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": 340,
    "charityId": "<charityId>",
    "uniqueExternalId": "card_5521"
  }'
```

### Redistribute expired cards

Once a month, sum the balances of the cards that expired and give the total to a campaign of your choice. Use the period as `uniqueExternalId`, for example `expired_2026_10`, so the batch never runs twice.

```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": 128450,
    "uniqueExternalId": "expired_2026_10"
  }'
```

## Edge cases

- **The holder makes no choice.** Nothing is created and the card keeps its balance. Once it expires, its balance joins the monthly redistribution.
- **Setting the card to zero fails.** Delete the donation, then show the error. Deleting works until the donation is billed.
- **Accounting.** Each donation is billed to you; keep `uniqueExternalId` to match each donation with its card.

## Related pages

- [Donation lifecycle](https://www.charitips.com/docs/concepts/donation-lifecycle.md)
- [Billing and fiscal receipts](https://www.charitips.com/docs/concepts/billing-and-receipts.md)
- [Donation matching](https://www.charitips.com/docs/use-cases/donation-matching.md)
