GET /v2/configs/{configId}/beneficiaries. Each item
has its weight and public profile. A charity includes its website and socials. A campaign
includes its own profile and the beneficiaries it supports. If you only have the coin’s address,
read the coin first to find its current config id. Call these endpoints from your server.
The examples use a real coin on Solana: mint 2ssMotVbTUfRJev2UnibHzHsoeszPzgwbfsTZPSHpump, chain
id 101.
1. Read the coin
GET /v2/coins/{chainId}/{address} returns the coin, the config its
fees pay now, the configs it paid before, and what it has donated.
To show each recipient’s share, divide its
weight by the sum of the weights in the config.
Weights are relative, so a single recipient with weight 100 receives everything. A weight is a
whole number in a string.
Which config the coin pays is read from the chain and remembered for up to 20 minutes. If the
chain cannot be read, the call answers 503 with PROVIDER_UNAVAILABLE: keep showing what you
last had and try again later.
The read finds that config for the coins of one launchpad only, the one whose coins
GET /v2/coins lists: see
Coins and donation sources. For a coin of another
launchpad, use the config id you attached to it and go straight to step 2.
A coin that has not donated yet
A coin that has a config and has not donated yet is still read: itsstats are zero, its rank
is null and previousConfigIds is empty.
The coin read answers 404 for an address that pays no config and has donated nothing, and for
a coin on a chain other than Solana (101). It can also answer 404 for up to 20 minutes after a
config is attached to a coin, because the chain read is remembered for that long, “this token is
not a donating coin” included. You hold the config you created, so in that window show its
recipients from the config and skip step 1.
A coin that no longer pays a config
A creator can point a coin’s fees somewhere else after it has donated. The coin is still read, and it stays inGET /v2/coins with everything it gave. On the
coin read, config is null, stats and rank are unchanged, and previousConfigIds holds
every config the coin donated through.
Check config for null before you read its recipients: the coin has none to show now. Which
config a coin pays is read from the chain and remembered for up to 20 minutes, so a coin that
was just pointed at a config can read null for that long, and one that was just pointed
elsewhere can show the config it paid before. To show who it gave to before, read
the configs in previousConfigIds with GET /v2/configs/{configId}.
2. Show the recipients
Pass the config’s hex or base58 id. The response has anitems array, with one item for each
selection. This example prints the fields a coin page might show.
beneficiaries array contains the
people or charities supported by this config’s selection, with weights relative to each other.
For example, a coin that sends 30% to a campaign whose two charities have equal weights sends
15% to each. An imported Tiltify campaign stays the named recipient when it completes.
If you have a list of arbitrary references and only need names and images, use
beneficiary lookup. It also accepts user:<id>.
Recipients that need care
The coin keeps paying a withheld recipient: a config is permanent. The API does not say why a
recipient is withheld.
3. The details view
For a row withavailable: true, the fields below are already in the config beneficiaries response.
The individual charity and campaign reads also return these profiles if you only have a recipient id.
- type: charity
- type: campaign
GET /v2/charities/{charityId}:socialsalways has the six keysx,facebook,instagram,linkedin,youtubeandblog. A platform the charity has no account on isnull: leave it out of the view.- Each account is
{ "url", "handle" }.handleis the account name without ”@”. It isnullwhen it is not known, and always forblog: show the link alone. - Every part of
location, andwebsiteUrl,registrationNumberandcountry, can benull.countryis an ISO 3166-1 alpha-2 code.
type and id. Cache
the expanded beneficiaries response by config id. Each config has its own weights, and two
configs can pin different receivers for the same campaign.
What to cache
You call from your backend and can keep answers for hours. What changes, and how often:Without an API key
Every call on this page works without a key, and a config can be read by anyone who holds its id. What a call without a key gets:- 20 requests a minute per IP address, counted across everything your server sends. A config id costs one call to render. Starting from a coin address takes a second call to find the config.
- Server-side only. The API refuses a browser on your domain, with or without a key.
- Keep what you read. A config never changes: read it once and keep it for ever. Keep each recipient’s summary for hours. What to cache has the rest.
- With a key the limit is your organization’s. It starts at 50 requests a minute. Access to the Developer portal is by invitation: email support@donate.gg. See API keys and Rate limits.
What the coin has donated
Show your own total if you have one. Donate’s isstats on the coin read in step 1.
GET /v2/coins/{chainId}/{address}/stats breaks it down by each
config the coin has paid. Leaderboards and stats has
that response.
Coming from v1
On v1 this page neededGET /v1/{chainId}/tokens/{address} for the coin and
GET /v1/charities/{charityId} for each charity, and a coin that pays a campaign could not be
read at all. Use the config beneficiaries read to show every recipient together, including campaigns.
Versions lists what to change.