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

# URL parameters

> Open the checkout and the payment link with the buyer's details filled in, in the right language and with tracking

The checkout and the payment link accept parameters at the end of the URL. With them, the page opens with the buyer's
details already filled in (from your CRM, a form or a WhatsApp conversation), in the chosen language and with the sale
source.

```text theme={null}
https://checkout.safefypay.com.br/YOUR_CHECKOUT?name=Maria%20Silva&email=maria%40example.com&phone=5511999998888&document=12345678909
```

```text theme={null}
https://checkout.safefypay.com.br/pay/YOUR_LINK?name=Maria%20Silva&email=maria%40example.com&document=12345678909
```

> [!NOTE]
>
> The buyer can change anything that comes filled in. Values must be URL encoded: a space becomes `%20` and `@` becomes
> `%40`. In JavaScript, use `encodeURIComponent` or `URLSearchParams`.

## Buyer details

Valid for both the checkout and the payment link.

| Parameter | Description | Example |
| - | - | - |
| `name` | Full name | `Maria Silva` |
| `email` | Email | `maria@example.com` |
| `phone` | Phone with country and area code, digits only. Without the country code, the page's country is used | `5511999998888` |
| `document` | CPF or CNPJ, digits only | `12345678909` |
| `zipCode` | Postal code (CEP), digits only | `01310100` |
| `street` | Street | `Avenida Paulista` |
| `number` | Number | `1000` |
| `complement` | Address line 2 | `Suite 12` |
| `neighborhood` | Neighborhood | `Bela Vista` |
| `city` | City | `São Paulo` |
| `state` | State (UF) | `SP` |

Address fields show up when the checkout asks for an address (physical product, boleto or Pix Automático, for example).

## Language, source and tracking

| Parameter | Where | Description | Example |
| - | - | - | - |
| `lang` | Checkout and link | Page language: `pt-BR`, `en` or `es` | `en` |
| `ref` | Checkout | Sale source, stored on the order | `instagram` |
| `utm_source`, `utm_medium`, `utm_campaign`, `utm_content`, `utm_term` | Checkout | Kept in the URL for the checkout tracking pixels. On a custom domain, they are passed on to the checkout | `meta` |

## Automatic language

Without `lang`, the page picks the language in this order:

1. the language the buyer chose in the page selector (saved in their browser);
2. the device language: phone, operating system or browser;
3. the language of the buyer's country, by IP (Spanish in Spanish-speaking countries, English in other countries outside Brazil);
4. the default language set on the checkout;
5. Portuguese.

## Reloading the page keeps the details

What the buyer types (name, email, phone, CPF/CNPJ and address) is kept only in their browser tab and comes back if the
page is reloaded. Closing the tab clears it. Card details are never stored, and values in the URL take precedence over
what the tab remembered.

For cards typed on the processor's page, the card form also comes back by itself after a reload: on the checkout, as
soon as the buyer's details are filled in; on the payment link, with the details of the payment already started.

## Building the URL

```javascript JavaScript theme={null}
const url = new URL('https://checkout.safefypay.com.br/YOUR_CHECKOUT');
url.search = new URLSearchParams({
  name: 'Maria Silva',
  email: 'maria@example.com',
  phone: '5511999998888',
  document: '12345678909',
  utm_source: 'instagram',
}).toString();
```

```python Python theme={null}
from urllib.parse import urlencode

params = {
    "name": "Maria Silva",
    "email": "maria@example.com",
    "phone": "5511999998888",
    "document": "12345678909",
    "utm_source": "instagram",
}
url = "https://checkout.safefypay.com.br/YOUR_CHECKOUT?" + urlencode(params)
```

> [!TIP]
>
> In the dashboard, the checkout **Link** tab and the payment link details show this list and a ready-to-copy example URL.


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