Skip to content
PitishaAPI

Docs / API reference

Settlements

Where your day's money landed, and one record you can export.

The Settlement object

A record that money landed in your own till or account. Pitisha reads settlements from each source and closes the day on one record.

Attributes

  • idstring

    Unique identifier, starting set_.

  • statusstring

    Whether the money has landed.

    One of pending, landed

  • amountinteger

    Amount in the smallest unit.

  • wallet_idstring

    The wallet this settlement belongs to.

  • destinationobject

    Where it landed.

  • daystring

    The trading day, YYYY-MM-DD.

  • collectionsinteger

    How many collections it covers.

  • receipt_urlstring

    A link to the receipt in your portal.

  • created_atstring

    ISO 8601 timestamp.

Example object

{
  "id": "set_5m2c8v",
  "object": "settlement",
  "status": "landed",
  "amount": 48250000,
  "currency": "KES",
  "wallet_id": "wal_main",
  "destination": {
    "type": "bank_account",
    "account_last4": "2291",
    "bank_code": "01"
  },
  "day": "2026-10-27",
  "collections": 412,
  "receipt_url": "https://portal.example.com/receipts/set_5m2c8v",
  "livemode": false,
  "created_at": "2026-10-28T06:00:00+03:00"
}
GET/v1/settlements

List settlements

Newest first.

Query parameters

  • wallet_idstring

    Only this wallet.

  • daystring

    A trading day, YYYY-MM-DD.

  • limitinteger

    How many items to return, from 1 to 100. Defaults to 20.

  • starting_afterstring

    A cursor from a previous response's next_cursor. Returns the next page.

Errors

  • 401 authentication_failed

See Errors for what each means.

curl -X GET "$PITISHA_API/v1/settlements" \
  -H "Authorization: Bearer $PITISHA_SECRET_KEY"
{
  "object": "list",
  "data": [
    {
      "id": "set_5m2c8v",
      "object": "settlement",
      "status": "landed",
      "amount": 48250000,
      "currency": "KES",
      "wallet_id": "wal_main",
      "destination": {
        "type": "bank_account",
        "account_last4": "2291",
        "bank_code": "01"
      },
      "day": "2026-10-27",
      "collections": 412,
      "receipt_url": "https://portal.example.com/receipts/set_5m2c8v",
      "livemode": false,
      "created_at": "2026-10-28T06:00:00+03:00"
    }
  ],
  "has_more": true,
  "next_cursor": "cur_9fK2mQ"
}
GET/v1/settlements/{id}

Retrieve a settlement

Fetch one settlement.

Path parameters

  • idstringrequired

    The settlement id.

Errors

  • 404 not_found

See Errors for what each means.

curl -X GET "$PITISHA_API/v1/settlements/ID_FROM_RESPONSE" \
  -H "Authorization: Bearer $PITISHA_SECRET_KEY"
{
  "id": "set_5m2c8v",
  "object": "settlement",
  "status": "landed",
  "amount": 48250000,
  "currency": "KES",
  "wallet_id": "wal_main",
  "destination": {
    "type": "bank_account",
    "account_last4": "2291",
    "bank_code": "01"
  },
  "day": "2026-10-27",
  "collections": 412,
  "receipt_url": "https://portal.example.com/receipts/set_5m2c8v",
  "livemode": false,
  "created_at": "2026-10-28T06:00:00+03:00"
}
GET/v1/day-closes/{day}

Retrieve a day close

One record for a whole trading day.

Totals for the day, how many payments matched, how many are in the pile and how many have no match, and a link to export the record as CSV for your accountant.

Path parameters

  • daystringrequired

    The trading day, YYYY-MM-DD.

Errors

  • 404 not_found

See Errors for what each means.

curl -X GET "$PITISHA_API/v1/day-closes/2026-10-27" \
  -H "Authorization: Bearer $PITISHA_SECRET_KEY"
{
  "object": "day_close",
  "day": "2026-10-27",
  "collected": 48250000,
  "paid_out": 12000000,
  "fees": 579000,
  "matched": 398,
  "pile": 9,
  "no_match": 5,
  "export_url": "https://portal.example.com/exports/2026-10-27.csv",
  "livemode": false
}