POST
/
api
/
v1
/
pay
/
ussd-charge
curl --request POST \
  --url https://adapter.cepta.co/api/v1/pay/ussd-charge \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: <api-key>' \
  --header 'X-Access-Signature: <api-key>' \
  --header 'X-Access-Ts: <api-key>' \
  --data '{
  "transactionRef": "<string>",
  "customerEmail": "<string>",
  "amount": 123,
  "currency": "<string>",
  "bankAccount": "<string>",
  "phoneNumber": "<string>",
  "fullName": "<string>"
}'
{
  "status": true,
  "message": "<string>",
  "data": {
    "transactionRef": "<string>",
    "ussdCode": "<string>",
    "amount": 123,
    "responseCode": "<string>",
    "paymentId": "<string>"
  }
}

Authorizations

X-Access-Key
string
header
required

Access key from Dashboard

X-Access-Signature
string
header
required

HMAC-SHA256 signature (hex lowercase)

X-Access-Ts
string
header
required

Unix timestamp in seconds (UTC) as a string

Body

transactionRef
string
required

Unique reference for this transaction (alphanumeric, hyphens, underscores, spaces)

customerEmail
string
required

Email address of the customer

amount
number
required

Amount to charge the customer (must be greater than 0)

currency
string | null

Currency code. Must be "KES"

bankAccount
string | null

Mobile money channel code: 63902 (M-PESA), 63903 (Airtel Money), 63907 (T-KASH), 0 (SasaPay)

phoneNumber
string | null

Customer phone number in 254XXXXXXXXX format

fullName
string | null

Full name of the customer (optional)

Response

200
text/plain
Success
status
boolean

Indicates if the STK Push was successfully dispatched

message
string | null

Descriptive message (e.g., "MPESA STK sent. Enter your PIN")

data
object