Skip to main content
This page takes you from nothing to a config id you can donate against. You need an API key, curl and jq.
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.
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.
An example answer:
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.
The answer starts with the same seven fields and adds description, websiteUrl, registrationNumber, country, location, socials, eligible and stats. The coin page guide has the whole response. Its stats, as an example:
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.
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.
An example answer. The id illustrates the shape, and yours differs:
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.
An example answer:
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.

The whole sequence