curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/customer-payouts/tokens \
--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 '
{
"customerId": "2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65",
"amountMinor": 150000,
"concept": "Vuelto de compra",
"reason": "Vuelto del pedido PED-1001",
"externalReference": "PED-1001"
}
'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({
customerId: '2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65',
amountMinor: 150000,
concept: 'Vuelto de compra',
reason: 'Vuelto del pedido PED-1001',
externalReference: 'PED-1001'
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/customer-payouts/tokens', 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}/customer-payouts/tokens"
payload = {
"customerId": "2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65",
"amountMinor": 150000,
"concept": "Vuelto de compra",
"reason": "Vuelto del pedido PED-1001",
"externalReference": "PED-1001"
}
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": "0f8fad5b-…",
"token": "cpt_0f8f…_secret_…",
"expiresAt": "2026-11-17T12:05:00.000Z",
"maxAttempts": 3,
"amountMinor": 150000,
"currency": "VES",
"externalReference": "PED-1001"
}{
"error": {
"code": "invalid_request",
"message": "amountMinor must not be less than 1",
"field": "amountMinor",
"details": [
{
"field": "amountMinor",
"message": "amountMinor must not be less than 1"
}
],
"requestId": "req-1001"
}
}{
"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": "invalid_field",
"message": "A field is invalid.",
"field": "concept"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<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"
}
}Emitir un token de vuelto embebido
Emite un token para un vuelto. Tu web se lo pasa a checkout.js y la persona escribe en tu página su banco, su teléfono y, si no la fijaste, su cédula, sin ver tu llave. Cliente, monto, concepto, motivo, externalReference, cuenta de origen y cédula quedan fijos en el token: el navegador no puede cambiarlos. El token vive 5 minutos y tiene 3 intentos; no se pueden cambiar. token solo vuelve en esta respuesta. La misma Idempotency-Key con el mismo cuerpo devuelve el mismo token: para un token nuevo, usa otra clave. Requiere el vuelto embebido activo y al menos una web registrada en el panel. El límite es 60 solicitudes por minuto por llave.
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/customer-payouts/tokens \
--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 '
{
"customerId": "2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65",
"amountMinor": 150000,
"concept": "Vuelto de compra",
"reason": "Vuelto del pedido PED-1001",
"externalReference": "PED-1001"
}
'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({
customerId: '2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65',
amountMinor: 150000,
concept: 'Vuelto de compra',
reason: 'Vuelto del pedido PED-1001',
externalReference: 'PED-1001'
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/customer-payouts/tokens', 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}/customer-payouts/tokens"
payload = {
"customerId": "2c7a9e1b-4d6f-4a3c-8b5e-1f0d9c8b7a65",
"amountMinor": 150000,
"concept": "Vuelto de compra",
"reason": "Vuelto del pedido PED-1001",
"externalReference": "PED-1001"
}
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": "0f8fad5b-…",
"token": "cpt_0f8f…_secret_…",
"expiresAt": "2026-11-17T12:05:00.000Z",
"maxAttempts": 3,
"amountMinor": 150000,
"currency": "VES",
"externalReference": "PED-1001"
}{
"error": {
"code": "invalid_request",
"message": "amountMinor must not be less than 1",
"field": "amountMinor",
"details": [
{
"field": "amountMinor",
"message": "amountMinor must not be less than 1"
}
],
"requestId": "req-1001"
}
}{
"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": "invalid_field",
"message": "A field is invalid.",
"field": "concept"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"field": "<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"
}
}Headers
Body
Cada campo acepta solo el tipo JSON de su esquema; Cobrix no convierte tipos.
El vuelto que el token deja fijo. Cada campo acepta solo el tipo JSON de su esquema. Un campo que no está aquí responde 400 invalid_request, también expiresInSeconds y maxAttempts: son fijos.
Response
El token emitido

