Ejecutar con el código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"otp": "12345678"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({otp: '12345678'})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute"
payload = { "otp": "12345678" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "6f0c9d1e-3a52-4c0e-9a41-2f5b7c8d9e10",
"externalDocumentId": "PED-1001",
"status": "succeeded",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"paymentId": "b2c4e6f8-1a3b-4c5d-8e9f-0a1b2c3d4e5f",
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:01:10.000Z"
}
Débito inmediato
Ejecutar con el código
Envía al banco el código que escribió el pagador. Un rechazo del banco no es un error HTTP: responde 201 con status: failed y el motivo en error. Un código que llega vencido responde 201 con status: expired, aunque Cobrix ya haya cerrado el débito. Si la llamada se corta, repítela con la misma Idempotency-Key y el mismo cuerpo.
POST
/
integrations
/
v1
/
{companyId}
/
direct-debits
/
{id}
/
execute
Ejecutar con el código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"otp": "12345678"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({otp: '12345678'})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/execute"
payload = { "otp": "12345678" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "6f0c9d1e-3a52-4c0e-9a41-2f5b7c8d9e10",
"externalDocumentId": "PED-1001",
"status": "succeeded",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"paymentId": "b2c4e6f8-1a3b-4c5d-8e9f-0a1b2c3d4e5f",
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:01:10.000Z"
}
Headers
Path Parameters
Body
application/json
Response
El débito en succeeded, processing, failed o expired
otp_sent: el banco envió el código, falta ejecutar. processing: enviado al banco, falta su respuesta. succeeded: cobrado y aplicado al documento. failed: el banco lo rechazó o falló el cobro. expired: el código venció; Cobrix lo cierra solo un minuto después. cancelled: lo cancelaste. Solo succeeded mueve dinero.
Available options:
otp_sent, processing, succeeded, failed, expired, cancelled 
