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"
}| Campo | Tipo |
|---|---|
id | string |
subscription_id | string |
customer_id | string |
amount_cents | integer |
fee_cents | integer |
net_to_developer_cents | integer |
status | pending | approved | declined | voided | error |
wompi_transaction_id | string |
reference | string |
period_key | string (YYYY-MM) |
attempt_number | integer |
created_at | datetime |
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
| Status | error.type | Causa |
|---|---|---|
404 | invalid_request | El 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).