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

# Orders & Subscriptions

> Track every sale, subscription, and checkout — with tax already remitted and disputes handled as your Merchant of Record.

Every successful payment becomes an **order**. One-time purchases and recurring
subscriptions flow through the same record, because in Macropay both are just
**products** with different billing logic. As your Merchant of Record, we're the
legal seller on each order — so the sales tax and VAT you see attached has
already been calculated and remitted on your behalf, and you keep a clean,
auditable trail of every transaction.

<Info>
  Because Macropay is the seller of record, the tax line on an order isn't a
  number you owe — it's tax we collect and remit worldwide. Your liability stays
  bounded; the compliance work doesn't land on you.
</Info>

## Sales overview

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/overview.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=51c5d37ee56fcd9a1502b8ab833dedf7" width="3018" height="1706" data-path="assets/features/orders/overview.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/overview.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=16976c0e65a66bac42a498fa8e9430da" width="3012" height="1706" data-path="assets/features/orders/overview.dark.png" />

The **Sales** view is your running ledger: a paginated list of every order,
newest first. Scan revenue at a glance, then drill into any single sale for the
full breakdown.

## Anatomy of an order

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/detail.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=9bee96bff63817996f0dba1b0a9e059b" width="3586" height="2064" data-path="assets/features/orders/detail.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/detail.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=b87a85dc8b56ef7724189557803d6e87" width="3582" height="2062" data-path="assets/features/orders/detail.dark.png" />

Open any sale to see the metadata captured at the moment of purchase:

| Field          | What it tells you                               |
| -------------- | ----------------------------------------------- |
| **Amount**     | Gross value charged to the customer             |
| **Tax amount** | Sales tax / VAT we collected and remit for you  |
| **Invoices**   | The MoR invoice issued for this order           |
| **Customer**   | Buyer profile, plus their full purchase history |

Selecting the customer expands their basic details alongside every past order
they've placed — useful for support, refunds, or spotting repeat buyers.

<Tip>
  Building agent or usage-based products? Orders surface alongside the metered
  events and value receipts those products generate, so billed revenue and the
  underlying activity sit in one place. See
  [usage-based billing](/features/usage-based-billing/introduction) for how
  metered charges roll up into orders.
</Tip>

## Checkout sessions

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/checkouts.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=63e1239629ae82ea36e8a7e3f6da5ce3" width="3840" height="2403" data-path="assets/features/orders/checkouts.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/checkouts.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=e50e2155f6a31c1107f931b0dd50e069" width="3840" height="2403" data-path="assets/features/orders/checkouts.dark.png" />

Before an order exists, there's a **checkout session**. This view lists them all,
and you can filter by customer email, status, or product to find exactly the one
you need.

A session moves through four states:

<Steps>
  <Step title="Open">
    Created and waiting on the customer to enter payment details.
  </Step>

  <Step title="Confirmed">
    The customer hit **Pay** or **Subscribe** — payment is processing.
  </Step>

  <Step title="Succeeded">
    Payment cleared and an order was created.
  </Step>

  <Step title="Expired">
    The session timed out before completion. Spin up a fresh checkout to retry.
  </Step>
</Steps>

## Diagnosing failed payments

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/checkout.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=57f704ea085523ce66a14659f9280f3e" width="3840" height="2403" data-path="assets/features/orders/checkout.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/orders/checkout.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=4467655458b3e24a1cb5134a531fbd9a" width="3840" height="2403" data-path="assets/features/orders/checkout.dark.png" />

Click into any checkout to inspect its **payment attempts**. When a charge is
declined or fails, this is where you see exactly why — the decline reason, the
attempt history, and what the customer experienced.

<Note>
  Card data never touches your servers. Every attempt is tokenized in our PCI
  DSS Level 1 compliant vault, so you get the diagnostic detail without
  inheriting the PCI scope.
</Note>
