Charges

/v1/charges — ledger de solo lectura de cada intento de cobro (ChargeAttempt) ejecutado por Rekurra sobre tu cuenta de Wompi.

El objeto Charge

{
  "id": "ch_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
  "subscription_id": "sub_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
  "customer_id": "cus_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
  "amount_cents": 5000000,
  "fee_cents": 25000,
  "net_to_developer_cents": 4975000,
  "status": "approved",
  "wompi_transaction_id": "12345-1677181234-12345",
  "reference": "RK-dev_01H-sub_01H-2026-09-1",
  "period_key": "2026-09",
  "attempt_number": 1,
  "created_at": "2026-09-01T00:05:00Z"
}
CampoTipo
idstring
subscription_idstring
customer_idstring
amount_centsinteger
fee_centsinteger
net_to_developer_centsinteger
statuspending | approved | declined | voided | error
wompi_transaction_idstring
referencestring
period_keystring (YYYY-MM)
attempt_numberinteger
created_atdatetime

Listar cobros

GET /v1/charges

Filtros opcionales: ?subscription_id=, ?status=, ?created[gte]=, más paginación estándar.

curl
curl "https://api.rekurra.dev/v1/charges?subscription_id=sub_01HZXK7QJ5M8Z9X2R3TVQ7A1B2&status=approved" \
  -H "Authorization: Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX"
JavaScript (fetch)
const params = new URLSearchParams({
  subscription_id: "sub_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
  status: "approved",
});
const res = await fetch(`https://api.rekurra.dev/v1/charges?${params}`, {
  headers: { Authorization: "Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX" },
});
const { data } = await res.json();
Python (requests)
import requests
 
res = requests.get(
    "https://api.rekurra.dev/v1/charges",
    params={"subscription_id": "sub_01HZXK7QJ5M8Z9X2R3TVQ7A1B2", "status": "approved"},
    headers={"Authorization": "Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX"},
)
body = res.json()

Response — 200 OK

{ "data": [ /* Charge[] */ ], "has_more": false, "next_cursor": null }

Obtener un cobro

GET /v1/charges/{id}

curl
curl https://api.rekurra.dev/v1/charges/ch_01HZXK7QJ5M8Z9X2R3TVQ7A1B2 \
  -H "Authorization: Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX"
JavaScript (fetch)
const res = await fetch(
  "https://api.rekurra.dev/v1/charges/ch_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
  { headers: { Authorization: "Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX" } }
);
const charge = await res.json();
Python (requests)
import requests
 
res = requests.get(
    "https://api.rekurra.dev/v1/charges/ch_01HZXK7QJ5M8Z9X2R3TVQ7A1B2",
    headers={"Authorization": "Bearer rk_live_XXXXXXXXXXXXXXXXXXXXXXXX"},
)
charge = res.json()

Errores posibles

Statuserror.typeCausa
404invalid_requestEl cobro no existe o no pertenece a tu cuenta

fee_cents es la comisión de Rekurra debitada de tu saldo prepago en cada cobro approved; net_to_developer_cents es lo que efectivamente ingresa a tu cuenta de Wompi (amount_cents - fee_cents conceptualmente, aunque el recaudo y el fee ocurren en sistemas distintos).