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

# Customers

> Create and retrieve customer records in Pagou v2 when your product needs reusable buyer profiles.

Use customers when your checkout reuses buyer data across multiple payments.

## Supported operations

* `POST /v2/customers`
* `GET /v2/customers`
* `GET /v2/customers/{id}`

## When to use this resource

* You want a stable Pagou customer ID.
* Your product stores reusable payer profiles.
* You want to create the buyer once and reference it later.

## Example request

```bash theme={null}
curl --request POST \
  --url https://api.pagou.ai/v2/customers \
  --header "Authorization: Bearer YOUR_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "document": {
      "type": "CPF",
      "number": "12345678901"
    },
    "externalRef": "customer_1001"
  }'
```

## Example response

```json theme={null}
{
  "success": true,
  "requestId": "0190a2b4-18a7-7de0-9a43-69b7cf261201",
  "data": {
    "id": "018f1f2e-7b46-7c9a-8d3e-1a2b3c4d5e73",
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "externalRef": "customer_1001"
  }
}
```

## Common error

Status `422`

```json theme={null}
{
  "type": "https://api.pagou.ai/problems/validation-error",
  "title": "Validation Error",
  "status": 422,
  "detail": "The request contains invalid data.",
  "errors": [
    {
      "field": "email",
      "message": "Invalid email format",
      "code": "invalid_string"
    }
  ]
}
```

Fix: send a valid email and keep the customer linked to the customer ID in your system. Customer creation does not replace transaction idempotency.

## Next steps

* [Transaction Statuses](/payments/transaction-statuses)
* [Accept Pix Payments](/payments/pix/accept-payments)
