Skip to content
Aller au contenu
Charitips

Use cases · Platforms

Donations for your business customers

Give each of your business customers its own account, its own giving and its own dashboard, billed to you or to them.

  • Who paysYour business customers
  • Starts withEach business customer's own campaigns
  • Tax receiptIn each business customer's name

Needs API access and the account hierarchy feature on a validated account. Plans

Device
Charities shown as
Outline widget
your-platform.example/settings/giving

your-platform.example/settings/giving

Step by step

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

  1. 1Giving set up

    To come

    Your customer does…

    Clicks “Turn on giving”.

    Your server sends…

    Creates an account for your customer “Blue Fern Studio”.

    POSTcreate-child-account

    Saves the charities you offer, as “Team charities”, on your customer's account.

    POSTcreate-charities-selection

    Creates the campaign “Team kudos”, on your customer's account.

    POSTcreate-campaign

    Asks for a link to your customer's billing page.

    POSTcreate-shareable-billing-link

    Charitips answers…

    Charitips creates the account and returns its id.

    Charitips saves the selection and returns its id.

    Charitips creates the campaign and returns its id.

    Charitips returns the link to send.

    Charitips will then tell your server the campaign was created.

  2. 2Campaign live

    To come

    Your customer does…

    Clicks “Card saved”.

    Your server sends…

    Starts the campaign.

    POSTactivate-campaign

    Charitips answers…

    The campaign is live and takes donations.

    Charitips will then tell your server the campaign changed.

  3. 3Colleague thanked

    To come

    Your customer does…

    Clicks “Send kudos with 10 €”.

    Your server sends…

    Creates a 10 € donation for kudos #5120 on your campaign.

    POSTcreate-donation

    Charitips answers…

    Charitips records the donation and returns its id: it waits for your customer to pick a charity.

    Charitips will then tell your server the donation was created.

  4. 4Colleague chose a charity

    To come

    Your customer does…

    Clicks “Give 10 €”.

    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.

  5. 5Dashboard opened

    To come

    Your customer does…

    Clicks “Open the giving dashboard”.

    Your server sends…

    Looks up the dashboard user of your customer's account.

    GETlist-users

    Asks for a sign-in link for that user.

    POSTcreate-user-magic-link

    Charitips answers…

    Charitips returns the user created with the account, and its id.

    Charitips returns a one-time sign-in link.

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. A SaaS offers giving to its business customers: that is the case the demo plays. The same flow also covers:

One variant

Why one demo: Account hierarchy runs any family above on each business customer's own account: pick the family for what your customers do, and this page for the accounts.

Build it

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

Before you start

  • The account hierarchy feature.
  • Every donation type in these docs, run separately for each business customer: a donation with every order, round-up, loyalty points, gift cards, referral, cashback, a share of each subscription, monthly giving, matching and votes. Billed to each business customer with delegated billing, or to you with direct billing.
  1. Request account hierarchy access

    Account hierarchy lets you create and manage Charitips accounts on behalf of your business customers. Ask for it at contact@charitips.com: our team validates it on your account. Your own account is the parent account, and each customer gets a child account linked to it: see Account hierarchy.

  2. Create a child account

    For each customer, create a child account with Create a child account, during their onboarding once you have their company details. It needs the company name, a contact's first name, last name and email, a legal registration number (SIREN for French businesses, a valid VAT number for others) and the postal address. They become the customer's billing and fiscal information: invoices use the first, fiscal receipts the second. Save the accountId from the response with your customer: the next steps use it.

    POST /v1/accounts/<accountId>/child-accounts
    curl -X POST https://api.sandbox.charitips.com/v1/accounts/<accountId>/child-accounts \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "name": "Hero Corp",    "firstName": "John",    "lastName": "Doe",    "email": "john.doe@herocorp.com",    "legalRegistrationNumber": "883060550",    "street": "8 rue de la Paix",    "city": "Paris",    "zip": "75002",    "country": "FR"  }'
    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.

  3. Create a charities selection

    On the child account, create the charities your customer offers with Create a charities selection and the child's accountId. Get the charity ids from List charities.

    POST /v1/charities-selections
    curl -X POST https://api.sandbox.charitips.com/v1/charities-selections \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "name": "Hero Corp selection",    "charityIds": [      "ca68f22c-2fdf-48b1-b8f6-43c3073e83bb",      "1cccaa7c-cc5e-4dc8-9978-fc2de5f5d7b3",      "0d65b4e6-f663-4ec7-b69d-0da5e7e8b2ee"    ],    "accountId": "<child accountId>"  }'
    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. Create and activate the campaign

    Create the campaign with Create a campaign, the child's accountId and the charitiesSelectionId. Without a type, it runs until you end it and its total depends on usage, which suits long-lived and usage-based experiences. Campaigns are created PENDING: activate it with Activate a campaign once it is configured. Write to contact@charitips.com for help with the first one.

    POST /v1/campaigns
    curl -X POST https://api.sandbox.charitips.com/v1/campaigns \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "accountId": "<child accountId>",    "charitiesSelectionId": "<charitiesSelectionId>",    "name": "Hero corp campaign"  }'
    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.

  5. Let the user pick a charity

    To record a donation, the user first chooses the charity to support. Show the charities with the charity selection widgets, and call your backend when the user picks one.

  6. Create the donation

    In that backend endpoint, create the donation with Create a donation on the child's campaign. externalId is an optional id of your system, such as a customer, transaction or order id; uniqueExternalId is the same but unique across all donations, so a retried call answers 409 instead of creating a duplicate. amount is in cents: 2000 is 20 €.

    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>",    "externalId": "<externalId>",    "uniqueExternalId": "<uniqueExternalId>",    "amount": 2000  }'
    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.

  7. Claim it for the chosen charity

    Right after, link the donation to the user's charity with Claim a donation.

    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.

  8. Store the ids on your side

    Keep your parent accountId in an environment variable, and each child accountId on the record of your customer. Store the campaignId and publicKey of each campaign there too, or on your own campaign record when a customer has several; both are also in the Informations tab of the campaign in the dashboard. On donations, votes and donors, pass your own id in uniqueExternalId, or in externalId when it is not unique, and the person choosing the charity in donor to track usage.

  9. Billing and receipts

    Donations without a set budget are billed monthly. A campaign's fiscal receipts are in the child account's name: yearly by default, at the end of the campaign for a time-limited one. To bill each customer directly instead of your account, see Bill your business customers; to open each customer's dashboard, see Dashboards and users.

Edge cases

  • A known duration. Add "type": "TIME_BASED" and an endDate for a one-time experience with a free budget: donations are billed monthly and the receipts come at the end of the campaign.
  • A known budget and duration. Add "amountType": "FIXED_AMOUNT" and a budget in cents (100000 is 1000 €) to a TIME_BASED campaign: the whole budget is billed at activation, and the receipts cover it at the end of the campaign.
  • Several campaigns per customer. Start with one campaign per child account. Add more when a customer needs other colors, logos or texts, when you segment donations and analytics by your own campaigns, themes or teams, or when experiences need different campaign settings.
  • Your API credentials. They give access to your account and every child account, so pass the child's accountId on your GET requests and when you create a campaign, a charities selection, a user invitation or a site. Keep them secret, on your server only, never in a front-end application.

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