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

# Create an API client

> Step-by-step guide for creating a Dintero API client in Backoffice and saving the client_id and client_secret credentials safely.

To start using the Dintero Checkout on your website, you need to create an API Client through the **Dintero Backoffice**.

### Step by step-guide

First, log into **[Backoffice](https://backoffice.dintero.com)**, then follow this interactive slide-show:

1. Click on **settings**.
2. Under API & Integrations click on **API clients**.
3. Click on **Create new API client**.
4. Click on **Checkout client**.
5. Write the **URL** of your website.
6. Click on **Create new API client**.
7. Remember to **Save the credentials**, the **Client Secret** can not be shown again.
8. Click **OK**.
9. The Client is now **Created**.

<div style={{ position: 'relative', paddingBottom: 'calc(57.7714012434242% + 41px)', height: 0, width: '100%' }}>
  <iframe src="https://demo.arcade.software/ZYZn1cDpEwxbB007nUGZ?embed" title="Dintero Backoffice" frameBorder="0" loading="lazy" webkitAllowFullScreen mozAllowFullScreen allowFullScreen allow="clipboard-write" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', colorScheme: 'dark' }} />
</div>

#### Using Our Plugin

If you’re using our plugin, most of the technical details below are handled automatically. You can skip the following sections unless you’re customizing the integration or coding it yourself.

## Authentication

Use your `client_id` and `client_secret` to get an access token from the auth endpoint.

```bash theme={null}
curl https://api.dintero.com/v1/accounts/T12345678/auth/token \
  -u "CLIENT_ID:CLIENT_SECRET" \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "client_credentials",
    "audience": "https://api.dintero.com/v1/accounts/T12345678"
  }'
```

The response contains an `access_token` and its lifetime in seconds:

```json theme={null}
{
  "access_token": "eyJhbGci...t7P4",
  "token_type": "Bearer",
  "expires_in": 14400
}
```

Use the token as a Bearer header on all subsequent requests:

```
Authorization: Bearer {access_token}
```

<Tip>
  Cache the token and only request a new one when it is about to expire, not on every request.
</Tip>
