Skip to content
Aller au contenu
Charitips

Use cases · Payments

Card cashback as a donation

Give a share of card spending to the charity each customer chose.

  • Who paysYour company
  • Starts withEvery period
  • Tax receiptIn your company's name

Needs API access on a validated account. Plans

One variant of A saved choice, a periodic statement

The family page plays this case next to the other sectors that run the same calls.

See every variant
Device
Charities shown as
Outline widget
Cashback rate
your-bank.example/cashback

your-bank.example/cashback

Step by step

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

  1. 1Charity saved

    To come

    Your customer does…

    Clicks “Save my choice”.

    Your server sends…

    Optional: the customer saves a charity ahead. Your app keeps it on its side; nothing is sent to Charitips yet.

    Charitips answers…

    Nothing: Charitips is not called at this step.

  2. 2Month closed

    To come

    Your customer does…

    Clicks “Close the month”.

    Your server sends…

    Creates a 4,12 € donation for 2026-10 customer 204 on the campaign “Cashback donations”, 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.

  3. 3Charity chosen

    To come

    Your customer does…

    Clicks “Give 4,12 €”.

    Your server sends…

    Assigns that donation to the charity your customer picks.

    POSTclaim-donation

    Charitips answers…

    The donation now goes to the charity your customer picks.

    Charitips will then tell your server the donation was updated.

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. 1 % of card spending each month: that is the case the demo plays. The same flow also covers:

Build it

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

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

    POST /v1/campaigns
    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>"  }'
    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.

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

    Shell
    curl "https://api.sandbox.charitips.com/v1/charities-selections/<charitiesSelectionId>?includeCharities=true" \  -H "Authorization: Bearer $CHARITIPS_TOKEN"
  3. 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.

    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": 412,    "uniqueExternalId": "cashback_2026_10_customer_7781",    "externalId": "customer_7781",    "charityId": "<charityId>"  }'
    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.

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

    POST /v1/donations/<donationId>/claim
    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>"  }'
    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

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

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