> ## 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.

# Custom Fields

> Capture extra data at checkout — consent, attribution, anything you need — and read it back from Orders and Subscriptions.

A Macropay checkout already collects everything required to fulfill an order and act as your Merchant of Record: name, email, and billing details for tax and compliance. **Custom Fields** let you ask for the rest — the data your business needs but the default form doesn't capture.

Common reasons to reach for them:

* A required checkbox to accept your terms of service
* Newsletter or marketing opt-in consent
* "How did you hear about us?" attribution for your growth team
* A VAT ID, company name, or purchase-order reference for B2B buyers
* A seat count, license note, or any per-product input you want stored on the order

Every value lands on the resulting Order or Subscription and is queryable through the API, so you can route it into your CRM, analytics, or fulfillment logic.

## Where fields live

Custom Fields are defined once at the **organization** level, then attached to individual products. Define a field a single time and reuse it across as many products as you like.

To manage them, open **Settings → Custom Fields**. This lists every field your organization has defined.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_fields.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=74f0680dfedde7bca2015fc0dcee75f2" width="3840" height="2400" data-path="assets/features/custom-fields/custom_fields.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_fields.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=533d31fba2ee7d2bd21e851240ca2b7b" width="3840" height="2400" data-path="assets/features/custom-fields/custom_fields.dark.png" />

Select **New Custom Field** to add one.

## Field types

The **type** is the first and most consequential choice — it sets the input shown at checkout and the shape of the stored value. Pick carefully: the type is locked once the field is created.

| Type         | Renders as                                                   | Stored as                  | Validation you can set |
| ------------ | ------------------------------------------------------------ | -------------------------- | ---------------------- |
| **Text**     | Single-line input (or **textarea** via *Form input options*) | String                     | Min / max length       |
| **Number**   | Numeric input                                                | Number                     | Min / max value        |
| **Date**     | Date picker                                                  | ISO 8601 string            | Min / max date         |
| **Checkbox** | Single checkbox                                              | Boolean (`true` / `false`) | —                      |
| **Select**   | Dropdown of predefined options                               | The chosen option's value  | —                      |

For a **Select** field, each option is a `Value` / `Label` pair: the `Value` is what gets stored, and the `Label` is what the customer sees. For example, an attribution dropdown might store `social_media` while displaying "Social media".

## Slug and name

Two identifiers matter, and they serve different audiences.

* **Slug** — the key your data is stored under on Orders, Subscriptions, and anywhere the field's value appears. It must be unique within your organization. Rename it any time; Macropay migrates existing data to the new slug automatically.
* **Name** — the human label you'll recognize in the dashboard. It defaults to the customer-facing label too, unless you override that under *Form input options*.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/create_custom_field.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=ee9919cc38717a375fd0b410dc177d34" width="1620" height="2334" data-path="assets/features/custom-fields/create_custom_field.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/create_custom_field.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=5623c68e2c4338b7284b6b4c701d4107" width="1620" height="2334" data-path="assets/features/custom-fields/create_custom_field.dark.png" />

## Customizing the checkout display

*Form input options* control how the field appears to your customer:

* **Label** — text shown above the field
* **Help text** — guidance shown below the field
* **Placeholder** — greyed-out hint shown inside an empty field

Label and help text accept basic Markdown, so you can add **bold**, *italic*, or links — handy for linking your terms page directly from a consent field.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/label_markdown.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=0542229af9bd0aa03a5dd019b10bcbb7" width="1383" height="132" data-path="assets/features/custom-fields/label_markdown.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/label_markdown.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=5b0124809d3bc8f0fd723fd0cd1bbb5e" width="1383" height="132" data-path="assets/features/custom-fields/label_markdown.dark.png" />

## Attach a field to a product

Fields appear at checkout per product. When [creating or editing a product](/features/products), choose which Custom Fields to include in its checkout.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/add_custom_field.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=b5cb989c670cdd6a14cf48568ae93158" width="3837" height="2400" data-path="assets/features/custom-fields/add_custom_field.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/add_custom_field.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=73ab12b877c31f40f475c34b35f1bfd4" width="3837" height="2400" data-path="assets/features/custom-fields/add_custom_field.dark.png" />

You can also mark a field **Required**.

<Tip>
  A **required checkbox** forces the customer to tick the box before they can
  complete checkout — exactly what you want for terms-of-service acceptance.
</Tip>

The selected fields now render inside the checkout form for that product.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_fields_checkout.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=b19c3548f49f90a0b5e94a9f3802aa1c" width="1866" height="4245" data-path="assets/features/custom-fields/custom_fields_checkout.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_fields_checkout.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=2a5b6df3b37809ecd677c2c3662dd52f" width="1866" height="4245" data-path="assets/features/custom-fields/custom_fields_checkout.dark.png" />

## Reading the data back

In the dashboard, each Custom Field becomes a column on your **Sales** page, across both Orders and Subscriptions, so you can scan customer input at a glance.

<img className="block dark:hidden" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_field_data.light.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=8cf7af31311e21bd084e52aaabfe33ca" width="3840" height="2400" data-path="assets/features/custom-fields/custom_field_data.light.png" />

<img className="hidden dark:block" src="https://mintcdn.com/macrodeepinc/S4T0jM7ZWV5HVLft/assets/features/custom-fields/custom_field_data.dark.png?fit=max&auto=format&n=S4T0jM7ZWV5HVLft&q=85&s=63967baab9b0aebd6adf217ac001d79c" width="3840" height="2400" data-path="assets/features/custom-fields/custom_field_data.dark.png" />

The same values are exposed through the [Orders](/api-reference/orders/get) and [Subscriptions](/api-reference/subscriptions/get) API on the `custom_field_data` property, keyed by each field's **slug**:

```json theme={null}
{
  "custom_field_data": {
    "terms": true,
    "source": "social_media",
    "vat_id": "DE123456789"
  }
}
```

<Tip>
  Use the slug as a stable contract between your checkout and your backend.
  Webhook handlers, CRM syncs, and fulfillment jobs can read
  `custom_field_data["terms"]` or `custom_field_data["source"]` straight from the
  order payload — no extra lookups, and the keys stay consistent even if you
  rename the field's display name later.
</Tip>
