400.008.02Daraja API errorM-Pesa error 400.008.02: Invalid phone number
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 PhoneNumber/PartyA value is not a valid Safaricom MSISDN in the required 2547XXXXXXXX international format.
How to fix it
Normalize the phone number to the 12-digit 2547XXXXXXXX format 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