Skip to content

Events

A record of everything that happened to your objects. The same events your webhooks receive; read them here to catch up after downtime.

Send your API key as Authorization: Bearer apk_test_… (sandbox) or apk_live_… (live). Each endpoint lists the scope the key needs. See API keys.

List events

GET/api/v1/events
API keyevents:read

Events in the key's environment, newest first. Filter by type or by the object they're about.

Query parameters
  • limitintegeroptional

    How many to return, 1 to 100. Default 20.

  • starting_afterstringoptional

    Cursor for the next page: the id of the last item you got. Lists are newest first; when has_more is true, pass the last id here.

  • typestringoptional

    Only this event type, e.g. payout.succeeded.

  • object_idstringoptional

    Only events about this object, e.g. a payout id. Gives a payout's full history.

Request
curl "https://api.autopayke.com/api/v1/events?object_id=po_8Fq2mZx7Lk3Rt9Vb" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
{
  "ok": true,
  "data": {
    "object": "list",
    "data": [
      {
        "id": "evt_3Jk8Qw2Zp7Lm4Nx6Rt1Vb9Yc",
        "object": "event",
        "type": "payout.succeeded",
        "created": "2026-11-03T09:10:06.000Z",
        "livemode": false,
        "data": {
          "object": {
            "id": "po_8Fq2mZx7Lk3Rt9Vb",
            "object": "payout",
            "livemode": false,
            "status": "succeeded",
            "amount": 150000,
            "currency": "KES",
            "source_token": "USDC",
            "debited_usdc": "11.948310",
            "fee_usdc": "0.302310",
            "rate": "128.80",
            "destination": {
              "type": "mobile_money",
              "network": "safaricom",
              "phone": "+254 700 ••• 001"
            },
            "recipient_name": "Jane Wanjiku",
            "reference": "order_1042",
            "description": "Rider payout, week 44",
            "metadata": {
              "rider_id": "r_5521"
            },
            "failure_code": null,
            "failure_message": null,
            "created": "2026-11-03T09:10:00.000Z",
            "updated": "2026-11-03T09:10:06.000Z"
          }
        }
      }
    ],
    "has_more": false
  }
}
Response fields
  • idstring

    evt_… Use it to drop duplicate webhook deliveries.

  • typestring

    What happened. See the Webhooks guide for every type.

  • createdstring

    When it happened.

  • data.objectobject

    The object as it was at that moment, the same shape a GET returns.

Get an event

GET/api/v1/events/{id}
API keyevents:read

One event by id. Use it to check a webhook you received really came from us: fetch it by the id in the payload.

Path parameters
  • idstringrequired

    evt_…

Request
curl "https://api.autopayke.com/api/v1/events/evt_3Jk8Qw2Zp7Lm4Nx6Rt1Vb9Yc" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
{
  "ok": true,
  "data": {
    "id": "evt_3Jk8Qw2Zp7Lm4Nx6Rt1Vb9Yc",
    "object": "event",
    "type": "payout.succeeded",
    "created": "2026-11-03T09:10:06.000Z",
    "livemode": false,
    "data": {
      "object": {
        "id": "po_8Fq2mZx7Lk3Rt9Vb",
        "object": "payout",
        "livemode": false,
        "status": "succeeded",
        "amount": 150000,
        "currency": "KES",
        "source_token": "USDC",
        "debited_usdc": "11.948310",
        "fee_usdc": "0.302310",
        "rate": "128.80",
        "destination": {
          "type": "mobile_money",
          "network": "safaricom",
          "phone": "+254 700 ••• 001"
        },
        "recipient_name": "Jane Wanjiku",
        "reference": "order_1042",
        "description": "Rider payout, week 44",
        "metadata": {
          "rider_id": "r_5521"
        },
        "failure_code": null,
        "failure_message": null,
        "created": "2026-11-03T09:10:00.000Z",
        "updated": "2026-11-03T09:10:06.000Z"
      }
    }
  }
}
Errors

Plus the key and rate errors any keyed call can return.