curl --request POST \
--url https://example.com/callback \
--header 'Content-Type: application/json' \
--data '
{
"command": "initiate",
"msisdn": "255762089337",
"session_id": "4574",
"operator": "vodacom",
"payload": {
"request_id": 0,
"response": 0
}
}
'{
"msisdn": "2556730893370",
"operator": "vodacom",
"session_id": "33545",
"command": "continue",
"payload": {
"request_id": "1",
"request": "enter amount"
}
}API Reference
Receive USSD session callback
Webhook your application must implement. When a subscriber dials your USSD code, Beem POSTs session events (initiate, continue, terminate) to the callback URL configured in the Beem dashboard. Respond with the next menu prompt. Replace the server URL with your own HTTPS endpoint.
POST
/
callback
curl --request POST \
--url https://example.com/callback \
--header 'Content-Type: application/json' \
--data '
{
"command": "initiate",
"msisdn": "255762089337",
"session_id": "4574",
"operator": "vodacom",
"payload": {
"request_id": 0,
"response": 0
}
}
'{
"msisdn": "2556730893370",
"operator": "vodacom",
"session_id": "33545",
"command": "continue",
"payload": {
"request_id": "1",
"request": "enter amount"
}
}Body
application/json
Response
200 - application/json
Return the next USSD menu or session termination prompt
