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

# Consultar cargo

> Consulta el estado y detalle de un cargo creado en la sesión del cliente.

Consulta el estado actual de un cargo previamente creado con [POST /customers/session/charges](https://docs.onepay.la/client/customer-session/create-charge.md). Útil para hacer polling del estado del cargo mientras el cliente aprueba o rechaza vía WhatsApp.

> [!NOTE]
>
> Solo puedes consultar cargos que pertenezcan al cliente autenticado. Intentar consultar un cargo de otro cliente retorna 404.

### Headers

**Authorization** `string` *required*

Bearer token de tu empresa.

**X-Customer-Token** `string` *required*

Token de sesión del cliente obtenido en [/customers/login/verify](https://docs.onepay.la/client/customer-session/verify-otp.md).

### Path Parameters

**chargeId** `string` *required*

ID del cargo a consultar. Retornado al crear el cargo con `POST /customers/session/charges`.

### Response

**charge\_id** `string`

Identificador único del cargo.

**status** `string`

Estado actual del cargo. Valores posibles:

* `created` — Pendiente de aprobación
* `paid` — Aprobado y cobrado exitosamente
* `failed` — Rechazado o expirado

**amount** `integer`

Monto del cargo en **centavos**.

**currency** `string`

Moneda del cargo (`COP`, `USD`).

**description** `string`

Descripción del cargo.

**remarks** `string | null`

Motivo del fallo cuando `status` es `failed`. `null` en otros estados.

**paid\_at** `string | null`

Fecha y hora del pago en formato ISO 8601. `null` si aún no ha sido pagado.

**created\_at** `string`

Fecha y hora de creación del cargo en formato ISO 8601.

```bash cURL theme={null}
curl https://api.onepay.la/v1/customers/session/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232 \
  -H "Authorization: Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi" \
  -H "x-customer-token: 83|i7Cs8TpuDXOLOsDmEKSUPPW3GiFaz83bzFg73yFp"
```

```javascript JavaScript theme={null}
const response = await fetch(
  'https://api.onepay.la/v1/customers/session/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232',
  {
    headers: {
      'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
      'X-Customer-Token': '83|i7Cs8TpuDXOLOsDmEKSUPPW3GiFaz83bzFg73yFp'
    }
  }
);

const charge = await response.json();
```

```python Python theme={null}
import requests

response = requests.get(
    'https://api.onepay.la/v1/customers/session/charges/9e02966f-2ddf-4ee7-a391-5b5b7653e232',
    headers={
        'Authorization': 'Bearer sk_test_KjbE0Vobf5Lg1yNZ4HoKawDItDs3Rod9VXNBWrEYmGn06tkesPIi',
        'X-Customer-Token': '83|i7Cs8TpuDXOLOsDmEKSUPPW3GiFaz83bzFg73yFp'
    }
)

charge = response.json()
```

```json 200 - Cargo pendiente theme={null}
{
  "charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
  "status": "created",
  "amount": 50000,
  "currency": "COP",
  "description": "Pago mensualidad marzo",
  "remarks": null,
  "paid_at": null,
  "created_at": "2026-03-17T21:30:00+00:00"
}
```

```json 200 - Cargo aprobado theme={null}
{
  "charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
  "status": "paid",
  "amount": 50000,
  "currency": "COP",
  "description": "Pago mensualidad marzo",
  "remarks": null,
  "paid_at": "2026-03-17T21:32:15+00:00",
  "created_at": "2026-03-17T21:30:00+00:00"
}
```

```json 200 - Cargo fallido/expirado theme={null}
{
  "charge_id": "9e02966f-2ddf-4ee7-a391-5b5b7653e232",
  "status": "failed",
  "amount": 50000,
  "currency": "COP",
  "description": "Pago mensualidad marzo",
  "remarks": "CUSTOMER_APPROVAL_EXPIRED",
  "paid_at": null,
  "created_at": "2026-03-17T21:30:00+00:00"
}
```

```json 404 - Cargo no encontrado theme={null}
{
  "message": "Cargo no encontrado."
}
```


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