Reverse payment
curl --request POST \
--url https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "Pago duplicado"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Pago duplicado'})
};
fetch('https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse"
payload = { "reason": "Pago duplicado" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Pago duplicado'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"reversed_payment": {
"payment_id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"original_amount": 300,
"reversal_reason": "Pago duplicado",
"reversed_at": "2026-10-06T16:00:00-06:00"
},
"expense_info": {
"expense_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"generation_code": "A1B2C3D4-0000-4C5D-9E6F-0A1B2C3D4E5F",
"total_amount": 452,
"total_paid": 0,
"pending_amount": 452,
"payment_status": "pending"
},
"accounting": {
"action": "reversed",
"journal_entry_id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"entry_code": "DIA-000145",
"status": "PROCESADA"
}
}
}Reverse payment
Reverses an applied payment and recalculates the purchase’s payment status.
Required permission: payables.payments
POST
/
payables
/
payments
/
{paymentId}
/
reverse
Reverse payment
curl --request POST \
--url https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"reason": "Pago duplicado"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Pago duplicado'})
};
fetch('https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse"
payload = { "reason": "Pago duplicado" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/v1/payables/payments/{paymentId}/reverse",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Pago duplicado'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"reversed_payment": {
"payment_id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"original_amount": 300,
"reversal_reason": "Pago duplicado",
"reversed_at": "2026-10-06T16:00:00-06:00"
},
"expense_info": {
"expense_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"generation_code": "A1B2C3D4-0000-4C5D-9E6F-0A1B2C3D4E5F",
"total_amount": 452,
"total_paid": 0,
"pending_amount": 452,
"payment_status": "pending"
},
"accounting": {
"action": "reversed",
"journal_entry_id": "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01",
"entry_code": "DIA-000145",
"status": "PROCESADA"
}
}
}Authorizations
Integration API Key (Integrations → New Integration).
Headers
Optional. Unique key per operation (max. 100 characters, valid for 24 h per integration). A retry with the same key and the same body returns the original response (header Idempotent-Replayed: true) without repeating the operation; with a different body, or while the first is still in progress, it returns 409.
Maximum string length:
100Path Parameters
Payment ID
Body
application/json
Reason (default "Payment reversed").
Maximum string length:
500