Skip to content

Retrieve a checkout ​

Reads one checkout, including whether it is paid. Call this before you fulfill. See Confirming a payment.

GET /v1/payments/merchant/checkouts/{id}

Headers ​

HeaderRequired
AuthorizationYesBearer mkp_…

Path ​

Parameter
idcs_ke_… or cs_ug_…, then 24 hex characters

An id with another shape returns 400 before a lookup.

Example ​

sh
curl https://payments-ke-staging.salimia.me/v1/payments/merchant/checkouts/cs_ke_3f9a1c7e5b2d4a8e6c0b91d7 \
  -H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"
js
const res = await fetch(`${process.env.MOOKHPAY_API}/checkouts/${id}`, {
  headers: { Authorization: `Bearer ${process.env.MOOKHPAY_SECRET_KEY}` },
});
const { data } = await res.json();
python
requests.get(
    f"{os.environ['MOOKHPAY_API']}/checkouts/{checkout_id}",
    headers={"Authorization": f"Bearer {os.environ['MOOKHPAY_SECRET_KEY']}"},
)

Response ​

200 OK. A completed checkout:

json
{
  "ok": true,
  "description": "Checkout",
  "data": {
    "id": "cs_ke_3f9a1c7e5b2d4a8e6c0b91d7",
    "url": "https://…/checkout/cs_ke_3f9a1c7e5b2d4a8e6c0b91d7",
    "status": "completed",
    "amount": "150000",
    "currency": "KES",
    "reference": "order-1042",
    "description": "2× Latte, 1× Mandazi",
    "return_url": "https://yourshop.example/paid",
    "expires_at": "2026-09-30T09:30:00.000Z",
    "created_at": "2026-09-30T09:00:00.000Z",
    "payment": {
      "intent_id": "pi_8c1e4f0a7b3d92e5a6f01c48",
      "status": "completed",
      "amount_settled": "150000",
      "provider_receipt": "…",
      "phone": "254712345678"
    }
  }
}

Errors ​

HTTPCodeWhen
4001701id is not a checkout id
4012781Missing, malformed, unknown, or revoked key
4042783No checkout for your key. Another merchant's id returns the same 404
4291804More than 120 requests in one minute
5032782The key service did not answer. Retry

Staging documentation. Staging charges real money. See Environments.