Partially refund a BNPL loan by external transaction ID
POST/partner/pre-approve/:externalTrxId/loan/partial-refund
Refunds part of the purchase financed by a BNPL (Buy Now, Pay Later) loan associated with a partner's external transaction. Only available within a 60-day window from the loan disbursement date (transferDate). To refund the whole purchase, use Cancel a BNPL loan by external transaction ID.
Refund amount
refundAmount is the part of the purchase to refund, in CLP, on the same basis as the loanAmount returned by this API (the purchase amount). When a banca.me discount was applied to the customer, the refund is split proportionally between the financed amount and the discount, and only the financed part is applied to the loan. Otherwise, the whole refundAmount is applied. The response returns the applied amount in refundAmount.
refundAmount must be:
- Greater than
0and lower thanloanAmount. Requesting the fullloanAmountreturns412. - At most 95% of
loanAmount. - At least the minimum loan amount of the risk policy the customer was pre-approved under.
Result
The applied amount is compared with the installments that are not paid:
- Settled loan: when the applied amount is equal to or greater than the principal of those installments, or than the financed amount divided by
periodsand multiplied by the number of those installments, the loan and those installments change toPARTIAL_REFUND_SETTLED. The part of the applied amount that exceeds the principal of those installments is refunded to the customer. The response describes the settled loan. - Replacement loan: otherwise, the loan and those installments change to
PARTIAL_REFUND_REPLACED, and a replacement loan is created for the principal of those installments minus the applied amount. The replacement loan keeps the interest rate andtransferDate, has one installment for each replaced installment (a single installment when its loan amount is 20,000 CLP or less), and its first installment is due on the due date of the first replaced installment. The response describes the replacement loan.
Paid installments keep their state. The customer is notified by email.
After a replacement, externalTrxId identifies the replacement loan: Retrieves loan details by external transaction ID returns it, and later partial refunds and cancellations apply to it. Each request applies a new refund, so repeating a request after a replacement refunds the amount again. Once the loan is settled or canceled, further requests receive 409.
This endpoint accepts at most one request every 15 seconds, and this limit is shared with Cancel a BNPL loan by external transaction ID; additional requests receive 429.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 412
- 422
- 429
Refund applied. Describes the replacement loan, or the settled loan when the refund covered the unpaid installments.
Bad Request. Possible causes:
refundAmountis lower than or equal to0, greater thanloanAmount, greater than 95% ofloanAmount, or lower than the minimum loan amount of the risk policy the customer was pre-approved under. When a banca.me discount was applied to the customer, amounts lower than or equal to0or greater thanloanAmountreturn422instead.- The loan does not belong to the authenticated partner.
- The API token is not the current API token of the partner.
Unauthorized - Invalid or missing access token
Forbidden - The partner is not active
Not Found. Possible causes:
- No loan, loan request or pre-request found for the given externalTrxId.
- The partner of the API token does not exist.
Method Not Allowed. Possible causes:
- The loan is not of BNPL type.
- More than 60 days have passed since
transferDate.
Conflict. Possible causes:
- The loan is not in a refundable state (ACTIVE, SOFT_DEBT, INTERMEDIATE_DEBT, HARD_DEBT or PAID).
- A cancellation or a settled partial refund was already processed for
externalTrxId. - Another refund for
externalTrxIdwas processed at the same time.
Precondition Failed - refundAmount equals loanAmount. Use Cancel a BNPL loan by external transaction ID to refund the whole purchase.
Unprocessable Entity - A banca.me discount was applied to the customer and refundAmount is lower than or equal to 0 or greater than loanAmount. The error code is returned in message.
Too Many Requests - More than one request in 15 seconds to this endpoint or to Cancel a BNPL loan by external transaction ID. The response includes a Retry-After header and a plain-text body.