> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gateway.connexease.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing & Pricing

> Connexease and Meta fee model, billing triggers, and pricing table.

The Connexease Gateway applies two separate fees per message: a flat infrastructure fee charged on every successful send, and a variable Meta fee charged only when a template message is confirmed as delivered. Understanding when each fee is triggered — and how to monitor your balance proactively — helps you avoid unexpected campaign interruptions. This page explains the full billing lifecycle, the 24-hour metadata window, and the current pricing table by country and conversation category.

## Fee Structure

Each message can incur two separate fees, deducted at different points in the message lifecycle:

| Fee                           | Amount                           | When Deducted          | Applies To             |
| ----------------------------- | -------------------------------- | ---------------------- | ---------------------- |
| Connexease Infrastructure Fee | \$0.001 (flat)                   | On successful API send | All messages           |
| Meta Template Fee             | Varies by country + category (€) | On confirmed delivery  | Template messages only |

***

## Billing Triggers

### 1. Connexease Fee — On Send

When your API call returns HTTP 200, \$0.001 is immediately deducted from your balance. This fee is independent of whether the message reaches the recipient.

```mermaid theme={null}
flowchart LR
    A[Your Server] --> B[Connexease Gateway]
    B --> C[Meta]
    C --> B
    B --> A
    B --> D[(Balance -$0.001)]
```

This fee applies to **all** successful sends: text, image, audio, document, template, and interactive messages.

### 2. Meta Template Fee — On Delivery

Applies to **template messages only**. The fee is deducted when Meta sends a webhook with `status: "delivered"` and `pricing.billable: true`.

```mermaid theme={null}
flowchart LR
    M[Meta] -->|delivered webhook| G[Connexease Gateway]
    G --> B[(Balance - Meta fee)]
    G --> Y[Your Server]
```

The fee amount depends on:

* **Recipient's country** (derived from the phone number's country code)
* **Conversation category** (`marketing`, `utility`, `authentication`, `service`)

<Note>
  **Non-template (session) messages** do not incur a Meta fee. Only the Connexease flat fee is charged.
</Note>

### Free Tier (billable: false)

When the delivery webhook contains `pricing.billable: false`, no Meta fee is deducted. This applies to conversations that Meta has designated as free (e.g. conversations initiated from Click-to-WhatsApp ads).

***

## Balance Check

The Gateway checks your balance **before** forwarding any message to Meta. If the balance is ≤ 0, the request is rejected immediately:

```json theme={null}
{
  "isSuccess": false,
  "errors": {
    "code": "BILL_001",
    "group": "PAYMENT_REQUIRED",
    "description": "Insufficient balance. Please top up your account to continue sending messages."
  }
}
```

<Warning>
  When you receive `BILL_001`, **immediately pause** any active campaigns. We recommend setting up balance alerts in [Dashboard](https://gateway.connexease.com) → Billing → Balance Alerts before this happens.
</Warning>

***

## Template Billing Window (24 Hours)

When a template message is successfully sent, the Gateway stores billing metadata (billing account, country, category) keyed by the `wamid` in Redis with a **24-hour TTL**.

```mermaid theme={null}
flowchart TD
    A[Template sent → wamid stored] --> B{Delivery within 24h?}
    B -->|Yes| C[Meta fee deducted]
    B -->|No - TTL expired| D[No Meta fee charged]
```

When the delivery webhook arrives, the Gateway:

1. Fetches and **atomically deletes** the metadata by `wamid` (prevents double-billing).
2. Calculates the Meta fee from the pricing table.
3. Deducts the fee from your balance.

If delivery confirmation does not arrive within 24 hours (TTL expires), the metadata is dropped and no Meta fee is charged for that message.

***

## Template Conversation Categories

| Category         | Description                                | Example                             |
| ---------------- | ------------------------------------------ | ----------------------------------- |
| `marketing`      | Promotions, campaigns, newsletters         | "Get 30% off this week!"            |
| `utility`        | Transactional alerts, order updates        | "Your order has shipped"            |
| `authentication` | OTP, login verification                    | "Your verification code: 847291"    |
| `service`        | Customer service within the 24-hour window | Free-form reply within open session |

***

## Sample Pricing Table (effective January 1, 2026)

All Meta fees are denominated in **Euro (€)**.

| Country             | Marketing | Utility | Authentication |
| ------------------- | --------- | ------- | -------------- |
| Turkey (TR)         | €0.0128   | €0.0048 | €0.0192        |
| Germany (DE)        | €0.1323   | €0.0550 | €0.0880        |
| United States (US)  | €0.0250   | €0.0050 | €0.0350        |
| India (IN)          | €0.0110   | €0.0014 | €0.0190        |
| Brazil (BR)         | €0.0625   | €0.0150 | €0.0450        |
| United Kingdom (GB) | €0.0841   | €0.0350 | €0.0560        |
| France (FR)         | €0.1323   | €0.0550 | €0.0880        |
| Other (default)     | €0.0400   | €0.0200 | €0.0300        |

<Note>
  The full pricing table for all 30+ markets is available in [Dashboard](https://gateway.connexease.com) → Billing → Pricing.
</Note>

***

## Total Cost Example

Sending a `utility` template to a user in Turkey (+90):

| Step                           | Action                         | Balance Change |
| ------------------------------ | ------------------------------ | -------------- |
| Start                          | —                              | \$5.000        |
| API call successful (HTTP 200) | -\$0.001 Connexease fee        | \$4.999        |
| `delivered` webhook received   | -€0.0048 Meta fee (\~\$0.0052) | \~\$4.994      |

***

## Recommendations

<Tip>
  For high-volume campaigns, estimate total cost before starting and pre-load your wallet with sufficient balance.
</Tip>

<Tip>
  Use `is_fake=true` during development and testing. The billing pipeline runs (balance check) but no fee is deducted and the Meta API is not called.
</Tip>
