Pedir el código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits \
--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 '
{
"externalDocumentId": "PED-1001",
"customerExternalId": "CLI-77",
"customer": {
"type": "individual",
"name": "Ana Pérez"
},
"currency": "USD",
"totalMinor": 1500,
"description": "Botín de cuero",
"payer": {
"bankCode": "0102",
"documentType": "V",
"documentNumber": "12345678",
"phone": "04120000000",
"holderName": "Ana Pérez"
}
}
'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({
externalDocumentId: 'PED-1001',
customerExternalId: 'CLI-77',
customer: {type: 'individual', name: 'Ana Pérez'},
currency: 'USD',
totalMinor: 1500,
description: 'Botín de cuero',
payer: {
bankCode: '0102',
documentType: 'V',
documentNumber: '12345678',
phone: '04120000000',
holderName: 'Ana Pérez'
}
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits', 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"
payload = {
"externalDocumentId": "PED-1001",
"customerExternalId": "CLI-77",
"customer": {
"type": "individual",
"name": "Ana Pérez"
},
"currency": "USD",
"totalMinor": 1500,
"description": "Botín de cuero",
"payer": {
"bankCode": "0102",
"documentType": "V",
"documentNumber": "12345678",
"phone": "04120000000",
"holderName": "Ana Pérez"
}
}
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": "otp_sent",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"otp": {
"sentTo": "0412***00",
"expiresAt": "2026-11-10T15:02:00.000Z",
"validitySeconds": 120
},
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:00:00.000Z",
"reference": {
"minor": 1500,
"currency": "USD"
}
}{
"error": {
"code": "invalid_request",
"message": "payer.phone must be 11 digits starting with 0.",
"field": "payer.phone",
"details": [
{
"field": "payer.phone",
"message": "payer.phone must be 11 digits starting with 0."
}
]
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "internal_error",
"message": "Something failed on our side. Try again in a few minutes; if it keeps failing, contact Cobrix support.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}Débito inmediato
Pedir el código
Crea el cobro, igual que POST checkouts, y pide al banco del pagador que le envíe el código por SMS. Cobrix calcula el monto en bolívares; no lo envíes. Guarda el id de la respuesta para ejecutar el débito. Con splits la llave necesita además payout_splits:write.
POST
/
integrations
/
v1
/
{companyId}
/
direct-debits
Pedir el código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits \
--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 '
{
"externalDocumentId": "PED-1001",
"customerExternalId": "CLI-77",
"customer": {
"type": "individual",
"name": "Ana Pérez"
},
"currency": "USD",
"totalMinor": 1500,
"description": "Botín de cuero",
"payer": {
"bankCode": "0102",
"documentType": "V",
"documentNumber": "12345678",
"phone": "04120000000",
"holderName": "Ana Pérez"
}
}
'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({
externalDocumentId: 'PED-1001',
customerExternalId: 'CLI-77',
customer: {type: 'individual', name: 'Ana Pérez'},
currency: 'USD',
totalMinor: 1500,
description: 'Botín de cuero',
payer: {
bankCode: '0102',
documentType: 'V',
documentNumber: '12345678',
phone: '04120000000',
holderName: 'Ana Pérez'
}
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits', 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"
payload = {
"externalDocumentId": "PED-1001",
"customerExternalId": "CLI-77",
"customer": {
"type": "individual",
"name": "Ana Pérez"
},
"currency": "USD",
"totalMinor": 1500,
"description": "Botín de cuero",
"payer": {
"bankCode": "0102",
"documentType": "V",
"documentNumber": "12345678",
"phone": "04120000000",
"holderName": "Ana Pérez"
}
}
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": "otp_sent",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"otp": {
"sentTo": "0412***00",
"expiresAt": "2026-11-10T15:02:00.000Z",
"validitySeconds": 120
},
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:00:00.000Z",
"reference": {
"minor": 1500,
"currency": "USD"
}
}{
"error": {
"code": "invalid_request",
"message": "payer.phone must be 11 digits starting with 0.",
"field": "payer.phone",
"details": [
{
"field": "payer.phone",
"message": "payer.phone must be 11 digits starting with 0."
}
]
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "internal_error",
"message": "Something failed on our side. Try again in a few minutes; if it keeps failing, contact Cobrix support.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"reason": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"bankCode": "<string>",
"requestId": "<string>"
}
}Headers
Body
application/json
Response
Código enviado: el débito queda en otp_sent
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 
