USSD
Stable

Response format

Reply to every request with the screen to show, and whether the session carries on.

200 OK
application/json

Show a screen and wait for their answer.

JSON
{
"ussdString": "Welcome to JustBuy\n1. Track my order\n2. Pay for an order\n3. Talk to us",
"end": false
}

Fields

FieldTypeRequiredDescription
ussdStringstring
required
What the dialer sees. Use \n for new lines.
endbooleanoptionaltrue on the last screen. Leave it out or set false to wait for another answer.

Earlier integrations that send message instead of ussdString, or shouldClose: true instead of end: true, keep working.

When something goes wrong

If your server takes longer than 8 seconds, returns anything other than 200, or replies without ussdString, the dialer sees "Service error. Please try again later." and the session is marked failed in USSD → Sessions, with the reason.

Best practices

  • Keep each screen under about 160 characters so it fits on every phone.
  • Number your options (1, 2, 3…) and offer 0 to go back on confirm screens.
  • Avoid emoji and accented characters; older handsets can't show them.