Skip to content
API documentation
View as MarkdownOpen in Claude

Wallet

Read your wallet: credits granted, spent and remaining

GET
/v1/wallet

The wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org), and Main Team then tells you how many credits you have for each olympiad. Without one this answers 403 wallet_not_enabled; bank transfer stays the default way to pay.

Your wallet holds the credits Main Team gave you, counted separately for each olympiad. A credit is a convenience: the application is marked paid at once, and the amount is still due to Main Team and settled afterwards by bank transfer. One credit pays one priced application (createApplication with walletPay, payApplicationFromWallet, payApplicationsFromWallet); a free exam never uses one.

The answer lists every olympiad, zeros included, with granted, spent, remaining and what the spent credits paid for in cents of that organization’s currency (USD for neo, EUR otherwise), plus credit totals. Money is never summed across currencies.

A wallet that is closed still answers, with enabled: false, so its history stays readable. An account that never had one answers 403 wallet_not_enabled.

Responses

200 OK

Success: message is "Wallet fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleWallet fetched successfully.

  • dataobject · WalletResponserequired

    Your wallet: the credits Main Team gave you, how many you spent and how many remain, for each olympiad.

    4 fields of data
    • enabledbooleanrequired

      false while the wallet is closed. A closed wallet can still be read, but pays nothing.

      exampletrue

    • enabledAtstringnullable

      When it was switched on.

      formatdate-timeexample2026-09-01T09:30:00.000Z

    • organizationsarray of WalletOrganizationResponserequired

      One entry per organization, zeros included.

      7 fields of each item
      • organizationstringrequired

        The organization’s slug.

        examplestem

      • organizationIdstringrequired

        The organization’s _id, as :organizationId takes it.

        example64b7f0c2a1d3e4f5a6b7c8d9

      • currencystringrequired

        The currency this organization charges in, and so what spentAmount is counted in: USD for neo, EUR for the others.

        one ofEURUSD

        exampleEUR

      • grantednumberrequired

        Credits granted to your account for this organization, in total.

        example50

      • spentnumberrequired

        Credits spent so far: one per paid application.

        example9

      • remainingnumberrequired

        granted minus spent: what you can still spend.

        example41

      • spentAmountnumberrequired

        What the spent credits paid for, in cents of currency (a coding application at the bundle price counts what it was settled at).

        example45000

    • totalsobject · WalletTotalsResponserequired

      The credit totals across the organizations.

      3 fields of totals
      • grantednumberrequired

        Credits granted, all organizations.

        example120

      • spentnumberrequired

        Credits spent, all organizations.

        example19

      • remainingnumberrequired

        Credits left, all organizations.

        example101

Headers

X-RateLimit-Limit integer

Requests your account may make to this operation per window (100).

X-RateLimit-Remaining integer

Requests left in the current window.

X-RateLimit-Reset integer

Seconds until the current window ends.

Example

{
  "success": true,
  "message": "Wallet fetched successfully.",
  "data": {
    "enabled": true,
    "enabledAt": "2026-09-01T09:30:00.000Z",
    "organizations": [
      {
        "organization": "stem",
        "organizationId": "64b7f0c2a1d3e4f5a6b7c8d9",
        "currency": "EUR",
        "granted": 50,
        "spent": 9,
        "remaining": 41,
        "spentAmount": 45000
      }
    ],
    "totals": {
      "granted": 120,
      "spent": 19,
      "remaining": 101
    }
  }
}

Example request

# $TOKEN: a short-lived token you minted with your API key and secret
curl -sS 'https://api.main-team.org/v1/wallet' \
  -H "Authorization: Bearer $TOKEN"

Search the API documentation

Guides, endpoints by name, path or permission, and error codes such as not_found.