> ## Documentation Index
> Fetch the complete documentation index at: https://scaleup-c34c4386.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# customer.state_changed

> Disparado quando o estado de um cliente muda (ex: ativo para inativo).

## Evento `customer.state_changed`

Disparado quando o estado do cliente é alterado, como transição de ativo para inativo ou vice-versa.

## Payload de Exemplo

```json theme={null}
{
  "type": "customer.state_changed",
  "data": {
    "id": "cus_1234567890",
    "email": "cliente@exemplo.com.br",
    "organization_id": "org_abc123",
    "previous_state": "active",
    "current_state": "inactive",
    "changed_at": "2025-07-18T09:00:00Z"
  },
  "webhook_event_id": "we_jkl012",
  "timestamp": "2025-07-18T09:00:01Z"
}
```

## Campos Relevantes

* **`data.previous_state`** - Estado anterior do cliente.
* **`data.current_state`** - Novo estado do cliente (`active`, `inactive`).


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