curl -X POST https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel \
-H "X-API-Key: sk_live_xxxx"
const response = await fetch(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'sk_live_xxxx' } }
);
const data = await response.json();
import requests
response = requests.post(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
headers={'X-API-Key': 'sk_live_xxxx'}
)
print(response.json())
{
"charge_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "cancelled"
}
{
"detail": "charge not found"
}
{
"detail": "Cannot cancel a completed charge"
}
Endpoints
POST /charges/{id}/cancel — Cancelar Cobro
Cancela un cobro en estado created o pending. Un cobro ya pagado (completed) no puede cancelarse.
POST
/
api
/
v1
/
merchants
/
me
/
charges
/
{external_id}
/
cancel
curl -X POST https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel \
-H "X-API-Key: sk_live_xxxx"
const response = await fetch(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'sk_live_xxxx' } }
);
const data = await response.json();
import requests
response = requests.post(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
headers={'X-API-Key': 'sk_live_xxxx'}
)
print(response.json())
{
"charge_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "cancelled"
}
{
"detail": "charge not found"
}
{
"detail": "Cannot cancel a completed charge"
}
Cancela un cobro en estado
created o pending. Un cobro ya pagado (completed) no puede cancelarse.
Headers
| Header | Tipo | Req | Descripción |
|---|---|---|---|
X-API-Key | string | Sí | API Key del merchant |
Path Params
| Parámetro | Tipo | Descripción |
|---|---|---|
external_id | string | El external_id o charge_id del cobro a cancelar. |
Response
| Campo | Tipo | Descripción |
|---|---|---|
charge_id | string | UUID del cobro cancelado. |
status | string | Siempre cancelled. |
curl -X POST https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel \
-H "X-API-Key: sk_live_xxxx"
const response = await fetch(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
{ method: 'POST', headers: { 'X-API-Key': 'sk_live_xxxx' } }
);
const data = await response.json();
import requests
response = requests.post(
'https://crypto.cucu.ai/api/v1/merchants/me/charges/CHG-20260125-00042/cancel',
headers={'X-API-Key': 'sk_live_xxxx'}
)
print(response.json())
{
"charge_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "cancelled"
}
{
"detail": "charge not found"
}
{
"detail": "Cannot cancel a completed charge"
}
⌘I