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

# Orders API — List, Retrieve, Create, and Manage Orders

> REST API for Nova.Pay orders. List orders with filters, retrieve order details, create orders programmatically, and register external payments.

The Orders API lets you list and filter orders in your Nova.Pay account, retrieve the full details of a single order, create new orders programmatically, and register external payments against existing orders. All endpoints are relative to the base URL `https://pay.nova.money/api/v1`.

***

## List orders

<Note>
  This endpoint requires an API key passed in the request headers.
</Note>

Retrieve a paginated list of orders. You can narrow results with date ranges, status filters, a free-text search, and more.

```text theme={null}
GET /orders
```

### Query parameters

<ParamField query="initial_date" type="date">
  Start of the date range filter (inclusive). Use `YYYY-MM-DD` format.
</ParamField>

<ParamField query="final_date" type="date">
  End of the date range filter (inclusive). Use `YYYY-MM-DD` format.
</ParamField>

<ParamField query="period_date_filter" type="string">
  The date field to apply the `initial_date`/`final_date` range against (e.g., `created_at`, `paid_at`).
</ParamField>

<ParamField query="page" type="integer">
  Page number for pagination. Defaults to `1`.
</ParamField>

<ParamField query="limit" type="integer">
  Number of orders to return per page. Maximum value is `100`.
</ParamField>

<ParamField query="q" type="string">
  Free-text search string. Matches against customer name, email, order ID, and other indexed fields.
</ParamField>

<ParamField query="cart_page_uuids" type="array of uuid strings">
  Filter by one or more cart page UUIDs.
</ParamField>

<ParamField query="company_ids" type="array of integers">
  Filter by one or more company IDs.
</ParamField>

<ParamField query="status" type="array of strings">
  Filter by order status. Accepted values:

  `pending` `waiting_payment` `partially_paid` `paid` `cancelled` `partially_refunded` `refunded` `billed`
</ParamField>

<ParamField query="meta" type="array of strings">
  Filter by metadata key-value pairs attached to orders.
</ParamField>

### Response — `OrdersIndex`

```json theme={null}
{
  "meta": {
    "current_page": 1,
    "total_pages": 4,
    "total_count": 87,
    "per_page": 25
  },
  "data": [ /* array of OrderData */ ]
}
```

***

## Retrieve an order

<Note>
  This endpoint requires an API key passed in the request headers.
</Note>

Fetch the complete details of a single order by its numeric ID.

```text theme={null}
GET /orders/{id}
```

### Path parameters

<ParamField path="id" type="integer" required>
  The numeric ID of the order to retrieve.
</ParamField>

### Response — `OrderData`

<ResponseField name="id" type="integer">
  Unique numeric identifier for the order.
</ResponseField>

<ResponseField name="uid" type="string">
  Unique UUID string identifier for the order.
</ResponseField>

<ResponseField name="link" type="string">
  Public checkout link for the order.
</ResponseField>

<ResponseField name="due_date" type="date">
  The date by which the order must be paid.
</ResponseField>

<ResponseField name="coupon_code" type="string">
  Coupon code applied to this order, if any.
</ResponseField>

<ResponseField name="deal_id" type="integer">
  CRM deal ID associated with this order, if any.
</ResponseField>

<ResponseField name="observation" type="string">
  Internal observation or note attached to the order.
</ResponseField>

<ResponseField name="seller_id" type="integer">
  ID of the seller assigned to this order.
</ResponseField>

<ResponseField name="status" type="string">
  Current order status. One of: `pending`, `waiting_payment`, `partially_paid`, `paid`, `cancelled`, `partially_refunded`, `refunded`, `billed`.
</ResponseField>

<ResponseField name="meta" type="object">
  Arbitrary key-value metadata attached to the order.
</ResponseField>

<ResponseField name="utms" type="object">
  UTM tracking parameters captured at order creation (e.g., `utm_source`, `utm_medium`, `utm_campaign`).
</ResponseField>

<ResponseField name="discount" type="number">
  Total discount amount applied to the order.
</ResponseField>

