Pedir otro código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/otp \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/otp', 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}/otp"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "6f0c9d1e-3a52-4c0e-9a41-2f5b7c8d9e10",
"externalDocumentId": "PED-1001",
"status": "otp_sent",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"otp": {
"expiresAt": "2026-11-10T15:02:00.000Z",
"validitySeconds": 74
},
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:00:00.000Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"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": "<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 otro código
Para un débito en otp_sent o expired, cuando el código venció o no llegó. Va sin cuerpo, con o sin Content-Type: application/json. Si el código sigue vigente, responde ese mismo débito sin enviar otro SMS. Si venció, responde un débito nuevo con su propio id y el anterior queda expired. Ejecuta siempre con el id de esta respuesta.
POST
/
integrations
/
v1
/
{companyId}
/
direct-debits
/
{id}
/
otp
Pedir otro código
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/otp \
--header 'Authorization: Bearer <token>' \
--header 'Cobrix-Signature: <cobrix-signature>' \
--header 'Cobrix-Timestamp: <cobrix-timestamp>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'Cobrix-Timestamp': '<cobrix-timestamp>',
'Cobrix-Signature': '<cobrix-signature>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/direct-debits/{id}/otp', 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}/otp"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Cobrix-Timestamp": "<cobrix-timestamp>",
"Cobrix-Signature": "<cobrix-signature>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "6f0c9d1e-3a52-4c0e-9a41-2f5b7c8d9e10",
"externalDocumentId": "PED-1001",
"status": "otp_sent",
"amount": {
"minor": "1313475",
"currency": "VES"
},
"otp": {
"expiresAt": "2026-11-10T15:02:00.000Z",
"validitySeconds": 74
},
"createdAt": "2026-11-10T15:00:00.000Z",
"updatedAt": "2026-11-10T15:00:00.000Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"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": "<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
Path Parameters
Response
El débito que espera su código, con otp.sentTo
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 
