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

# Terms Consent at Checkout

> Require customers to accept your Terms of Service, Refund Policy, and Privacy Policy at checkout, and keep a record of each acceptance for dispute evidence.

![Checkout page for Lumen Studio with an unticked checkbox that reads I agree to Lumen Studio's Terms of Service, above a disabled Continue to Payment button](https://mintcdn.com/dodopayments/egKq11NiW1eY22YQ/images/terms-consent/checkout-two-step.png?fit=max\&auto=format\&n=egKq11NiW1eY22YQ\&q=85\&s=74ad1400efd420c2b06cd14464e99f68)

Terms consent adds a required checkbox to your checkout that links to your own Terms of Service, and to your Refund Policy and Privacy Policy if you have them. The customer can't pay until they tick it. Dodo Payments saves the acceptance on the payment, so you have proof of what the customer agreed to if they dispute the charge later.

Use terms consent when your business needs a customer's agreement to your own policies, for example to show a bank that the customer accepted your refund policy before they bought a plan they later charged back.

> [card] [Multi-Brand Setup](https://docs.dodopayments.com/features/multi-brands.md)
>
> Policy links are set on each brand.

> [card] [Checkout Sessions](https://docs.dodopayments.com/developer-resources/checkout-session.md)
>
> Create the checkout session that asks for consent.

> [card] [Disputes](https://docs.dodopayments.com/features/transactions/disputes.md)
>
> Use the acceptance record as evidence.

> [card] [Single Page Checkout](https://docs.dodopayments.com/features/single-page-checkout.md)
>
> Where the checkbox sits in the one-page flow.

## How It Works

Terms consent has two parts. You add your policy links to a brand once, then you turn the checkbox on for each checkout session that needs it:

1. You add a Terms of Service URL, and optionally a Refund Policy URL and a Privacy Policy URL, to a brand.
2. You create a checkout session with `feature_flags.require_terms_acceptance` set to `true`.
3. The checkout page shows a checkbox with links to the brand's policies. The customer must tick it before they can continue.
4. Dodo Payments records the acceptance with the payment. You see it in the dashboard, in the Payments API, and in payment and dispute webhooks.

The checkbox is off by default. Checkout sessions that don't set the flag are not affected.

## Adding Policy Links to a Brand

Each brand has its own policy links, so a business with several brands can show different terms for each one. The primary brand also has its own links. Set up policy links separately in test mode and live mode.

### From the Dashboard

**1. Open the Brand**

Go to **Settings → Business**. In the **Brands Under \[Your Business]** panel, open the `...` menu next to the brand and select **Edit**.

**2. Enter the Policy Links**

In the **Policies** section, fill in the links:

* **Terms of Service URL** (required to ask customers to accept your terms at checkout)
* **Refund Policy URL** (optional)
* **Privacy Policy URL** (optional)

Each link must start with `http://` or `https://` and be 500 characters or fewer. A Terms of Service URL is required to save any policy links, so a brand can't have only a refund or privacy link.

![Edit primary brand panel with the Policies section showing Terms of Service URL, Refund Policy URL, and Privacy Policy URL fields filled in](https://mintcdn.com/dodopayments/egKq11NiW1eY22YQ/images/terms-consent/brand-policy-links.png?fit=max\&auto=format\&n=egKq11NiW1eY22YQ\&q=85\&s=f19b5d433c1bf1991bba085969960910)

**3. Save the Brand**

Save the brand. The links apply to every new checkout session for this brand that requires terms acceptance.

> [!NOTE]
>
> After you set a Terms of Service URL, you can change it but you can't remove it. The refund and privacy links can be cleared at any time.

### Through the API

To set the links through the API, send them to `PUT /brands/{id}/policies`. Use the brand ID of a secondary brand, or your business ID for the primary brand. `terms_of_service` is required. `refund_policy` and `privacy_policy` are optional, and an empty value means no link.

```bash cURL theme={null}
curl -X PUT https://test.dodopayments.com/brands/brnd_8dFiAW42v28JzhlVSocjq/policies \
  -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "terms_of_service": "https://lumenstudio.com/terms",
    "refund_policy": "https://lumenstudio.com/refunds",
    "privacy_policy": "https://lumenstudio.com/privacy"
  }'
```

The response returns the brand's current links and the time they were saved:

```json theme={null}
{
  "brand_id": "brnd_8dFiAW42v28JzhlVSocjq",
  "policies": {
    "terms_of_service": "https://lumenstudio.com/terms",
    "refund_policy": "https://lumenstudio.com/refunds",
    "privacy_policy": "https://lumenstudio.com/privacy"
  },
  "updated_at": "2026-11-20T10:15:42Z"
}
```

To read the current links, call `GET /brands/{id}/policies`. It returns `404` with the message `The brand has no policy links.` when the brand has none.

The `PUT` request returns these errors:

| Status | Cause |
| - | - |
| `400` | `terms_of_service` is blank, or a link is not an `http` or `https` URL, or a link is longer than 500 characters |
| `404` | The brand does not exist |
| `422` | The brand is archived (`BRAND_ARCHIVED`), the body has no `terms_of_service`, or the body has an unknown field |

The policy endpoints are not in the SDKs yet, so call them over HTTP. The brand list and brand detail responses don't include policy links.

### Changing Your Policy Links

Each save adds a new version of the brand's links, and saved versions are not changed. New checkout sessions show the latest links. A customer who already accepted keeps the version they accepted, so the record on their payment still shows the links that were on the checkout page when they paid. Saving the same links again creates no new version.

> [!WARNING]
>
> The record stores the links, not the text of your policy pages. If you change the text at the same URL, keep your own copy of each earlier version so you can show what the customer agreed to.

## Requiring Acceptance on a Checkout Session

To show the checkbox, set `feature_flags.require_terms_acceptance` to `true` when you create the checkout session:

```bash cURL theme={null}
curl -X POST https://test.dodopayments.com/checkouts \
  -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_cart": [{ "product_id": "pdt_0NWvFxS6xmVkRmLjJsDvq", "quantity": 1 }],
    "feature_flags": { "require_terms_acceptance": true },
    "return_url": "https://lumenstudio.com/checkout/success"
  }'
```

Send the customer to the `checkout_url` in the response. There is no dashboard setting for this flag. You turn it on for each checkout session through the API.

The API checks the flag when you create the session:

| Request | Result |
| - | - |
| No brand of the products in the cart has a Terms of Service URL | Rejected with `422`: `No brand of this checkout has a Terms of Service URL. Add a Terms of Service URL to a brand, or set require_terms_acceptance to false.` |
| `require_terms_acceptance: true` with `confirm: true` | Rejected with `422`: `require_terms_acceptance cannot be true when confirm is true. The customer must tick the checkbox on the checkout page.` |
| Flag omitted | Defaults to `false`. The checkout shows no checkbox |

The `confirm: true` combination is rejected because `confirm` skips the checkout page, and the checkbox is on that page.

For a [product collection](https://docs.dodopayments.com/features/product-collections.md) checkout, the brands of all active products in the collection count when the API checks for a Terms of Service URL.

## What the Customer Sees

The checkbox reads "I agree to \[brand]'s Terms of Service", followed by each other policy the brand has. Each policy name is a link that opens in a new tab. Opening a link does not tick the box.

The label names only the links the brand has:

| Links on the brand | Checkbox label |
| - | - |
| Terms of Service | I agree to Lumen Studio's Terms of Service. |
| Terms of Service and Refund Policy | I agree to Lumen Studio's Terms of Service and Refund Policy. |
| Terms of Service and Privacy Policy | I agree to Lumen Studio's Terms of Service and Privacy Policy. |
| All three | I agree to Lumen Studio's Terms of Service, Refund Policy and Privacy Policy. |

The checkbox starts unticked, and the customer must tick it to pay. The label is translated into the checkout's language.

> [tab] Two-Page Checkout
>
> The checkbox sits below the billing address and the **Purchasing as a business** checkbox, above **Continue to Payment**. The button stays disabled until the customer ticks the box.
>
> ![Two-page checkout with the terms checkbox above the disabled Continue to Payment button](https://mintcdn.com/dodopayments/egKq11NiW1eY22YQ/images/terms-consent/checkout-two-step.png?fit=max\&auto=format\&n=egKq11NiW1eY22YQ\&q=85\&s=74ad1400efd420c2b06cd14464e99f68)

> [tab] Single Page Checkout
>
> The checkbox sits inside the selected payment method, above the **Pay Now** button. The customer can't pay until they tick the box.
>
> Apple Pay and Google Pay move from the top of the page into the payment method list, so the customer sees the checkbox before they pay with a wallet. See [Apple Pay and Google Pay](https://docs.dodopayments.com/features/single-page-checkout.md#apple-pay-and-google-pay).
>
> ![Single page checkout with Card selected and the terms checkbox above the Pay Now button, with Apple Pay listed as a payment method](https://mintcdn.com/dodopayments/egKq11NiW1eY22YQ/images/terms-consent/checkout-single-page.png?fit=max\&auto=format\&n=egKq11NiW1eY22YQ\&q=85\&s=624b57394466bc0052215cd2a4d4d712)

The number of checkboxes depends on how you create the session:

* **Product cart:** all products in `product_cart` must belong to one brand, and the API rejects a cart that mixes brands. The customer sees one checkbox, for that brand.
* **Product collection:** a collection can include products from more than one brand. The page shows one checkbox for each brand in the collection that has policy links, and the customer must tick all of them to pay.

## Viewing the Acceptance Record

Dodo Payments records each acceptance on the payment: the version of the policy links the customer accepted and the time they accepted. It also stores the customer's IP address and browser details with the record, for use as dispute evidence. The IP address and browser details are not returned by the API.

### In the Dashboard

* **Payment details:** go to **Transactions → Payments** and open the payment. The **Terms consent** section shows **Accepted at** and the **Policies** the customer accepted.
* **Dispute details:** open the dispute. **Terms accepted** shows the time, and **Accepted policies** lists the links.

### In the API and Webhooks

The payment object carries three fields for terms consent. They are in the `GET /payments/{payment_id}` response and in the `payment.succeeded`, `payment.failed`, `payment.processing`, and `payment.cancelled` webhooks. They are not in the payment list response.

**terms\_accepted** `boolean`

`true` when the customer accepted your policy links at checkout.

**terms\_accepted\_at** `string | null`

The time the customer accepted, in ISO 8601 format. `null` when `terms_accepted` is `false`.

**accepted\_policies** `array`

The policy links the customer accepted, one item for each brand. Empty when `terms_accepted` is `false`. Each item has `brand_id`, `terms_of_service`, `refund_policy` (or `null`), and `privacy_policy` (or `null`).

An example of the fields on a payment:

```json theme={null}
{
  "payment_id": "pay_2IjeQm4hqU6RA4Z4kwDee",
  "terms_accepted": true,
  "terms_accepted_at": "2026-11-20T10:31:07Z",
  "accepted_policies": [
    {
      "brand_id": "brnd_8dFiAW42v28JzhlVSocjq",
      "terms_of_service": "https://lumenstudio.com/terms",
      "refund_policy": "https://lumenstudio.com/refunds",
      "privacy_policy": "https://lumenstudio.com/privacy"
    }
  ]
}
```

The dispute object, from `GET /disputes/{dispute_id}` and the `dispute.*` webhooks, carries `terms_accepted_at` and `accepted_policies` with the same shape. It has no `terms_accepted` field.

### Subscriptions

The customer accepts once, on the first payment of a subscription. Renewals, payment retries, and plan changes ask for no new acceptance. Their payments show the acceptance from the first payment, including the version of the links the customer accepted then. A dispute on a renewal therefore has the same record as a dispute on the first payment. A subscription whose first payment was made without terms consent shows `terms_accepted: false` on every payment.

## Where the Checkbox Does Not Appear

The checkbox shows only on checkout sessions created with `require_terms_acceptance: true`. It does not show on:

* [Payment links](https://docs.dodopayments.com/developer-resources/integration-guide.md#payment-links). A URL parameter can't turn it on.
* Checkout sessions created with `confirm: true`, which the API rejects with the flag on.
* Subscriptions and payments created without a checkout session.
* Abandoned cart recovery checkouts.
* Plan changes in the Customer Portal.

> [card] [Disputes](https://docs.dodopayments.com/features/transactions/disputes.md)
>
> Respond to disputes with the evidence you have.

> [card] [Checkout Features](https://docs.dodopayments.com/features/checkout.md)
>
> Other checkout options you set per session.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.