<ResponseField name="total" type="number">
  Final total amount of the order after discounts.
</ResponseField>

<ResponseField name="created_at" type="datetime">
  ISO 8601 timestamp of when the order was created.
</ResponseField>

<ResponseField name="date" type="date">
  The order date.
</ResponseField>

<ResponseField name="scheduled_at" type="datetime">
  ISO 8601 timestamp of when the order is scheduled for, if applicable.
</ResponseField>

<ResponseField name="charge_page" type="object">
  The charge page associated with this order.

  <Expandable title="charge_page fields">
    <ResponseField name="id" type="integer">
      Charge page ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Charge page display name.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="checkout_page" type="object">
  The checkout page associated with this order.

  <Expandable title="checkout_page fields">
    <ResponseField name="id" type="integer">
      Checkout page ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Checkout page display name.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="customer" type="object">
  The customer who placed the order.

  <Expandable title="customer fields">
    <ResponseField name="email" type="string">Customer email address.</ResponseField>
    <ResponseField name="name" type="string">Customer full name.</ResponseField>
    <ResponseField name="identification" type="string">CPF or CNPJ of the customer.</ResponseField>
    <ResponseField name="phone" type="string">Customer phone number.</ResponseField>
    <ResponseField name="utms" type="object">UTM parameters captured for the customer.</ResponseField>
    <ResponseField name="meta" type="object">Arbitrary metadata attached to the customer.</ResponseField>
    <ResponseField name="address" type="object">Customer address details.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="seller" type="object">
  The seller assigned to this order.

  <Expandable title="seller fields">
    <ResponseField name="name" type="string">Seller full name.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="items" type="array">
  Line items included in this order.

  <Expandable title="items fields">
    <ResponseField name="product_id" type="integer">Product ID.</ResponseField>
    <ResponseField name="product_name" type="string">Product display name.</ResponseField>
    <ResponseField name="unit_name" type="string">Unit label (e.g., "license", "seat").</ResponseField>
    <ResponseField name="interval" type="string">Billing interval for subscriptions (e.g., `month`, `year`).</ResponseField>
    <ResponseField name="cycle" type="integer">Billing cycle number for subscriptions.</ResponseField>
    <ResponseField name="quantity" type="integer">Number of units ordered.</ResponseField>
    <ResponseField name="subscription" type="boolean">Whether this item is a subscription.</ResponseField>
    <ResponseField name="total" type="number">Total price for this line item.</ResponseField>
    <ResponseField name="value" type="number">Unit price of the item.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="payments" type="array">
  Payment records associated with this order.

  <Expandable title="payments fields">
    <ResponseField name="gateway_id" type="string">Transaction ID from the payment gateway.</ResponseField>
    <ResponseField name="installments" type="integer">Number of installments.</ResponseField>
    <ResponseField name="status" type="string">Payment status.</ResponseField>
    <ResponseField name="type" type="string">Payment method type (e.g., `credit_card`, `pix`, `boleto`).</ResponseField>
    <ResponseField name="amount" type="number">Total payment amount.</ResponseField>
    <ResponseField name="company" type="string">Company associated with the payment.</ResponseField>
    <ResponseField name="created_at" type="datetime">ISO 8601 timestamp when the payment was created.</ResponseField>
    <ResponseField name="installment_value" type="number">Value of each installment.</ResponseField>
    <ResponseField name="interest" type="number">Interest amount applied.</ResponseField>
    <ResponseField name="paid_at" type="datetime">ISO 8601 timestamp when the payment was confirmed.</ResponseField>
    <ResponseField name="cancelled_at" type="datetime">ISO 8601 timestamp when the payment was cancelled, if applicable.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="invoices" type="array">
  Fiscal invoices issued for this order.

  <Expandable title="invoices fields">
    <ResponseField name="number" type="string">Invoice number.</ResponseField>
    <ResponseField name="series" type="string">Invoice series.</ResponseField>
    <ResponseField name="status" type="string">Invoice status.</ResponseField>
    <ResponseField name="type" type="string">Invoice type (e.g., NF-e, NFS-e).</ResponseField>
    <ResponseField name="value" type="number">Invoice total value.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="freight" type="object">
  Shipping details for the order.

  <Expandable title="freight fields">
    <ResponseField name="brand" type="string">Carrier brand name.</ResponseField>
    <ResponseField name="charge" type="number">Shipping charge amount.</ResponseField>
    <ResponseField name="type" type="string">Shipping service type.</ResponseField>
    <ResponseField name="quantity" type="integer">Number of packages.</ResponseField>
    <ResponseField name="total" type="number">Total shipping cost.</ResponseField>
    <ResponseField name="carrier" type="string">Carrier identifier.</ResponseField>
  </Expandable>
