Accounts
An account is one paybill, till or KopoKopo till your business can take money on. Every payment request names one by its id.
You add accounts in the dashboard with their Daraja or KopoKopo credentials; those stay encrypted and are never returned by the API. An account can also be a Mypayments paybill shared with your business (ownership: "platform"): customers pay it with account numbers issued to you.
Where's my account id?
On the account's page in the dashboard, under Use in the API, with a copy button. Or list them below with an
accounts:read key.List accounts
GET/api/v1/accounts
Scope accounts:read. Returns every account your business owns or has been granted.
# Paste your API key once (it starts with mpk_):
export MYPAYMENTS_KEY="mpk_your_key_here"
curl "https://api.mypayments.co.ke/api/v1/accounts" \
-H "Authorization: Bearer $MYPAYMENTS_KEY"json
{
"success": true,
"data": [
{
"uuid": "5e2989df-905b-40e9-a056-8251c2e34a37",
"name": "Main paybill",
"provider": "mpesa",
"kind": "paybill",
"environment": "production",
"shortcode": "4123456",
"status": "active",
"ownership": "tenant",
"has_credentials": true,
"has_payout_credentials": false,
"products": {
"stk": true,
"c2b": true,
"b2c": false,
"b2b": false
},
"c2b_registered_at": "2026-12-01T09:12:44Z",
"created_at": "2026-11-30T08:01:02Z"
}
]
}Get an account
GET/api/v1/accounts/{account_id}
# Paste your API key once (it starts with mpk_):
export MYPAYMENTS_KEY="mpk_your_key_here"
curl "https://api.mypayments.co.ke/api/v1/accounts/5e2989df-905b-40e9-a056-8251c2e34a37" \
-H "Authorization: Bearer $MYPAYMENTS_KEY"The account object
Fields
| Field | Type | Required | Description |
|---|---|---|---|
| uuid | string | No | The account id. Pass it as account in payment requests. |
| name | string | No | Your label for it. |
| provider | string | No | mpesa or kopokopo. |
| kind | string | No | paybill or till. |
| environment | string | No | production (real money) or sandbox (Daraja test money). |
| shortcode | string | No | The paybill or till number customers see. |
| status | string | No | active, or disabled: a disabled account starts no payments and declines new C2B payments. |
| ownership | string | No | tenant (yours) or platform (a Mypayments paybill shared with you). |
| products | object | No | What it may do: stk, c2b, b2c, b2b. B2C and B2B are off until switched on. |
| has_credentials | boolean | No | Its provider keys are set (values are never returned). |
| has_payout_credentials | boolean | No | An initiator for payouts and Transaction Status is set. |
| c2b_registered_at | string | No | When its C2B URLs were registered with Safaricom, if they were. |
| grant | object | No | Shared accounts only: allow_stk and allow_c2b for your business. |