Skip to content

Transactions and receipts

Everything that moved money in the workspace (API payouts and anything else on the account), with receipts you can send to recipients or auditors.

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 transactions

GET/api/v1/transactions
API keytransactions:read

The workspace's money movements, newest first. In test mode these are your sandbox payouts.

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.

Request
curl "https://api.autopayke.com/api/v1/transactions?limit=20" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
{
  "ok": true,
  "data": {
    "object": "list",
    "data": [
      {
        "id": "TXN-8KQ2-ZP7L",
        "object": "transaction",
        "livemode": true,
        "type": "payout",
        "direction": "debit",
        "status": "succeeded",
        "amount_usdc": "11.646000",
        "fee_usdc": "0.302310",
        "amount_local": 150000,
        "currency": "KES",
        "payout": "po_8Fq2mZx7Lk3Rt9Vb",
        "counterparty": {
          "name": "JANE WANJIKU DOE",
          "phone": "+254 712 ••• 678",
          "till_number": null
        },
        "created": "2026-11-03T09:10:00.000Z",
        "settled": "2026-11-03T09:10:41.000Z"
      }
    ],
    "has_more": false
  }
}
Response fields
  • idstring

    The transaction reference (the same one on receipts and in the AutoPayKe app).

  • typestring

    payout (made through the API), send, receive, merchant_payment, payment_received, transfer_in or transfer_out.

  • directionstring

    debit (money out) or credit (money in).

  • statusstring

    pending, processing, succeeded, failed or reversed.

  • amount_localinteger | null

    KES cents, when the transaction had a local amount.

  • payoutstring | null

    The po_… id when the API created it.

  • counterpartyobject

    Who was paid or paid you, masked.

  • settledstring | null

    When it completed.

Get a transaction

GET/api/v1/transactions/{id}
API keytransactions:read

One transaction by its reference (or, in test mode, the payout id).

Path parameters
  • idstringrequired

    Transaction reference.

Request
curl "https://api.autopayke.com/api/v1/transactions/TXN-8KQ2-ZP7L" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
{
  "ok": true,
  "data": {
    "id": "TXN-8KQ2-ZP7L",
    "object": "transaction",
    "livemode": true,
    "type": "payout",
    "direction": "debit",
    "status": "succeeded",
    "amount_local": 150000,
    "currency": "KES",
    "payout": "po_8Fq2mZx7Lk3Rt9Vb"
  }
}
Errors

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

Get a receipt

GET/api/v1/transactions/{id}/receipt
API keytransactions:read

A receipt for one transaction: who paid, who received, amounts and times, issued by AutoPayKe. Render it in your own template or store it with your books.

Path parameters
  • idstringrequired

    Transaction reference.

Request
curl "https://api.autopayke.com/api/v1/transactions/TXN-8KQ2-ZP7L/receipt" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
{
  "ok": true,
  "data": {
    "object": "receipt",
    "livemode": true,
    "transaction": "TXN-8KQ2-ZP7L",
    "issued": "2026-11-03T12:00:00.000Z",
    "from": {
      "name": "Acme Payroll",
      "workspace": "2f6c1a4e-7b3d-4e58-9c21-5a8d0e7f3b64"
    },
    "to": {
      "name": "JANE WANJIKU DOE",
      "phone": "+254 712 ••• 678",
      "till_number": null
    },
    "amount_local": 150000,
    "currency": "KES",
    "amount_usdc": "11.646000",
    "fee_usdc": "0.302310",
    "status": "succeeded",
    "created": "2026-11-03T09:10:00.000Z",
    "settled": "2026-11-03T09:10:41.000Z",
    "issuer": "AutoPayKe"
  }
}
Errors

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