Skip to main content
You are billed per segment, not per message. A long message is several segments, and which encoding it uses decides how many.

The numbers

Taken from the gateway’s own constants, not from the specification in general:
The concatenation header costs you the difference — 7 characters in GSM-7, 3 in UCS-2 — out of every segment, which is why 160 becomes 153 rather than staying 160.Internally these are byte limits: 140 bytes single, 134 bytes per segment. GSM-7 packs seven bits per character, UCS-2 uses two bytes each.
A message may be at most 255 segments.

The character that doubles your bill

One non-GSM-7 character forces the whole message to UCS-2, and the capacity drops from 160 to 70. A 150-character message that cost one segment now costs three. The usual culprits, all invisible when you look at the text:
Smart quotes are the commonest cause of an unexplained tripling in cost. Text pasted from a document, a CMS, or a chat client routinely carries ’ instead of ', and nothing in the send path flags it — the message goes out correctly, just three times more expensively.Normalise punctuation before sending if your content comes from anywhere a human typed it.

Check the price before you send

/secure/rate returns the segment count without sending anything:
submit_sm_count is the segment count. It costs nothing, sends nothing, and counts against no rate limit — so it is reasonable to call it on user-generated content before committing to a send.

Setting the encoding yourself

coding maps to SMPP data_coding and is passed to the carrier unchanged, so it chooses how the body is encoded, not merely how it is counted. Anything else in 0–14 is accepted and decoded as UTF-8. 15 and above is a 400.

What a customer sees when it goes wrong

A message split into segments arrives as one message on a modern handset, because the concatenation header tells it how to reassemble. Two failure modes are worth knowing:
  • Segments arriving out of order or incomplete show as separate messages, often with visible fragments of header. That is a carrier problem, not an encoding one.
  • A partly-delivered long message is reported FAILED, not partly delivered — resolution waits for the last segment and reports the worst outcome. That is the honest answer, and it moves delivery rates down relative to gateways that report the first segment.

Concatenation

How segments are reassembled, and what that costs.

Price a message

Every field on /secure/rate.