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
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.
1Points given
To comeYour 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.
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.
Build it
The calls behind the demo, in order. Each step shows the request your server sends.
donation_createdonation_updateSet 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.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.
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 asuniqueExternalId, 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/donationscurl -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 codeRequest 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
externalIdfilter, using your customer id asexternalIdon 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





