# How WhatsApp messaging works (/docs/whatsapp/how-it-works)

> The WhatsApp rules every business works within, including the 24-hour window, template categories, who charges what, quality rating, messaging limits, and opt-outs.

WhatsApp sets a few rules for every business. Knowing them explains most failed messages.

## The 24-hour customer service window [#the-24-hour-customer-service-window]

The customer opens the window by messaging you. It stays open for 24 hours after their last message.

|                                         | Inside the window                                       | Outside the window                                              |
| --------------------------------------- | ------------------------------------------------------- | --------------------------------------------------------------- |
| **Who can start**                       | The customer already wrote to you                       | Only you, with a template                                       |
| **What you and the agent can send**     | Anything: text, photos, documents, voice notes, buttons | Only an approved [template](/docs/whatsapp/templates)           |
| **What happens to a free-form message** | It is sent                                              | It fails with error [131047](/docs/whatsapp/error-codes#131047) |

So every new chat and every [broadcast](/docs/whatsapp/broadcasts) starts with a template. The [chat inbox](/docs/whatsapp/inbox) shows how long the window has left.

## Templates and their categories [#templates-and-their-categories]

A template is a message Meta approves before you can send it. Each has one category:

* **Marketing**: offers, announcements, and re-engagement.
* **Utility**: updates about something the customer asked for, like orders, bookings, or reminders.
* **Authentication**: one-time codes that confirm who the customer is.

Examples: [Template categories](/docs/whatsapp/templates#template-categories).

## Who charges what [#who-charges-what]

Two separate charges:

* **Meta** charges your WhatsApp Business account for each template it delivers, by category and country. Replies inside the 24-hour window are free from Meta. On Twilio or Interakt, that provider bills you for it instead.
* **OmniDimension** charges a small flat amount from your wallet for each message you send: agent replies, team replies, templates and broadcasts. Messages you receive are free. Voice note replies are an add-on, charged by length.

Rates: [our pricing](/docs/pricing) and [Meta's pricing](https://developers.facebook.com/docs/whatsapp/pricing?utm_source=omnidim\&utm_medium=docs).

## Quality rating and messaging limits [#quality-rating-and-messaging-limits]

Each number has a **quality rating** (High, Medium or Low) based on how customers react to your messages. Blocks and reports lower it.

The **messaging limit** is how many customers you can start chats with in 24 hours. Replies to customers who wrote first don't count. Meta raises it after business verification and steady sending, and can pause a number whose rating stays low.

You can see both on a number's [Insights](/docs/whatsapp/insights) page.

## Opt-outs [#opt-outs]

A customer stops your messages in one of two ways:

* **They reply STOP** (or UNSUBSCRIBE, or OPT OUT). They get one short confirmation, and templates and broadcasts skip them from then on. Their next message to you, an hour or more later, opts them back in. You can turn this off per number under [Customers who opted out](/docs/whatsapp/number-settings#customers-who-opted-out), which also lists who opted out.
* **They turn off marketing in WhatsApp.** Marketing templates to them fail with [131050](/docs/whatsapp/error-codes#131050). Utility and authentication messages still go through.

In a broadcast, both show as **Opted out**. You can still reply if they message you, but you can't start a new chat with them.