USSD Session Webhook
The USSD API sendsPOST requests to your configured endpoint for each stage of a USSD session. Your endpoint should parse the payload and return a JSON response that tells the network whether to continue or end the session.
Overview
The USSD session follows three stages:- Begin: Starts a new session.
- Continue: Sends user input during an active session.
- End: Closes the session and displays a final response.
Endpoint Setup
Provide a publicly reachablePOST URL that can:
- Receive JSON payloads for
beginandcontinueevents. - Return JSON responses in the expected format.
- Handle optional
backenddata when provided by the network/backend.
Request Format
Begin Request
Continue Request
Response Format
Continue Response (Prompt User for More Input)
Use this response when you want the session to remain active.End Response (Close Session)
Use this response when the interaction is complete.Field Descriptions
Common Fields
string
required
Subscriber phone number (for example,
2348099999999).string
required
Mobile network name. Expected values include
9mobile, mtn, glo, and airtel.string
required
USSD shortcode used for the session (for example,
123).string
required
Current USSD input/message content.
Session Fields
number
required
Session stage code (
2 = begin, 3 = continue, 4 = end).string
required
Session stage name (
begin, continue, end).number
UI mode code (
0 = none, 1 = input, 2 = dialog).string
UI mode name (
none, input, dialog).Optional Backend Fields
object
Optional backend payload. This may vary by telco/network integration and can be omitted in responses.
object
USSD backend body information.
object
USSD backend header information.
Status Fields
number
Request status code (for example,
200).string
Request status message (for example,
OK).Best Practices
- Return only valid JSON in the expected shape.
- Keep responses short and fast to avoid session timeout.
- Treat
backendas optional and parse defensively. - Log
msisdn,session.type, andtextfor troubleshooting.

