Skip to content
Aller au contenu
Charitips

Use cases · Commerce

Loyalty points turned into donations

Let customers spend their points on a cause instead of a discount.

  • Who paysYour company
  • Starts withA customer action
  • Tax receiptIn your company's name

Needs API access on a validated account. Plans

Device
Charities shown as
Outline widget
your-store.example/rewards

your-store.example/rewards

Step by step

Click through the site. Each step shows what your customer does, what your server sends and what Charitips answers.

  1. 1Points given

    To come

    Your customer does…

    Clicks “Give 500 points to the charity”.

    Your server sends…

    Creates a 5 € donation for redemption #3318 on the campaign “Points for charities”, for the charity your customer picks.

    POSTcreate-donation

    Charitips answers…

    Charitips records the donation and returns its id: it goes to the charity your customer picks at once.

    Charitips will then tell your server the donation was created.

How to read this demo: the site shows what your customer does, and the panel what your server sends and what Charitips answers, step by step.

Build spec

The site is made up and nothing is sent. The endpoints, fields and webhook events are the real ones, and so are the charities.

This demo is one example. 100 points for 1 €: that is the case the demo plays. The same flow also covers:

One flow, 7 variants

Each card is this flow in another sector or use case. Pick one: the demo above plays it, with its site, its amounts and its charities. The API calls stay the same.

RetailStore loyalty pointsA store lets customers spend loyalty points on a charity at the voucher rate, 100 points for 1 €. The customer picks the charity and the points; the store funds the donation.100 points for 1 €Open its page
RetailUnused gift card balanceWhen a gift card keeps a small balance or is about to expire, the store suggests giving it. The holder picks the charity, the card drops to zero and the store funds the donation.The remaining balance, given by the holderOpen its page
Travel and mobilityTravel loyalty pointsA travel company lets members give expiring loyalty points at the same rate as flights, 100 points for 5 €. The member picks the charity; the company pays, tier progress stays.100 points for 5 €Open its page
Culture and eventsCultural member cardA museum's membership card lets members give points about to expire, 100 points for 1 €, to an art or heritage charity. The museum pays; the visit count does not change.100 points for 1 €Open its page
Software and appsIn-game currencyA game lets players convert in-game gems into a real donation at a fixed rate. The player picks the charity; the studio pays, and level, items and season pass stay untouched.Virtual currency at a fixed rateOpen its page
Culture and eventsSolidarity items in an in-game shopIn a game's shop, some items are tied to a charity. When the player buys one with gems earned in play, the studio gives 1 € or 2 € for it; the player never pays.1 € or 2 € from the studio for each solidarity item boughtOpen its page
Professional servicesEmployee solidarity voucherAn employer funds a 60 € solidarity voucher for each employee. In the benefits portal, the employee gives all or part of it to the charity they pick; the rest stays for later.A 60 € voucher funded by the employer, given all or partOpen its page

Build it

The calls behind the demo, in order. Each step shows the request your server sends.

  1. Set up the rewards campaign

    Once, set up a campaign as in steps 3 to 5 of Your first donation: a charities selection with the charities you offer as rewards, a campaign created with its charitiesSelectionId, then activated.

  2. Add the reward to your program

    Add a reward to your loyalty program that converts points into a donation, at a rate you set. Your users only see your points: the API takes the converted amount in cents (see Donations in your own currency). On your rewards page, the customer picks the charity first, then the points, and confirms once.

  3. Redeem the points

    Create one donation for the converted amount with the chosen charityId: it is assigned at once, with no separate claim. Use the id of the redemption in your system as uniqueExternalId, so a retry never donates twice for the same points. Then take the points off in your system. Your store funds the donation at the rate of its vouchers, and the fiscal receipt goes to your company.

    POST /v1/donations
    curl -X POST https://api.sandbox.charitips.com/v1/donations \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "campaignId": "<campaignId>",    "amount": 500,    "charityId": "<charityId>",    "uniqueExternalId": "redemption_88213",    "externalId": "customer_204"  }'
    Built from the spec and the API code

    Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.

Edge cases

  • Taking the points off fails after the donation was created. Delete the donation, then show the error. Deleting works until the donation is billed.
  • You want to show the impact. List the customer's donations with the externalId filter, using your customer id as externalId on each donation.

The memo

Send the memo to your team

Already written for this flow

  • What it does and who pays, in a few sentences
  • What you need: plan, API calls and webhooks
  • What you can report: donations, charities, impact and receipts

To paste in an email, a document or a note.

Email it