</ResponseField>

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://pay.nova.money/api/v1/orders/12345" \
    --header "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

***

## Create an order

Create a new order programmatically. You can supply customer info, line items, payment details, and shipping in a single request.

```text theme={null}
POST /orders
```

### Request body — `OrderCreateRequest`

<ParamField body="date" type="date">
  The order date in `YYYY-MM-DD` format. Defaults to today if omitted.
</ParamField>

<ParamField body="coupon" type="string">
  Coupon code to apply to the order.
</ParamField>

<ParamField body="main_product_id" type="integer">
  ID of the primary product for this order. Used for routing and coupon validation.
</ParamField>

<ParamField body="scheduled_at" type="datetime">
  ISO 8601 datetime for scheduling the order (e.g., for appointment-based products).
</ParamField>

<ParamField body="observation" type="string">
  Internal observation or note to attach to the order.
</ParamField>

<ParamField body="skip_content_release" type="boolean">
  When `true`, suppresses automatic content-release actions triggered on order creation.
</ParamField>

<ParamField body="calculate_retention" type="boolean">
  When `true`, applies retention pricing logic during order creation.
</ParamField>

<ParamField body="meta" type="object">
  Arbitrary key-value metadata to store on the order.
</ParamField>

<ParamField body="customer" type="object" required>
  Customer to associate with this order. Creates or updates the customer record.

  <Expandable title="customer fields">
    <ParamField body="email" type="string" required>Customer email address.</ParamField>
    <ParamField body="identification" type="string">CPF (11 digits) or CNPJ (14 digits).</ParamField>
    <ParamField body="name" type="string">Customer full name.</ParamField>
    <ParamField body="neighborhood" type="string">Neighborhood / district.</ParamField>
    <ParamField body="number" type="string">Street number.</ParamField>
    <ParamField body="phone" type="string">Phone number (up to 11 digits).</ParamField>
    <ParamField body="street" type="string">Street address.</ParamField>
    <ParamField body="zipcode" type="string">Postal code.</ParamField>
    <ParamField body="state" type="string">State abbreviation (e.g., `SP`).</ParamField>
    <ParamField body="city" type="string">City name.</ParamField>
    <ParamField body="complement" type="string">Address complement (apartment, suite, etc.).</ParamField>
    <ParamField body="retention" type="boolean">Whether to apply retention pricing for this customer.</ParamField>
    <ParamField body="meta" type="object">Arbitrary metadata to store on the customer record.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="crm_info" type="object">
  CRM integration settings for this order.

  <Expandable title="crm_info fields">
    <ParamField body="create_deal" type="boolean">Whether to create a CRM deal for this order.</ParamField>
    <ParamField body="list_ids" type="string">Comma-separated list IDs to associate with the CRM deal.</ParamField>
    <ParamField body="url" type="uri">Source URL to attach to the CRM deal.</ParamField>
    <ParamField body="tags" type="string">Tags to apply to the CRM deal.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="items" type="array">
  Line items for the order.

  <Expandable title="items fields">
    <ParamField body="product_id" type="integer" required>ID of the product to add.</ParamField>
    <ParamField body="quantity" type="integer">Quantity to order. Defaults to `1`.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="payments" type="array">
  Payment records to attach to the order at creation time.

  <Expandable title="payments fields">
    <ParamField body="gateway" type="string">Gateway name (e.g., `pagarme`, `stripe`).</ParamField>
    <ParamField body="gateway_id" type="string">Transaction ID from the gateway.</ParamField>
    <ParamField body="payment_plan_id" type="integer">ID of the payment plan to use.</ParamField>
    <ParamField body="amount" type="number">Payment amount.</ParamField>
    <ParamField body="status" type="string">Initial payment status.</ParamField>
  </Expandable>
