POST /v4/collections

Like every V4 call, this endpoint family expects the three auth factors: a Bearer token (Authorization: Bearer …), a whitelisted source IP, and the per-request RSA signature headers (X-PP-Signature, X-PP-Nonce, X-PP-Timestamp). See Request Signing.

This is a money-movement endpoint: the Idempotency-Key header is mandatory. A missing key is rejected with 400 missing_idempotency_key. See Idempotency.

Initiates a C2B M-Pesa STK push to the customer's phone. The call records a pending collection intent and fires the rail push — money is not posted here; it posts to your wallet when the rail confirms (see Collection Lifecycle).

Request body
FieldTypeDescription
account_nostringYour receiving account, e.g. ACC-1001.
phonestringCustomer phone, e.g. 2547XXXXXXXX.
amount_minorintegerAmount in minor units (KES 250.00 → 25000). Min 1.
currencystringISO-4217, 3 letters.
channelstringRail — mpesa.
referencestringYour unique reference for this collection.
Example
curl -X POST https://v4api.pokeapay.com/api/v4/collections \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0d6c1f2e-…" \
  -H "X-PP-Signature: $SIG" -H "X-PP-Nonce: $NONCE" -H "X-PP-Timestamp: $TS" \
  -d '{
    "account_no": "ACC-1001",
    "phone": "254712345678",
    "amount_minor": 25000,
    "currency": "KES",
    "channel": "mpesa",
    "reference": "INV-2026-0042"
  }'
Response — 202 Accepted
{
  "status": "pending",
  "reference": "INV-2026-0042",
  "rail_reference": "ws_CO_21072026…",
  "amount_minor": 25000,
  "currency": "KES"
}

Idempotent by reference: re-submitting an existing reference returns the current state of that collection (202) instead of creating a duplicate push.