Completar pago con tasa certificada
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/payments/{externalPaymentId}/certified-rate \
--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 '
{
"refCurrency": "USD",
"refAmountMinor": 2025,
"exchangeRateUsed": "52.08",
"documents": [
{
"externalDocumentId": "invoice-1001",
"amountMinor": 2025
}
]
}
'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({
refCurrency: 'USD',
refAmountMinor: 2025,
exchangeRateUsed: '52.08',
documents: [{externalDocumentId: 'invoice-1001', amountMinor: 2025}]
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/payments/{externalPaymentId}/certified-rate', 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}/payments/{externalPaymentId}/certified-rate"
payload = {
"refCurrency": "USD",
"refAmountMinor": 2025,
"exchangeRateUsed": "52.08",
"documents": [
{
"externalDocumentId": "invoice-1001",
"amountMinor": 2025
}
]
}
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){
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"externalPaymentId": "<string>",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 123,
"paymentCurrency": "<string>",
"applicationCurrency": "<string>",
"status": "applied",
"totalAppliedMinor": 123,
"creditCreatedMinor": 123,
"documents": [
{
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalDocumentId": "<string>",
"currency": "<string>",
"appliedMinor": 123,
"balanceMinor": 123,
"status": "applied"
}
],
"customer": {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"paymentStatus": "<string>",
"pendingReason": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"exchangeRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exchangeRateUsed": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Pagos
Completar pago con tasa certificada
Continúa la aplicación de un pago needs_certified_rate con una conversión certificada y documentos explícitos.
POST
/
integrations
/
v1
/
{companyId}
/
payments
/
{externalPaymentId}
/
certified-rate
Completar pago con tasa certificada
curl --request POST \
--url https://api.cobrix.co/api/integrations/v1/{companyId}/payments/{externalPaymentId}/certified-rate \
--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 '
{
"refCurrency": "USD",
"refAmountMinor": 2025,
"exchangeRateUsed": "52.08",
"documents": [
{
"externalDocumentId": "invoice-1001",
"amountMinor": 2025
}
]
}
'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({
refCurrency: 'USD',
refAmountMinor: 2025,
exchangeRateUsed: '52.08',
documents: [{externalDocumentId: 'invoice-1001', amountMinor: 2025}]
})
};
fetch('https://api.cobrix.co/api/integrations/v1/{companyId}/payments/{externalPaymentId}/certified-rate', 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}/payments/{externalPaymentId}/certified-rate"
payload = {
"refCurrency": "USD",
"refAmountMinor": 2025,
"exchangeRateUsed": "52.08",
"documents": [
{
"externalDocumentId": "invoice-1001",
"amountMinor": 2025
}
]
}
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){
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"externalPaymentId": "<string>",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amountMinor": 123,
"paymentCurrency": "<string>",
"applicationCurrency": "<string>",
"status": "applied",
"totalAppliedMinor": 123,
"creditCreatedMinor": 123,
"documents": [
{
"invoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalDocumentId": "<string>",
"currency": "<string>",
"appliedMinor": 123,
"balanceMinor": 123,
"status": "applied"
}
],
"customer": {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyCustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "<string>"
},
"paymentStatus": "<string>",
"pendingReason": "<string>",
"paidAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"exchangeRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exchangeRateUsed": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid.",
"requestId": "req-1001"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key.",
"requestId": "req-1001"
}
}Authorizations
Llave cbx_live creada para el partner.
Headers
Identificador estable de la operación.
Minimum string length:
1Segundos Unix dentro de una ventana de cinco minutos.
Pattern:
^[0-9]{10}$HMAC-SHA256 de timestamp, método, ruta y cuerpo crudo.
Pattern:
^v1=[a-f0-9]{64}$Path Parameters
Empresa vinculada a la llave.
Body
application/json
Available options:
USD, VES, usd, ves Required range:
x >= 1Maximum string length:
19Pattern:
^[0-9]+(?:\.[0-9]+)?$Minimum array length:
1Show child attributes
Show child attributes
Response
Pago actualizado
Available options:
applied, partially_applied, credited, needs_certified_rate, no_open_documents, failed, already_processed Show child attributes
Show child attributes
Show child attributes
Show child attributes