</ParamField>

<ParamField body="freight" type="object">
  Shipping configuration for the order.

  <Expandable title="freight fields">
    <ParamField body="brand" type="string">Carrier brand name.</ParamField>
    <ParamField body="carrier_id" type="integer">Carrier ID.</ParamField>
    <ParamField body="type" type="string">Shipping service type.</ParamField>
    <ParamField body="charge" type="number">Shipping charge amount.</ParamField>
    <ParamField body="quantity" type="integer">Number of packages.</ParamField>
    <ParamField body="total" type="number">Total shipping cost.</ParamField>
  </Expandable>
</ParamField>

### Response

```json theme={null}
{
  "id": 12345
}
```

### Example request

<CodeGroup>
  ```json Request body theme={null}
  {
    "date": "2024-09-15",
    "coupon": "SUMMER20",
    "main_product_id": 101,
    "customer": {
      "email": "jane.doe@example.com",
      "name": "Jane Doe",
      "phone": "11999998888",
      "identification": "12345678901",
      "street": "Rua das Flores",
      "number": "42",
      "neighborhood": "Jardins",
      "city": "São Paulo",
      "state": "SP",
      "zipcode": "01310100"
    },
    "items": [
      { "product_id": 101, "quantity": 1 }
    ],
    "payments": [
      {
        "gateway": "pagarme",
        "gateway_id": "ch_abc123",
        "amount": 199.90,
        "status": "paid"
      }
    ]
  }
  ```

  ```bash cURL theme={null}
  curl --request POST \
    --url "https://pay.nova.money/api/v1/orders" \
    --header "Content-Type: application/json" \
    --data '{
      "date": "2024-09-15",
      "main_product_id": 101,
      "customer": {
        "email": "jane.doe@example.com",
        "name": "Jane Doe",
        "phone": "11999998888"
      },
      "items": [{ "product_id": 101, "quantity": 1 }]
    }'
  ```
</CodeGroup>

***

## Register an external payment

<Note>
  This endpoint requires an API key passed in the request headers.
</Note>

Register an external payment transaction against an existing order. Use this when a payment is processed outside the standard Nova.Pay checkout flow and you need to record it manually.

```text theme={null}
POST /orders/{id}/create_payment
```

### Path parameters

<ParamField path="id" type="integer" required>
  The numeric ID of the order to attach the payment to.
</ParamField>

### Request body

<ParamField body="gateway" type="string">
  Gateway name (e.g., `pagarme`, `stripe`, `manual`).
</ParamField>

<ParamField body="gateway_id" type="string">
  Transaction or charge ID from the external gateway.
</ParamField>

<ParamField body="payment_plan_id" type="integer">
  ID of the payment plan associated with this payment.
</ParamField>

<ParamField body="installments" type="integer">
  Number of installments for the payment.
</ParamField>

<ParamField body="amount" type="number">
  Total payment amount in the account currency.
</ParamField>

<ParamField body="skip_content_release" type="boolean">
  When `true`, suppresses automatic content-release actions triggered by the payment status change.
</ParamField>

### Response

```json theme={null}
{
  "id": 67890
}
```

<Tip>
  After calling this endpoint, you can verify the payment was recorded correctly by fetching the order with `GET /orders/{id}` and inspecting the `payments` array.
</Tip>


## Related topics

- [Products API — List, Create, and Retrieve Products](/api-reference/products.md)
- [Nova.Pay API: Payments, Checkout & Order Management](/introduction.md)
- [Customers API — Create and Update Customer Records](/api-reference/customers.md)
- [Coupons API — Validate Discount Codes Before Checkout](/api-reference/coupons.md)
- [Carts API — Create, Retrieve, and Pay Nova.Pay Carts](/api-reference/carts.md)
