USSD
Stable

Session flow

How a session moves between the dialer, Sendexa and your backend.

Session lifecycle
  1. 1

    They dial your code

    Sendexa checks the code is active and paid for, takes one session from your bundle (or your wallet), and posts action: "start" to your backend URL.

  2. 2

    You show a screen

    You reply with ussdString and end: false. The dialer reads it and types an answer.

  3. 3

    They answer, you reply

    Each answer arrives as action: "continue" with userInput. Look up where they are by sessionId, then reply with the next screen. This repeats as many times as your menu needs.

  4. 4

    The session ends

    When you reply with end: true, the dialer sees your last message and the session is closed. If they hang up or stop answering, the network closes it instead; it shows as timed out in your sessions.

When your backend isn't called

Sendexa answers the dialer itself, and records the attempt in your sessions, when:

  • the code is suspended for an unpaid renewal, or disabled: "This service is currently unavailable."
  • your bundle and prepaid sessions are used up and your wallet can't pay for the session: the same message;
  • no backend URL is set yet: "This service is being set up."
Billing

One dial is one session, however many screens it has. Each session comes out of your monthly bundle first, then your prepaid sessions, then your wallet at the per-session price. You can see which on every session.