Skip to content
API documentation
View as MarkdownOpen in Claude

Wallet

List your wallet history

GET
/v1/wallet/entries

Needs a wallet, which Main Team opens only after an agreement and on your request (otherwise 403 wallet_not_enabled).

Your wallet history, newest first: credits Main Team added or corrected, the spend of every credit, and reversals. Entries are never changed; a correction is a new entry. Each spend entry carries the student, application, payment and exam it paid for, the amount in cents and its currency, and the reference the payment shows.

Narrow it with organizationId, type, studentId, applicationId, from and to; they combine, and one that cannot be read is 400. The list is limit 20 a page by default and at most 100.

Parameters

Query parameters

NameTypeDescription
organizationIdoptionalstring

Only the entries of this organization (its _id, from listOrganizations).

typeoptionalstringone ofgrantadjustspendreversal

Only entries of this type.

studentIdoptionalstring

Only the entries for this student (the _id you registered them with).

applicationIdoptionalstring

Only the entries for this application.

fromoptionalstring

Only entries created at or after this moment (ISO 8601).

tooptionalstring

Only entries created at or before this moment (ISO 8601).

pageoptionalnumber

Page number. Defaults to 1.

Example 1

limitoptionalnumber

Items per page. Defaults to 20, max 100.

Example 20

Responses

200 OK

Success: message is "Wallet entries fetched successfully.".

Body

  • successbooleanrequired

    Always true on a success.

    one oftrue

  • messagestringrequired

    exampleWallet entries fetched successfully.

  • paginationobject · PaginationMetarequired

    Where one page sits in the whole list.

    4 fields of pagination
    • pagenumberrequired

      The page returned, counting from 1.

      min1example1

    • limitnumberrequired

      Items per page: the limit you sent, 20 if you sent none, and never more than 100.

      min1max100example20

    • totalnumberrequired

      Items across every page.

      min0example57

    • totalPagesnumberrequired

      Pages at this limit: total / limit, rounded up.

      min0example3

  • dataarray of WalletEntryResponserequired

    16 fields of each item
    • _idstringrequired

      The row’s id.

      example6650a1b2c3d4e5f6a7b8c9f2

    • typestringrequired

      grant: credits added by Main Team. adjust: a correction by Main Team. spend: one credit paid an application. reversal: Main Team gave a spent credit back.

      one ofgrantadjustspendreversal

      examplespend

    • organizationstringrequired

      The organization’s slug.

      examplestem

    • organizationIdstringrequired

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

      example64b7f0c2a1d3e4f5a6b7c8d9

    • creditsnumberrequired

      Signed: a grant is positive, a spend -1, a reversal +1.

      example-1

    • amountnumber

      Cents the credit paid (a reversal repeats it negated). Absent on grants and adjustments.

      example5000

    • currencystring

      The currency of amount.

      one ofEURUSD

      exampleEUR

    • studentIdstring

      The student, as studentId.

      example6650a1b2c3d4e5f6a7b8c9d0

    • applicationIdstring

      The application that was paid.

      example6650a1b2c3d4e5f6a7b8c9e5

    • paymentIdstring

      Its payment.

      example6650a1b2c3d4e5f6a7b8c9e6

    • examIdstring

      The exam applied for.

      example6650a1b2c3d4e5f6a7b8c9e1

    • referencestring

      The transaction code (stx-...) of the payment, as on the application’s payment.reference.

      examplestx-19a2c3d4e5f6a7b8c9

    • invoiceNostring

      The invoice number of the payment.

      example2425-10042

    • channelstring

      Which operation spent it.

      examplecreateApplication

    • reversesstring

      On a reversal, the spend entry it gives back.

      example6650a1b2c3d4e5f6a7b8c9f2

    • createdAtstringrequired

      When the entry was written.

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

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 entries fetched successfully.",
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 57,
    "totalPages": 3
  },
  "data": [
    {
      "_id": "6650a1b2c3d4e5f6a7b8c9f2",
      "type": "spend",
      "organization": "stem",
      "organizationId": "64b7f0c2a1d3e4f5a6b7c8d9",
      "credits": -1,
      "amount": 5000,
      "currency": "EUR",
      "studentId": "6650a1b2c3d4e5f6a7b8c9d0",
      "applicationId": "6650a1b2c3d4e5f6a7b8c9e5",
      "paymentId": "6650a1b2c3d4e5f6a7b8c9e6",
      "examId": "6650a1b2c3d4e5f6a7b8c9e1",
      "reference": "stx-19a2c3d4e5f6a7b8c9",
      "invoiceNo": "2425-10042",
      "channel": "createApplication",
      "reverses": "6650a1b2c3d4e5f6a7b8c9f2",
      "createdAt": "2026-09-01T09:30:00.000Z"
    }
  ]
}

Example request

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

Search the API documentation

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