> ## Documentation Index
> Fetch the complete documentation index at: https://next-developers.opencard.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing

> The OpenCard Billing model — invoice recipient for your EMS account, and how organizations with the same billing_id roll up as one line on that invoice.

**Billing** is not about your end-clients paying their card bills. It is how **OpenCard invoices you** — the EMS — for platform usage.

A billing profile is the **invoice recipient** (legal entity, address, email, your reference) and the bucket organizations link to via `billing_id`. Organizations that share the same `billing_id` are **rolled up as one line** on your OpenCard invoice — not billed as separate invoices per organization.

***

## What it represents

| Concept                      | Meaning                                                               |
| ---------------------------- | --------------------------------------------------------------------- |
| **Who gets the invoice**     | Your finance team (`email_invoice`, legal name, org number)           |
| **Same `billing_id`**        | Those organizations’ usage appears as **one line** on the invoice     |
| **What it does not control** | Card issuer invoices to cardholders, webhooks, or transaction routing |

***

## How it fits

```
Account (you)
└── Billing profile
    ├── Organization A  ─┐
    ├── Organization B  ─┼─ same billing_id → one line on your OpenCard invoice
    └── Organization C  ─┘
```

Each organization still has its own webhooks, card holders, and transactions. Billing only controls **invoice recipient** and **how usage is aggregated onto a line** on the invoice OpenCard sends you.

***

## Common setups

| Your situation                                   | Billing setup                            |
| ------------------------------------------------ | ---------------------------------------- |
| One org per client, each as its own invoice line | One billing profile per organization     |
| Several orgs that should appear as a single line | One billing profile shared by those orgs |
| Large client with many orgs, one roll-up line    | One billing profile for all their orgs   |

***

## Key fields

| Field                     | Purpose                                                 |
| ------------------------- | ------------------------------------------------------- |
| `id`                      | Use as `billing_id` when creating organizations         |
| `name_legal`              | Legal entity on the OpenCard invoice                    |
| `organization_number`     | Company registration number                             |
| `email_invoice`           | Where OpenCard sends your invoice                       |
| `your_reference_invoice`  | Your PO or reference on the invoice                     |
| `product_transaction`     | Real-time transactions enabled for orgs on this billing |
| `product_digital_receipt` | Digital receipt enrichment                              |
| `product_aland_index`     | Environmental impact enrichment                         |

***

## Create and link

```
POST /accounts/{accountId}/billings          Scope: billings-write
POST /accounts/{accountId}/organizations     Set billing_id on create
```

```json theme={null}
{
  "name_legal": "Acme Expense Group AB",
  "organization_number": "5561234567",
  "country": "SE",
  "email_invoice": "finance@acme-ems.se",
  "your_reference_invoice": "PO-12345",
  "product_transaction": true,
  "product_digital_receipt": true,
  "product_aland_index": false
}
```

When creating an organization, set `"billing_id": 1` (or whichever profile applies). Multiple organizations with the **same** `billing_id` share **one line** on your OpenCard invoice.

Product flags are what the client chooses in onboarding (“transactions” vs optional enrichment). → [Customer onboarding](/ems/customer-onboarding)

<Note>
  Create billing during [client setup](/ems/customer-onboarding#phase-1--client-setup), together with the TPA. An optional [ocTPA plugin](/ems/plugins) collects the same fields — you still POST this API.
</Note>
