Request log
Scope: logs:read. Live and sandbox, each showing its own mode's calls.
Every call you make is recorded for thirty days: what we received, what we answered, how long it took, and the error code if there was one. It is the answer to the question you cannot answer from your own side — what did PamoPay actually get?
GET /v1/logs
Newest first. Query: limit (1–100, default 25), starting_after (a request id).
json
{
"id": "req_9f3b2c1d4e5f6a7b8c9d0e1f",
"object": "request",
"livemode": true,
"method": "POST",
"path": "/v1/charges",
"status": 409,
"latency_ms": 84,
"fault": "IDEMPOTENT_MISMATCH",
"key_last4": "7Fk2",
"request_body": "{\"amount_minor\":1500000,\"rail\":\"mpesa\",\"msisdn\":\"+2557…\"}",
"response_body": "{\"error\":{\"code\":\"IDEMPOTENT_MISMATCH\",\"doc\":\"…\"}}",
"user_agent": "node-fetch/1.0",
"created": 1758013442
}fault is null on a 2xx. Every other value has a page at https://docs.pamopay.co/errors/<CODE> — the same URL the failing response carried as doc.
GET /v1/logs/{id}
One entry, by the id its response carried in the PamoPay-Request-Id header. Quote that id to us and it can be answered by a lookup rather than a search through timestamps.
What is recorded, and what is not
- Bodies, as sent and as answered, clipped to 4 kB each. Long enough for every request this API takes.
- Headers are never stored, in any form. That includes your key.
- A webhook signing secret is redacted.
POST /v1/webhook_endpointsreturns awhsec_in the clear once; in the log it readswhsec_***. - A payer's number is kept. It is already in your charge list, and it is the field most often wrong in a refused request.
Refusals are logged too
A key that was retired this morning, a live key sent to the sandbox, a call over the rate limit — all of them appear, with the code that was returned. That is deliberate: those are the failures you cannot see from your own logs, because from your side they all look like a 4xx with no context.
A key we do not recognise at all is logged nowhere. There is no row to file it under, and a log of other people's typos is not yours to read.
Kept for thirty days
Then swept. Export anything you need to keep.