Listar cobros
GET/v1/charges
Más recientes primero, paginado por cursor. Filtros opcionales por
suscripción, cliente, estados (repetible o separado por comas) y rango
de period_start (from inclusivo, to exclusivo). Sin intentos. Solo cobros del entorno de la API key.
Autenticación: Authorization: Bearer <API key>.
Parámetros
| Parámetro | En | Tipo | Descripción |
|---|---|---|---|
subscription_id | query | string | Otro formato que sub_… → 422 invalid_subscription_id. |
customer_id | query | string | Otro formato que cus_… → 422 invalid_customer_id. |
status | query | array<ChargeStatus> | Otro valor → 422 invalid_status. Valores: |
from | query | string (date-time) | |
to | query | string (date-time) | from debe ser anterior a to → si no, 422 invalid_range. |
limit | query | integer | Tamaño de página (1–100, por defecto 50). Por defecto: |
starting_after | query | string | Id ( chg_…) del último cobro de la página anterior; otro formato → 422 invalid_cursor; excluyente con ending_before (422 invalid_cursor). |
ending_before | query | string | Id ( chg_…) del primer cobro de la página actual, para pedir la anterior (más recientes); excluyente con starting_after (422 invalid_cursor). Mismo orden (más recientes primero); has_more indica si hay más antes de esta página. |
Respuestas
200Una página de cobros.
Esquema ChargeList
| Campo | Tipo | Descripción |
|---|---|---|
dataobligatorio | array<Charge> | |
data[].idobligatorio | string | Ejemplo: |
data[].environmentobligatorio | string | Valores: |
data[].subscription_idobligatorio | string | |
data[].customer_idobligatorio | string | |
data[].plan_idobligatorio | string | Plan cuyo precio se cobra en este periodo. |
data[].statusobligatorio | string | Valores: |
data[].amount_in_centsobligatorio | integer (int64) | Ejemplo: |
data[].currencyobligatorio | string | Valores: |
data[].period_startobligatorio | string (date-time) | RFC 3339 en UTC. |
data[].period_endobligatorio | string (date-time) | RFC 3339 en UTC. |
data[].attempt_countobligatorio | integer | |
data[].next_retry_atobligatorio | string (date-time) | null | Próximo reintento automático (dunning). |
data[].failure_reasonobligatorio | string | null | Mensaje de Wompi o TENANT_NOT_READY, PAYMENT_METHOD_REQUIRED, TRANSACTION_NOT_CREATED, PENDING_TIMEOUT, GATEWAY_REJECTED. |
data[].paid_atobligatorio | string (date-time) | null | |
data[].voided_atobligatorio | string (date-time) | null | |
data[].created_atobligatorio | string (date-time) | RFC 3339 en UTC. |
data[].updated_atobligatorio | string (date-time) | RFC 3339 en UTC. |
has_moreobligatorio | boolean |
Errores
- 401
Credencial ausente, inválida, expirada o revocada (
codeunauthorized).- 422
La entrada no cumple las reglas (
typeinvalid_request;paramindica el campo).- 429
Demasiadas peticiones (
typerate_limited,coderate_limited): más de 100 peticiones por segundo con la misma API key. Reintenta cuando indiqueRetry-After.- Otros
Error con el formato estándar.
Todos con el formato de error estándar.
curl https://api.paygumi.com/v1/charges \
-H "Authorization: Bearer pgm_test_..."{
"data": [
{
"id": "chg_01JB86R800ABCDEFGHJKMNPQRS",
"environment": "SANDBOX",
"subscription_id": "string",
"customer_id": "string",
"plan_id": "string",
"status": "SCHEDULED",
"amount_in_cents": 4990000,
"currency": "COP",
"period_start": "2026-11-01T05:00:00Z",
"period_end": "2026-11-01T05:00:00Z",
"attempt_count": 0,
"next_retry_at": "2026-11-01T05:00:00Z",
"failure_reason": "string",
"paid_at": "2026-11-01T05:00:00Z",
"voided_at": "2026-11-01T05:00:00Z",
"created_at": "2026-11-01T05:00:00Z",
"updated_at": "2026-11-01T05:00:00Z"
}
],
"has_more": false
}Consultar un cobro con sus intentos
GET/v1/charges/{id}
Detalle del cobro y todos sus intentos en Wompi. De otro tenant o entorno → 404 charge_not_found.
Autenticación: Authorization: Bearer <API key>.
Parámetros
| Parámetro | En | Tipo | Descripción |
|---|---|---|---|
idobligatorio | ruta | string | Id del cobro ( chg_…). Uno mal formado responde 404.Ejemplo: |
Respuestas
200El cobro.
Esquema ChargeDetail
| Campo | Tipo | Descripción |
|---|---|---|
idobligatorio | string | Ejemplo: |
environmentobligatorio | string | Valores: |
subscription_idobligatorio | string | |
customer_idobligatorio | string | |
plan_idobligatorio | string | Plan cuyo precio se cobra en este periodo. |
statusobligatorio | string | Valores: |
amount_in_centsobligatorio | integer (int64) | Ejemplo: |
currencyobligatorio | string | Valores: |
period_startobligatorio | string (date-time) | RFC 3339 en UTC. |
period_endobligatorio | string (date-time) | RFC 3339 en UTC. |
attempt_countobligatorio | integer | |
next_retry_atobligatorio | string (date-time) | null | Próximo reintento automático (dunning). |
failure_reasonobligatorio | string | null | Mensaje de Wompi o TENANT_NOT_READY, PAYMENT_METHOD_REQUIRED, TRANSACTION_NOT_CREATED, PENDING_TIMEOUT, GATEWAY_REJECTED. |
paid_atobligatorio | string (date-time) | null | |
voided_atobligatorio | string (date-time) | null | |
created_atobligatorio | string (date-time) | RFC 3339 en UTC. |
updated_atobligatorio | string (date-time) | RFC 3339 en UTC. |
attemptsobligatorio | array<PaymentAttempt> | |
attempts[].idobligatorio | string | Ejemplo: |
attempts[].numberobligatorio | integer | |
attempts[].referenceobligatorio | string | Referencia enviada a Wompi: {tenant_public_id}-{charge_id}-a{n}. |
attempts[].triggerobligatorio | string | Valores: |
attempts[].wompi_transaction_idobligatorio | string | null | |
attempts[].statusobligatorio | string | Valores: |
attempts[].status_messageobligatorio | string | null | |
attempts[].created_atobligatorio | string (date-time) | RFC 3339 en UTC. |
attempts[].finalized_atobligatorio | string (date-time) | null |
Errores
- 401
Credencial ausente, inválida, expirada o revocada (
codeunauthorized).- 404
El recurso no existe o es de otro tenant (nunca 403, para no filtrar existencia).
- 429
Demasiadas peticiones (
typerate_limited,coderate_limited): más de 100 peticiones por segundo con la misma API key. Reintenta cuando indiqueRetry-After.- Otros
Error con el formato estándar.
Todos con el formato de error estándar.
curl https://api.paygumi.com/v1/charges/{id} \
-H "Authorization: Bearer pgm_test_..."{
"id": "chg_01JB86R800ABCDEFGHJKMNPQRS",
"environment": "SANDBOX",
"subscription_id": "string",
"customer_id": "string",
"plan_id": "string",
"status": "SCHEDULED",
"amount_in_cents": 4990000,
"currency": "COP",
"period_start": "2026-11-01T05:00:00Z",
"period_end": "2026-11-01T05:00:00Z",
"attempt_count": 0,
"next_retry_at": "2026-11-01T05:00:00Z",
"failure_reason": "string",
"paid_at": "2026-11-01T05:00:00Z",
"voided_at": "2026-11-01T05:00:00Z",
"created_at": "2026-11-01T05:00:00Z",
"updated_at": "2026-11-01T05:00:00Z",
"attempts": [
{
"id": "att_01JB86R800ABCDEFGHJKMNPQRS",
"number": 1,
"reference": "string",
"trigger": "SCHEDULED",
"wompi_transaction_id": "string",
"status": "CREATED",
"status_message": "string",
"created_at": "2026-11-01T05:00:00Z",
"finalized_at": "2026-11-01T05:00:00Z"
}
]
}