Skip to main content
Requires partner scope A config is the central concept in the Donate.gg Developer API. It defines a set of charity beneficiaries and how donations are split between them. When a donation is made on-chain, the config ID determines where funds go. Each charity in a config has a weight that determines its share. Weights are relative: a charity with weight 2 receives twice as much as one with weight 1. Config IDs are returned as { "hex": string, "base58": string }. The hex form is the on-chain bytes32; the base58 form is a Solana-friendly encoding of the same value. To inspect or delete a config by ID, see Core API: Donation Configs.

Create a config

POST /configs Creates a new config with charity beneficiaries. At least one beneficiary is required, and at most 5 beneficiaries are allowed.
curl -X POST https://www.donate.gg/api/v1/configs \
  -H "donate-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charityBeneficiaries": [
      { "charityId": "charity_abc", "weight": 60 },
      { "charityId": "charity_def", "weight": 40 }
    ]
  }'
Request body
FieldTypeDescription
charityBeneficiariesarray1–5 charity beneficiaries with weights
charityBeneficiaries[].charityIdstringID of a verified charity
charityBeneficiaries[].weightintegerRelative weight, must be greater than 0
Response 201
{
  "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
  "charities": [
    {
      "id": "charity_abc",
      "slug": "red-cross",
      "name": "American Red Cross",
      "logo": "https://...",
      "website": "https://redcross.org",
      "address": "431 18th St NW",
      "blog": "https://example.com",
      "twitter": "redcross",
      "facebook": "redcross",
      "instagram": "redcross",
      "linkedin": "redcross",
      "youtube": "redcross",
      "city": "Washington",
      "state": "DC",
      "country": "US",
      "zipCode": "20006",
      "taxId": "53-0196605",
      "isEnabled": true,
      "isVerified": true,
      "weight": "60"
    }
  ],
  "users": []
}
Weights in responses are strings to preserve full precision for values beyond Number.MAX_SAFE_INTEGER.
Error responses
StatusCodeDescription
400VALIDATION_ERRORMissing or invalid fields
400CHARITY_NOT_FOUNDOne or more charity IDs don’t exist
400DUPLICATE_CHARITY_IDSThe same charity appears more than once
400INVALID_JSONRequest body is not valid JSON

List configs

GET /configs Returns a paginated list of all configs created by your developer account.
curl https://www.donate.gg/api/v1/configs \
  -H "donate-api-key: YOUR_API_KEY"
Query parameters
ParameterTypeDefaultDescription
limitinteger50Results per page, max 200
cursorstring-Cursor from previous pageKey for next page
Response
{
  "pageKey": "next_cursor_string",
  "response": [
    {
      "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
      "charities": [
        {
          "id": "charity_abc",
          "slug": "red-cross",
          "name": "American Red Cross",
          "weight": "60",
          "...": "other charity fields"
        }
      ],
      "users": []
    }
  ]
}

Core API operations for configs

Config retrieval and deletion are available in the Core API: