API Reference
Complete reference for all Pesastream API endpoints
POST
/chargeInitiate an M-Pesa payment charge
Parameters
amount - number - Amount in KES
currency - string - ISO currency code
phone - string - Phone number with country code
description - string (optional) - Transaction description
Response
transactionId - string
status - string (pending, completed, failed)
amount - number
GET
/transaction/:idRetrieve transaction details and status
Parameters
id - string - Transaction ID from charge response
Response
id - string
status - string
amount - number
phone - string
createdAt - ISO timestamp
POST
/payoutSend M-Pesa payout to a beneficiary
Parameters
amount - number - Amount to send
phone - string - Recipient phone number
reference - string - Unique reference identifier
Response
payoutId - string
status - string
amount - number
GET
/balanceGet your account balance
Response
balance - number
currency - string
lastUpdated - ISO timestamp