400.002.05Daraja API errorM-Pesa error 400.002.05: Invalid request payload
This is a Daraja API error — Safaricom rejects the request itself, before any customer prompt, usually over authentication or payload validation.
What causes it
The request payload is structurally invalid or missing required fields, so Daraja returns HTTP 400 before processing.
How to fix it
Validate the JSON schema and required parameters against the endpoint spec before sending.
How paylod handles this
paylod manages Daraja OAuth tokens, request signing, and payload formatting for you — the whole class of authentication and malformed-request errors is handled by the wrapper, so you send one clean REST call and get a typed response.
See the paylod M-Pesa API