# SMS Billing

The cost of sending an SMS depends on its length, which is determined by the type of characters used in the content. The system automatically selects the appropriate encoding (GSM-7 or Unicode), which directly affects the character limit in a single message.

The following rules comply with global GSM standards and apply to all shipments (both from the web app and via API).

### Standard Message (GSM-7 Encoding)

If your message consists exclusively of characters from the basic Latin alphabet, digits, and basic symbols, it is encoded in the cost-effective GSM-7 standard.

* Single SMS: **up to 160 characters**.
* Concatenated messages: Each subsequent segment (SMS) holds **153 characters** (the system reserves space for the message concatenation instruction).

#### Safe characters (counted as 1 character):

| Type        | Characters                                                        |
| ----------- | ----------------------------------------------------------------- |
| Letters     | A-Z, a-z                                                          |
| Digits      | 0-9                                                               |
| Symbols     | @ £ $ ¥ \_ ! " # % & ' ( ) \* + , - . / : ; < = > ? ¡ ¿ § ¤       |
| Greek/Other | Δ Φ Γ Λ Ω Π Ψ Σ Θ Ξ Ä ä Ö ö Ñ ñ Ü ü à ò ù å Å è é É ì ç Ø ø Æ æ ß |

{% hint style="warning" %}
**Note on extended characters (counted double)**&#x20;

The GSM-7 alphabet includes a set of characters that, although they do not switch encoding to Unicode, occupy 2 bytes. This means each of them takes up 2 characters from the available limit.

These are: `^`, `{`, `}`, `\`, `[`, `~`, `]`, `|`, `€`.
{% endhint %}

#### Billing Table (GSM-7):

| Character Count      | Billed as |
| -------------------- | --------- |
| 1–160 characters     | 1 SMS     |
| 161–306 characters   | 2 SMS     |
| 307–459 characters   | 3 SMS     |
| 460–612 characters   | 4 SMS     |
| 613–765 characters   | 5 SMS     |
| 766–918 characters   | 6 SMS     |
| 919–1071 characters  | 7 SMS     |
| 1072–1224 characters | 8 SMS     |
| 1225–1377 characters | 9 SMS     |

### Message with special characters (Unicode Encoding)

Using even a single character outside the GSM-7 table forces a change in the entire message encoding to Unicode (UCS-2). This is necessary for diacritics or emojis to render correctly on the recipient's phone.

**What triggers Unicode encoding?**

* Polish characters: `ą`, `ć`, `ę`, `ł`, `ń`, `ó`, `ś`, `ź`, `ż`.
* Other alphabets: Cyrillic (e.g. `Б`, `Д`, `Ж`), Hebrew, Arabic.
* Diacritics: Czech/Slovak (`č`, `ž`), French circumflex (`â`, `ô`), Spanish accents (`á`, `í`).
* Emoji: e.g. 🙂, 🔥, ❤️.

**Unicode Limits:**

* Single SMS: **up to 70 characters**.
* Concatenated messages: Each subsequent segment holds **67 characters**.

#### Billing Table (Unicode):

| Character Count    | Billed as |
| ------------------ | --------- |
| 1–70 characters    | 1 SMS     |
| 71–134 characters  | 2 SMS     |
| 135–201 characters | 3 SMS     |
| 202–268 characters | 4 SMS     |
| 269–335 characters | 5 SMS     |
| 336–402 characters | 6 SMS     |
| 403–469 characters | 7 SMS     |
| 470–536 characters | 8 SMS     |
| 537–603 characters | 9 SMS     |

{% hint style="info" %}

#### Impact of Personalization on Cost

If you use personalization tags (e.g. `##name##`), the final message length will vary for each recipient. This may result in part of the database being billed as 1 SMS and another part as 2 SMS messages.

Example: Suppose your template (with special characters) has 65 characters.

* For the name "Anna" (4 chars) – total 69 characters. Fits limit 70. ->  Cost: 1 SMS.
* For the name "Katherine" (9 chars) – total 74 characters. Exceeds limit 70. -> Cost: 2 SMS.

When planning a campaign, always leave a safe character margin, taking into account the longest data in your database (e.g. long surnames or city names).
{% endhint %}

{% hint style="success" %}
**Recommendation:** Before sending, always verify in our panel how the system counted the characters in your message. The character counter shows in real-time how many parts the SMS will consist of, helping you avoid unexpected costs.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.messageflow.com/sms/sms-billing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
