curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/checkouts \
--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": "VES",
"totalMinor": 100000,
"description": "Pedido 1001"
}
'{
"externalDocumentId": "<string>",
"status": "open",
"totalMinor": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"embedToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"paymentMethods": [
"pago_movil",
"zelle",
"debito_inmediato"
],
"returnUrl": "<string>",
"splits": [
{
"beneficiaryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "principal",
"bankCode": "0102",
"bankName": "Banco de Venezuela",
"maskedAccount": "•••• 2345",
"alias": "<string>",
"percent": "37.5",
"created": true
}
]
}{
"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>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Links de cobro
Crear un checkout embebido
Una sola llamada crea el cliente, el documento de cobro y su checkout. Devuelve embedToken para mostrarlo en tu web con checkout.js y checkoutUrl para mandarlo como link. Con splits, el dinero de la venta por débito inmediato se reparte entre esas cuentas. Ver la guía Checkout embebido.
POST
/
integrations
/
v1
/
{companyId}
/
checkouts
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/checkouts \
--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": "VES",
"totalMinor": 100000,
"description": "Pedido 1001"
}
'{
"externalDocumentId": "<string>",
"status": "open",
"totalMinor": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"embedToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"paymentMethods": [
"pago_movil",
"zelle",
"debito_inmediato"
],
"returnUrl": "<string>",
"splits": [
{
"beneficiaryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "principal",
"bankCode": "0102",
"bankName": "Banco de Venezuela",
"maskedAccount": "•••• 2345",
"alias": "<string>",
"percent": "37.5",
"created": true
}
]
}{
"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>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Headers
Body
application/json
Response
Checkout creado

