---
title: Terms of Service
description: A legal agreement your customers must accept before you create them and start their KYC.
---

## What it is

BlindPay's Terms of Service is a legal agreement that must be accepted by your customers before creating a customer. This acceptance is required for regulatory compliance and allows BlindPay to legally provide services such as generating blockchain wallets and creating virtual accounts on behalf of your customers.

## How it works

The terms can only be accepted by users accessing the BlindPay URL `https://app.blindpay.com` on the client side, so all requests from servers will be ignored.

When a user accepts the terms, BlindPay redirects them to your `redirect_url` with a `tos_id` query parameter and emits a `tos.accept` webhook event. You pass that `tos_id` when [creating a customer](/docs/essentials/customers#create-a-customer).

### Generated URL parameters

The generate request returns a URL with the following query parameters:

::c-code-group

```bash [URL Example]
https://app.blindpay.com/e/terms-of-service?session_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZGVtcG90ZW5jeV9rZXkiOiI1ZDhiMTQ5ZS1hNTVkLTRiNWItYThmOC03YzRmYTMxNWY4NTQiLCJleHAiOjE3NDI3OTk5MjcsImlhdCI6MTc0Mjc5OTgwN30.gP5imRCt_Ws-SFD7Pc8HRiGooxGM8pd_hXWUEcwKE0I&idempotency_key=5d8b149e-a55d-4b5b-a8f8-7c4fa315f854&redirect_url=
```

::

| Param           | Required | Example                                                     |
| --------------- | -------- | ----------------------------------------------------------- |
| session_token   | yes      | eyJ0eXAi...E0I (jwt)                                        |
| idempotency_key | yes      | 5d8b149e-a55d-4b5b-a8f8-7c4fa315f854 (uuid)                 |
| redirect_url    | no       | https://blindpay.com/                                       |
| customer_id     | no       | re_000000000000 (mandatory for accepting a new TOS version) |

::c-alert{icon="circle-info"}
We strongly recommend adding a `redirect_url` parameter. When users accept the terms of service, they will be automatically redirected back to your application, creating a seamless user experience.
::

### Accepting a new version

If BlindPay updates the terms of service, all requests to [payout quote](/docs/essentials/payout-quotes#create-a-payout-quote) and [payin quote](/docs/essentials/payin-quotes#create-a-payin-quote) endpoint will return an error with message `please_accept_terms_of_service`.

If you receive this, generate a new terms of service URL and set the `customer_id` parameter on the returned URL. After the customer accepts the new version, the quotes endpoints stop returning the error.

## Prerequisites

::c-prerequisites
::

## Generate a Terms of Service URL

::c-auth-note
::

::c-alert{icon="circle-info"}
**Remember**: we only accept `uuid` on the `idempotency_key` field.
::

::c-code-group

```bash [cURL]
curl --request POST \
  --url https://api.blindpay.com/v1/e/instances/in_000000000000/tos \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "idempotency_key": "<your_uuid>"
  }'
```

::

## Accept the Terms of Service

After the user accepts the terms of service, BlindPay redirects them to the `redirect_url` and automatically adds a `tos_id` query parameter. Use this `tos_id` when [creating a customer](/docs/essentials/customers#create-a-customer).

::c-alert{icon="circle-info"}
You'll also receive a webhook event `tos.accept` when the terms of service is accepted. [See the payload here.](https://api.blindpay.com/reference#webhook/post/tosaccept){target="\_blank"}
::

## Related

- [Customers](/docs/essentials/customers) · [Instances](/docs/essentials/instances) · [API Keys](/docs/essentials/api-keys)
