> ## Documentation Index
> Fetch the complete documentation index at: https://docs.donate.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Find a charity, create a config for it and quote its fee in five calls

This page takes you from nothing to a config id you can donate against. You need an
[API key](https://docs.donate.gg/api-keys.md), `curl` and `jq`.

> [!WARNING]
>
> Step 3 creates a real config. Configs are permanent, and a donation through a config your project
> created pays a 20% fee today. Creating one costs nothing and moves no money; it only reserves an
> id.

```bash theme={null}
export DONATE_API_KEY="your key"
```

**1. Search for a beneficiary**

Search takes a name and returns charities and campaigns together. Here it is limited to
charities. No key is needed.

```bash theme={null}
curl "https://api.donate.gg/api/v2/beneficiaries?term=make-a-wish%20america&type=charity&limit=3"
```

An example answer:

```json theme={null}
{
  "items": [
    {
      "type": "charity",
      "id": "9b4dae4e-d8c1-4322-a594-35a4858296b2",
      "available": true,
      "name": "Make-A-Wish America",
      "imageUrl": "https://docs.candid.org/edoc/11142134",
      "url": "https://www.donate.gg/charities/make-a-wish-america",
      "source": null,
      "eligible": true,
      "receiverCount": 1
    }
  ],
  "nextCursor": null
}
```

Keep the `type` and the `id` of the result you want. Together they are the beneficiary.

**2. Read the charity**

A search result is a summary. Read the charity in full to show it to a person.

```bash theme={null}
curl "https://api.donate.gg/api/v2/charities/9b4dae4e-d8c1-4322-a594-35a4858296b2"
```

The answer starts with the same seven fields and adds `description`, `websiteUrl`,
`registrationNumber`, `country`, `location`, `socials`, `eligible` and `stats`.
[The coin page guide](https://docs.donate.gg/guides/coin-page.md#3-the-details-view) has the whole response. Its
`stats`, as an example:

```json theme={null}
{
  "totalUsdE6": "228998452896",
  "pendingUsdE6": "84066",
  "settledUsdE6": "228998368830",
  "donationCount": 845,
  "pendingCount": 1,
  "settledCount": 844,
  "firstDonationAt": "2026-04-19T00:52:27.000Z",
  "lastDonationAt": "2026-11-18T22:53:59.000Z"
}
```

`eligible` says whether the charity can go into a new config. Amounts in `stats` are US dollars
times 10^6 in a string, so `"228998452896"` is \$228,998.45.

**3. Create a config**

A config names up to five beneficiaries and gives each a weight. This one sends everything to
one charity. This call needs your key.

```bash theme={null}
CONFIG_ID=$(curl -s -X POST "https://api.donate.gg/api/v2/configs" \
  -H "donate-api-key: $DONATE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"beneficiaries":[{"type":"charity","id":"9b4dae4e-d8c1-4322-a594-35a4858296b2","weight":1}]}' \
  | jq -r '.idBase58')

echo "$CONFIG_ID"
```

The call answers `201` with the config. Its id is written twice, as the same 32 bytes: `id` is
`0x` hex for EVM contracts and `idBase58` is for Solana. Either works in an API path.

Sending the same beneficiaries and weights again returns the same config with `200`, so a retry
is safe.

**4. Read the config back**

Anyone can read a config by id. No key is needed.

```bash theme={null}
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID"
```

An example answer. The id illustrates the shape, and yours differs:

```json theme={null}
{
  "id": "0x7ac4174ed42dc6285a4d8a29f33177218a9e99becb64a5c9845725d1ebfe29f3",
  "idBase58": "9GEATUZ8sqNxgiuF3BauoNaUKoA7v1MMrV16UZFkqqpW",
  "beneficiaries": [
    { "type": "charity", "id": "9b4dae4e-d8c1-4322-a594-35a4858296b2", "weight": "1" }
  ],
  "createdAt": "2026-11-19T09:12:04.118Z"
}
```

That is the whole config: who is paid and in what proportion. It has no fee and no names. It
never changes, so you can keep this answer.

**5. Quote the fee a donation pays**

Before you ask a donor to sign, ask what fee applies now. Pass the chain the donor pays on and
the address the donation is credited to, which is usually the donor's wallet. `101` is Solana.
The address below is a placeholder nobody holds.

```bash theme={null}
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/fee?chainId=101&creditedAddress=ExampLeWa11et1111111111111111111111111111111"
```

An example answer:

```json theme={null}
{ "feeBps": 2000, "evaluatedSlot": "381204455" }
```

`feeBps` is in basis points: `2000` is 20%. The quote is an estimate, not a locked rate. Ask
again just before the donor signs.

## What you have now

A config id. A donation made on-chain against that id pays the beneficiaries in it.

* To send the donation, pass the id to the [Solana program](https://docs.donate.gg/blockchain/solana-svm.md) or an
  [EVM contract](https://docs.donate.gg/blockchain/evm.md).
* To build a full product flow, pick a guide: a [coin that donates](https://docs.donate.gg/guides/coin-launchpad.md), a
  [donate button](https://docs.donate.gg/guides/donate-button.md) or a [campaign page](https://docs.donate.gg/guides/campaigns.md).
* To split between several beneficiaries, read [configs and weights](https://docs.donate.gg/concepts.md#configs-and-weights).
* To show who a coin pays, read its [config beneficiaries](https://docs.donate.gg/api-reference/configs/list-beneficiaries.md) by config id.

## The whole sequence

```bash theme={null}
export DONATE_API_KEY="your key"

# 1. Search
curl "https://api.donate.gg/api/v2/beneficiaries?term=make-a-wish%20america&type=charity&limit=3"

# 2. Read the charity
curl "https://api.donate.gg/api/v2/charities/9b4dae4e-d8c1-4322-a594-35a4858296b2"

# 3. Create a config (permanent)
CONFIG_ID=$(curl -s -X POST "https://api.donate.gg/api/v2/configs" \
  -H "donate-api-key: $DONATE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"beneficiaries":[{"type":"charity","id":"9b4dae4e-d8c1-4322-a594-35a4858296b2","weight":1}]}' \
  | jq -r '.idBase58')

# 4. Read it back
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID"

# 5. Quote the fee. Put the donor's wallet in place of the placeholder address.
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/fee?chainId=101&creditedAddress=ExampLeWa11et1111111111111111111111111111111"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.