curl --request POST \
--url https://api.cobrix.co/api/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"reference": "V-12345678",
"provider": "erp_acme",
"amount": 25,
"name": "Servicio de internet"
}
'const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reference: 'V-12345678',
provider: 'erp_acme',
amount: 25,
name: 'Servicio de internet'
})
};
fetch('https://api.cobrix.co/api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/v1/invoices"
payload = {
"reference": "V-12345678",
"provider": "erp_acme",
"amount": 25,
"name": "Servicio de internet"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 123,
"provider": "<string>",
"provider_id": "<string>",
"reference": "<string>",
"status": "CREATED",
"remarks": "<string>",
"metadata": {},
"due_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test": true,
"partial_payment_config": null,
"payment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"currency": "<string>",
"amount": 123,
"amount_label": "<string>",
"title": "<string>",
"description": "<string>",
"phone": "<string>",
"expiration_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"document_link": "<string>",
"external_id": "<string>",
"allows": {
"accounts": true,
"cards": true,
"card_extra": true,
"realtime": true
},
"status": "<string>",
"is_test": true,
"created_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"payment_link": "<string>",
"redirect_url": "<string>",
"provider_id": "<string>",
"metadata": null,
"customer": null,
"method": null,
"splits": [
{}
],
"company": null,
"commission": null
}
}Crear documento de cobro
Crea el documento central, su proyección pública y un checkout por el saldo completo. reference contiene la cédula o RIF del cliente; provider_id identifica el documento. provider debe coincidir con el source de la llave. Requiere public_invoices:write.
curl --request POST \
--url https://api.cobrix.co/api/v1/invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"reference": "V-12345678",
"provider": "erp_acme",
"amount": 25,
"name": "Servicio de internet"
}
'const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reference: 'V-12345678',
provider: 'erp_acme',
amount: 25,
name: 'Servicio de internet'
})
};
fetch('https://api.cobrix.co/api/v1/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cobrix.co/api/v1/invoices"
payload = {
"reference": "V-12345678",
"provider": "erp_acme",
"amount": 25,
"name": "Servicio de internet"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"amount": 123,
"provider": "<string>",
"provider_id": "<string>",
"reference": "<string>",
"status": "CREATED",
"remarks": "<string>",
"metadata": {},
"due_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_test": true,
"partial_payment_config": null,
"payment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"currency": "<string>",
"amount": 123,
"amount_label": "<string>",
"title": "<string>",
"description": "<string>",
"phone": "<string>",
"expiration_at": "2023-11-07T05:31:56Z",
"due_date": "2023-12-25",
"document_link": "<string>",
"external_id": "<string>",
"allows": {
"accounts": true,
"cards": true,
"card_extra": true,
"realtime": true
},
"status": "<string>",
"is_test": true,
"created_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"payment_link": "<string>",
"redirect_url": "<string>",
"provider_id": "<string>",
"metadata": null,
"customer": null,
"method": null,
"splits": [
{}
],
"company": null,
"commission": null
}
}Authorizations
Llave cbx_live con scope de documentos públicos.
Headers
Clave estable por creación. Actúa como identidad documental de respaldo cuando no se envía provider_id.
1Body
Cédula o RIF del cliente. Cobrix normaliza una copia para resolver al cliente y devuelve el valor recibido sin modificaciones en respuestas y webhooks.
1 - 255Debe coincidir con el source del partner.
1 - 64Unidades mayores de la moneda de referencia.
0.01 <= x <= 1000000Must be a multiple of 0.015 - 100Identificador estable del documento en el sistema de origen. Es inmutable. Si se omite, x-idempotency respalda la identidad documental.
1 - 2554 - 2000^\+[1-9][0-9]{7,14}$200YYYY-MM-DD.
Datos opacos del documento. Cobrix conserva su contenido JSON y lo devuelve en la respuesta y en todos los webhooks de ciclo de vida de este documento.
Response
Documento creado o replay idempotente
CREATED, PAID, CONCILIATED, PAID_FROM_PROVIDER, DELETE_FROM_PROVIDER, FAILED Siempre null; esta API exige pago completo.
Show child attributes
Show child attributes

