# From contract to payment

> A complete, step-by-step walkthrough of Acme AI's monthly contract.

Source: https://app.relvoerp.com/docs/product/en/contract-to-payment/

This page follows **one full month** of a real contract from start to finish. If you read only one page before setting up your organization, make it this one.

Acme AI has a contract in force throughout 2026, in USD, billed monthly in arrears, with 30-day payment terms and a purchase order (OC, *orden de compra*) requirement.

**January walkthrough:** 8,420 conversations → Billable metric → Tiered price → Pre-invoice → OC → Invoice → Payment

## 1 · The contract defines what is charged

Acme's contract has two charges:

| Charge | Type | Price | Timing |
| --- | --- | --- | --- |
| Platform | Fixed | USD 1,000 / month | In advance |
| AI conversations | Usage | Tiered: 1,000 included · then 0.10 · above 5,000, 0.07 | In arrears |

Neither price lives in the catalog: they live in **this** contract. The same service can cost another customer something different without touching anything here.

## 2 · Usage comes in during the month

Each conversation arrives as a **usage event** with its time of occurrence and its unique identifier. Events are immutable: if one arrived wrong, it is corrected with a correction event, never by editing the original.

If the same event arrives twice, it is not billed twice. That is why every submission carries its own identifier.

## 3 · The metric turns events into a quantity

The contract does not bill "events": it bills the quantity produced by the **billable metric**. For Acme, the metric counts conversations in the period. In January: **8,420**.

> **Key rule: Metric and price are separate decisions**
>
> The metric answers *how much was used*; the pricing model answers *how much that costs*. Changing the price of conversations does not change how many there were, and that measured usage remains queryable even if the price changes later.

## 4 · The period closes and the charge calculation runs

When January closes, Relvo calculates the period's charge calculation: it applies the price to the quantity, adds the fixed charge and totals it.

**Example: January charge calculation**

| Item | Calculation | Amount |
| --- | ---: | ---: |
| First 1,000 conversations | included | USD 0.00 |
| Next 4,000 | 4,000 × USD 0.10 | USD 400.00 |
| Remaining 3,420 | 3,420 × USD 0.07 | USD 239.40 |
| Platform subscription | monthly | USD 1,000.00 |
| **Total** |  | **USD 1,639.40** |

A charge calculation is **not** an invoice: it has no tax effect and can be recalculated. If late January usage arrives before issuance, the charge calculation is recalculated and reflects the correct total. This is the cheap moment to correct.

## 5 · The pre-invoice seeks approval

Acme requires a purchase order, so the charge calculation is shared as a **pre-invoice**: the same detail, with no tax validity, so the customer can validate it and issue its OC.

Until the OC arrives, issuance stays blocked. This is not a failure: it is the contract's invoicing condition doing its job. Once the evidence is recorded, the block lifts.

## 6 · The invoice is issued

With the approval in hand, the charge calculation becomes an invoice and is sent to the tax authority. From that moment the document **can no longer be edited**.

Its status stops being a single value and becomes four, independent of one another:

| Axis | At issuance | Shortly after |
| --- | --- | --- |
| Lifecycle | `open` | `open` |
| Fiscal status | `pending` | `accepted` |
| Delivery | `send_requested` | `delivered` |
| Payment | `unpaid` | `unpaid` |

With 30-day terms, the due date is set by the customer's billing link.

## 7 · The document reaches the customer

Relvo sends the invoice to the contact with the billing role, and the XML to the XML email contact if the customer asks for it separately. *Sent* and *delivered* are two different things: the delivery axis records both, which is what lets you answer with evidence when a customer says they never received it.

If the email bounces permanently, the address is suppressed and stops receiving: continuing to send to a dead mailbox degrades the domain's reputation for every other customer.

## 8 · Payment arrives and is reconciled

Acme pays USD 1,000 on the 20th and the balance the following week.

| Moment | Payment axis | Balance |
| --- | --- | --- |
| After the first payment | `partially_paid` | USD 639.40 |
| After the second | `paid` | USD 0.00 |

The bank movement is reconciled against the invoice. Relvo proposes the match; confirmation is human when there is ambiguity, because applying a payment to the wrong document costs more than reviewing it.

> **Shortcut: “Overdue” was never a status anyone wrote**
>
> If Acme had not paid, the invoice would appear as overdue without anything marking it: it is derived from the due date and the balance. That is why, the instant the payment comes in, it stops being overdue — without anyone having to remember to update a column.

## What was recorded

At the end of the walkthrough, every unit of currency charged has full traceability: which events originated it, which metric counted them, which price tier applied, which approval authorized it, which tax document formalized it and which bank movement settled it.

- [Charges and pricing](https://app.relvoerp.com/docs/product/en/pricing.md): The six pricing models and how each one calculates.
- [Usage and billable metrics](https://app.relvoerp.com/docs/product/en/usage-billing.md): How usage comes in and how it becomes a billable quantity.
- [Charge calculations, pre-invoices and invoices](https://app.relvoerp.com/docs/product/en/invoicing-collections.md): The four status axes of an invoice, in detail.
- [Onboarding](https://app.relvoerp.com/docs/product/en/onboarding.md): What to configure, and in what order, to reach this walkthrough.
