Skip to content

Payout accounts

Saved places to send money out to: mobile money numbers and bank accounts, with the name on the account checked before you save it.

Every endpoint here needs Authorization: Bearer <token> for a signed-in AutoPayKe account. See Authentication.

List payout accounts

GET/api/v1/wallet/destinations
Bearer token

Every saved account, the default first. Only the last four digits of a number are ever returned.

Request
curl "https://api.autopayke.com/api/v1/wallet/destinations" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": [
    {
      "id": "f1e2d3c4-b5a6-4789-8abc-def012345678",
      "type": "mobile_money",
      "country": "KE",
      "currency": "KES",
      "operator": "Safaricom",
      "bankCode": null,
      "bankName": null,
      "accountNumberLast4": "5678",
      "accountName": "AMINA WANJIKU",
      "nameMatchStatus": "matched",
      "isDefault": true,
      "usableForWithdrawals": true,
      "nickname": "My M-Pesa",
      "holderName": "Amina Wanjiku",
      "owner": "self",
      "lastUsedAt": "2026-11-01T16:20:00.000Z",
      "useCount": 12
    }
  ]
}

Check the name on an account

POST/api/v1/wallet/destinations/resolve-name
Bearer token 20 requests per 5 minutes per IP address (shared with saving).

Looks up the registered name for a number or bank account before you save it, so people can confirm they have the right one.

Body (JSON)
  • typestringrequired

    Kind of account.

    mobile_moneybank
  • countrystringrequired

    ISO 3166-1 alpha-2.

  • currencystringrequired

    ISO 4217.

  • accountNumberstringrequired

    5–34 characters: the phone number for mobile money.

  • operatorstringoptional

    Operator code, for mobile money.

  • bankCodestringoptional

    Bank code, for bank accounts.

  • bankNamestringoptional

    Bank name, for bank accounts.

Request
curl -X POST "https://api.autopayke.com/api/v1/wallet/destinations/resolve-name" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mobile_money",
    "country": "KE",
    "currency": "KES",
    "accountNumber": "0712345678",
    "operator": "Safaricom"
  }'
Response200 application/json
{
  "ok": true,
  "data": {
    "accountName": "AMINA WANJIKU",
    "nameMatchStatus": "matched",
    "legalName": "Amina Wanjiku"
  }
}

Save a payout account

POST/api/v1/wallet/destinations
Bearer token 20 requests per 5 minutes per IP address.

Saves the account. Same body as checking the name, plus makeDefault.

Availability. Bank payouts (PesaLink) are built but not live yet: bank accounts can be saved, and usableForWithdrawals tells you whether one can be paid today.

Body (JSON)
  • typestringrequired

    Kind of account.

    mobile_moneybank
  • countrystringrequired

    ISO 3166-1 alpha-2.

  • currencystringrequired

    ISO 4217.

  • accountNumberstringrequired

    5–34 characters.

  • operatorstringoptional

    Operator code, for mobile money.

  • bankCodestringoptional

    Bank code, for bank accounts.

  • bankNamestringoptional

    Bank name, for bank accounts.

  • makeDefaultbooleanoptional

    Make this the default payout account.

Request
curl -X POST "https://api.autopayke.com/api/v1/wallet/destinations" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mobile_money",
    "country": "KE",
    "currency": "KES",
    "accountNumber": "0712345678",
    "operator": "Safaricom",
    "makeDefault": true
  }'
Response201 application/json
{
  "ok": true,
  "data": {
    "destination": {
      "id": "f1e2d3c4-b5a6-4789-8abc-def012345678",
      "type": "mobile_money",
      "country": "KE",
      "currency": "KES",
      "operator": "Safaricom",
      "bankCode": null,
      "bankName": null,
      "accountNumberLast4": "5678",
      "accountName": "AMINA WANJIKU",
      "nameMatchStatus": "matched",
      "isDefault": true,
      "usableForWithdrawals": true,
      "nickname": "My M-Pesa",
      "holderName": "Amina Wanjiku",
      "owner": "self",
      "lastUsedAt": "2026-11-01T16:20:00.000Z",
      "useCount": 12
    },
    "defaultRefused": false
  }
}
  • makeDefault is only honoured when the name on the account matches the account holder; defaultRefused tells you it wasn't.

Rename a payout account

PATCH/api/v1/wallet/destinations/{id}
Bearer token

Change the nickname, or correct the name on the account. Send at least one field.

Path parameters
  • idstringrequired

    The account id.

Body (JSON)
  • nicknamestring | nulloptional

    Up to 40 characters; null clears it.

  • holderNamestringoptional

    2–100 characters.

Request
curl -X PATCH "https://api.autopayke.com/api/v1/wallet/destinations/f1e2d3c4-b5a6-4789-8abc-def012345678" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nickname": "Shop M-Pesa"
  }'
Response200 application/json
{
  "ok": true,
  "data": {
    "id": "f1e2d3c4-b5a6-4789-8abc-def012345678",
    "type": "mobile_money",
    "country": "KE",
    "currency": "KES",
    "operator": "Safaricom",
    "bankCode": null,
    "bankName": null,
    "accountNumberLast4": "5678",
    "accountName": "AMINA WANJIKU",
    "nameMatchStatus": "matched",
    "isDefault": true,
    "usableForWithdrawals": true,
    "nickname": "Shop M-Pesa",
    "holderName": "Amina Wanjiku",
    "owner": "self",
    "lastUsedAt": "2026-11-01T16:20:00.000Z",
    "useCount": 12
  }
}

Make an account the default

POST/api/v1/wallet/destinations/{id}/default
Bearer token

The default account is preselected for withdrawals.

Path parameters
  • idstringrequired

    The account id.

Request
curl -X POST "https://api.autopayke.com/api/v1/wallet/destinations/f1e2d3c4-b5a6-4789-8abc-def012345678/default" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": {
    "id": "f1e2d3c4-b5a6-4789-8abc-def012345678",
    "type": "mobile_money",
    "country": "KE",
    "currency": "KES",
    "operator": "Safaricom",
    "bankCode": null,
    "bankName": null,
    "accountNumberLast4": "5678",
    "accountName": "AMINA WANJIKU",
    "nameMatchStatus": "matched",
    "isDefault": true,
    "usableForWithdrawals": true,
    "nickname": "My M-Pesa",
    "holderName": "Amina Wanjiku",
    "owner": "self",
    "lastUsedAt": "2026-11-01T16:20:00.000Z",
    "useCount": 12
  }
}

Delete a payout account

DEL/api/v1/wallet/destinations/{id}
Bearer token

Removes a saved account. Payments already made to it are not affected.

Path parameters
  • idstringrequired

    The account id.

Request
curl -X DELETE "https://api.autopayke.com/api/v1/wallet/destinations/f1e2d3c4-b5a6-4789-8abc-def012345678" \
  -H "Authorization: Bearer $AUTOPAYKE_TOKEN"
Response200 application/json
{
  "ok": true,
  "data": {
    "deleted": true
  }
}