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

# order.paid

Announces that an order was paid. The payload below goes in the `data` field of the [envelope](./overview.md#envelope), and follows the [payload conventions](./overview.md#payload-conventions).

## When it is sent

Once per order, when the order's first approved sale payment is recorded:

- Later payments of the same order do not send it again. Subscription renewals do not send it.
- A payment approved on an order that is already cancelled, expired, refunded or otherwise closed does not send it.
- A shipping charge alone does not send it.

The idempotency key is `order.paid:order:<order id>`.

## Payload

```json
{
  "order": {
    "id": "1001",
    "uuid": "9b2f6c1e-4a7d-4e8b-9f3a-2c5d8e1f0a42",
    "external_id": "ORD-1001",
    "status": "approved",
    "type": "internal",
    "recurring": false,
    "currency_id": "USD",
    "amount_in_cents": 2248,
    "tax_in_cents": 390,
    "gateway_type": "stripe",
    "payment_method": "card",
    "created_at": "2026-01-15T14:30:00Z"
  },
  "user": {
    "id": "501",
    "uuid": "3e7a1d2c-8b4f-4c6e-a9d1-7f2b5c8e0d13",
    "external_id": "USR-501",
    "email": "buyer@example.com",
    "name": "Jane Buyer",
    "billing_information": {
      "national_id": "20123456789",
      "national_id_type": "CUIT",
      "address_line_1": "Av. Example 123",
      "address_line_2": null,
      "city": "Buenos Aires",
      "state": "CABA",
      "country": "AR",
      "postal_code": "C1001",
      "other_information": null
    }
  },
  "products": [
    {
      "id": "2001",
      "type": "content",
      "amount_in_cents": 1349,
      "currency_id": "USD",
      "content": {
        "id": "301",
        "external_id": "9780000000001",
        "name": "An Example Book",
        "file_type": "epub"
      },
      "plan": null,
      "coupon": {
        "code": "WELCOME10",
        "discount_percentage": 10,
        "shipping_discount_percentage": null,
        "take_quantity": null,
        "pay_quantity": null
      }
    },
    {
      "id": "2002",
      "type": "content",
      "amount_in_cents": 899,
      "currency_id": "USD",
      "content": {
        "id": "302",
        "external_id": "9780000000002",
        "name": "Another Example Book",
        "file_type": "pdf"
      },
      "plan": null,
      "coupon": {
        "code": "WELCOME10",
        "discount_percentage": 10,
        "shipping_discount_percentage": null,
        "take_quantity": null,
        "pay_quantity": null
      }
    }
  ],
  "payments": [
    {
      "id": "4001",
      "product_id": "2001",
      "gateway_transaction_id": "pi_example_0001",
      "status": "approved",
      "sale_type": "retail",
      "recurring_cycle": null,
      "amount_in_cents": 1349,
      "tax_in_cents": 234,
      "tax_rate": 21,
      "sale_country": "AR",
      "sale_state": "CABA",
      "currency_id": "USD",
      "exchange_rate_to_usd": 1,
      "tenant_payout_in_cents": 1003,
      "payout_currency_id": "USD",
      "paid_at": "2026-01-15T14:30:00Z",
      "created_at": "2026-01-15T14:30:05Z"
    },
    {
      "id": "4002",
      "product_id": "2002",
      "gateway_transaction_id": "pi_example_0001",
      "status": "approved",
      "sale_type": "retail",
      "recurring_cycle": null,
      "amount_in_cents": 899,
      "tax_in_cents": 156,
      "tax_rate": 21,
      "sale_country": "AR",
      "sale_state": "CABA",
      "currency_id": "USD",
      "exchange_rate_to_usd": 1,
      "tenant_payout_in_cents": 669,
      "payout_currency_id": "USD",
      "paid_at": "2026-01-15T14:30:00Z",
      "created_at": "2026-01-15T14:30:05Z"
    }
  ]
}
```

:::info Tax in amounts
Every `amount_in_cents` includes tax, with the tax it carries in `tax_in_cents`: the order's, each product's and each payment's. In the example, the payment of `1349` includes `234` of tax.
:::

## `data.order`

| Field             | Type           | Description                                                                                                 |
| ----------------- | -------------- | ----------------------------------------------------------------------------------------------------------- |
| `id`              | string         | Order id.                                                                                                   |
| `uuid`            | string         | Order UUID.                                                                                                 |
| `external_id`     | string or null | Your own reference for the order.                                                                           |
| `status`          | string         | Always `approved` in this event.                                                                            |
| `type`            | string         | Order type: `internal` for a store checkout, `sale`, `permission`, `report` or `internal_report`.           |
| `recurring`       | boolean        | `true` when a product of the order bills again, such as a recurring subscription.                           |
| `currency_id`     | string or null | ISO 4217 currency code of the order.                                                                        |
| `amount_in_cents` | integer        | Order total, tax included.                                                                                  |
| `tax_in_cents`    | integer        | Tax included in the total.                                                                                  |
| `gateway_type`    | string         | Payment gateway that processed the order, for example `stripe`.                                             |
| `payment_method`  | string or null | Payment method as the gateway reports it. Set for Stripe, Mercado Pago and PayU, `null` for other gateways. |
| `created_at`      | string or null | ISO 8601 UTC time the order was created.                                                                    |

## `data.user`

| Field                 | Type           | Description                                                           |
| --------------------- | -------------- | --------------------------------------------------------------------- |
| `id`                  | string         | User id.                                                              |
| `uuid`                | string         | User UUID.                                                            |
| `external_id`         | string or null | Your own reference for the user.                                      |
| `email`               | string or null | User email address.                                                   |
| `name`                | string or null | User name.                                                            |
| `billing_information` | object or null | The billing details of the order, or `null` when the buyer gave none. |

`billing_information` has these fields, each a string or `null`: `national_id`, `national_id_type` (for example `CUIT`), `address_line_1`, `address_line_2`, `city`, `state`, `country`, `postal_code` and `other_information`.

## `data.products`

One item per line of the order, sorted by `id`. A line links the buyer to a content item (`type: content`) or to a plan (`type: subscription`).

| Field             | Type           | Description                                                                                                    |
| ----------------- | -------------- | -------------------------------------------------------------------------------------------------------------- |
| `id`              | string         | Line id. Payments reference it in `product_id`. This is not the catalog id: that is `content.id` or `plan.id`. |
| `type`            | string         | `content` or `subscription`.                                                                                   |
| `amount_in_cents` | integer        | Line amount, tax included.                                                                                     |
| `currency_id`     | string or null | ISO 4217 currency code of the line.                                                                            |
| `content`         | object or null | The content item, when `type` is `content`.                                                                    |
| `plan`            | object or null | The plan, when `type` is `subscription`.                                                                       |
| `coupon`          | object or null | The coupon applied to the line, or `null`.                                                                     |

`content`:

| Field         | Type           | Description                                                                         |
| ------------- | -------------- | ----------------------------------------------------------------------------------- |
| `id`          | string         | Content id, as in the [Content API](../rest-api-v3/content/content-v3-overview.md). |
| `external_id` | string or null | Your own reference for the content, such as an ISBN.                                |
| `name`        | string         | Content name.                                                                       |
| `file_type`   | string or null | File format, for example `epub` or `pdf`.                                           |

`plan`:

| Field         | Type           | Description                                      |
| ------------- | -------------- | ------------------------------------------------ |
| `id`          | string         | Plan id.                                         |
| `external_id` | string or null | Your own reference for the plan.                 |
| `type`        | string         | Plan type, for example `recurring` or `prepaid`. |
| `name`        | string or null | Plan name.                                       |

`coupon`:

| Field                          | Type            | Description                           |
| ------------------------------ | --------------- | ------------------------------------- |
| `code`                         | string          | Coupon code.                          |
| `discount_percentage`          | number or null  | Discount on the price, from 0 to 100. |
| `shipping_discount_percentage` | number or null  | Discount on shipping, from 0 to 100.  |
| `take_quantity`                | integer or null | For a "take X, pay Y" coupon, the X.  |
| `pay_quantity`                 | integer or null | For a "take X, pay Y" coupon, the Y.  |

## `data.payments`

The approved payments recorded by the charge that paid the order, sorted by `id`.

| Field                    | Type            | Description                                                                                                                                                                                                                |
| ------------------------ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                     | string          | Payment id.                                                                                                                                                                                                                |
| `product_id`             | string or null  | The `products[].id` this payment pays for. `null` on a shipping payment.                                                                                                                                                   |
| `gateway_transaction_id` | string or null  | Transaction id at the payment gateway. Payments of one charge can share it.                                                                                                                                                |
| `status`                 | string          | Always `approved` in this event.                                                                                                                                                                                           |
| `sale_type`              | string or null  | `retail`, `subscription`, `external`, `shipping` or `publica_one_redemption`. Nobody pays for a redemption, so its `amount_in_cents` is the issue's list price.                                                            |
| `recurring_cycle`        | integer or null | Billing cycle number of a recurring subscription payment, starting at 1. `null` for other payments.                                                                                                                        |
| `amount_in_cents`        | integer         | Payment amount, tax included.                                                                                                                                                                                              |
| `tax_in_cents`           | integer         | Tax included in `amount_in_cents`.                                                                                                                                                                                         |
| `tax_rate`               | number          | Tax rate as a percentage. It reads `0` when the gateway computed the tax (Stripe Tax), so rely on `tax_in_cents`.                                                                                                          |
| `sale_country`           | string or null  | ISO 3166-1 alpha-2 code of the country the sale is located in. It comes from the user's billing information when the payment was recorded, then from the payment gateway, then from the country your store signed up with. |
| `sale_state`             | string or null  | State or province of the sale, from the same source as `sale_country`. Usually a subdivision code without the country prefix, such as `B`, but it can be a name as the buyer entered it. Often `null`.                     |
| `currency_id`            | string or null  | ISO 4217 currency code of the payment.                                                                                                                                                                                     |
| `exchange_rate_to_usd`   | number or null  | USD per unit of `currency_id`, as recorded with the payment. Multiply an amount in `currency_id` by it to get USD. For example, `1.11` on a `EUR` payment means 1 EUR = 1.11 USD.                                          |
| `tenant_payout_in_cents` | integer or null | Amount that corresponds to your store.                                                                                                                                                                                     |
| `payout_currency_id`     | string          | ISO 4217 currency code of `tenant_payout_in_cents`.                                                                                                                                                                        |
| `paid_at`                | string          | ISO 8601 UTC charge date, as the gateway reported it.                                                                                                                                                                      |
| `created_at`             | string or null  | ISO 8601 UTC time the payment was recorded. It can be later than `paid_at`, for example when the gateway notified the payment late.                                                                                        |

## Related Documentation

- [Webhooks](./overview.md): Endpoints, request format, signature verification and delivery.
- [Orders API](../rest-api-v3/orders/orders-v3-overview.md): The order types and fields this event mirrors.
