Refund amount to preloaded balance¶
This endpoint is used to refund a previously paid payment link to the agency's Prepaid Balance, after the corresponding reservation was cancelled.
To do this, you must provide the payment link code to be refunded, the ID of the agency that made the payment, and the ID of the reservation associated at the time the payment link was created.
POST https://[base_url]/v2/preloaded-balance/{payment_link_code}/agencies/{agency_id}/reservation/{reservation_id}/refund
When the refund is processed, the amount will be reflected in the agency's Preloaded Balance.
Query parameters¶
| PARAMETER | TYPE | REQ. | DESCRIPTION |
|---|---|---|---|
| payment_link_code | String | Yes | Payment link code to be refunded |
| agency_id | Integer | Yes | ID of the agency that made the payment |
| reservation_id | String | Yes | ID of the reservation associated at the time the payment link was created |
Query example¶
Status code: 200¶
{
"msg":"Reembolso por ${payment_link.amount} aplicado correctamente en Saldo Precargadode agencia {agency.name}"
}
Endpoint response¶
Status code: 400, 404¶
{
"code": 0,
"message": "Error http: 400",
"detail": "No se puede aplicar un reembolso a un pago que no ha sido aplicado"
}
{
"code": 0,
"message": "Error http: 400",
"detail": "El ID de reserva no está asociado al link de pago"
}
{
"code": 0,
"message": "Error http: 400",
"detail": "El link no pertenece a la agencia proporcionada"
}
{
"code": 0,
"message": "Error http: 400",
"detail": "Esta funcionalidad solo está permitida para Booking Connect"
}