Skip to content

Refund

The refund process may be synchronous or asynchronous. The best practice is to update the refund status based on the notification. Each payment link allows only one successful refund (failure can be retried), and supports partial refund.

HTTP Request

POST /v2/cashier/payment-link/refund

Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Body
{
    "linkId": "{{link_id}}",
    "refundAmount": 9000,
    "reason": "refund test",
    "additionalInfo": {
        "bankTransferAccountInfo": {
            "bankCode": "332",
            "beneficiaryName": "antonio silva",
            "bankAccountNumber": "286435",
            "bankAccountType": "CHECKING",
            "bankBranchId": "0001",
            "ispb": "13140088",
            "document": {
                "documentId": "60131743007",
                "type": "CPF"
            }
        }
    }
}
Content-Type: application/json
{
    "code": 0,
    "message": "success",
    "data": {
        "linkId": "egGFE9mdsSa6DM5YwNGY5w",
        "orderId": "2022-12-15T14:07:00-01",
        "amount": 9999,
        "currency": "BRL",
        "country": "BR",
        "paymentStatus": "SETTLED",
        "callbackUrl": "https://your-domain/callback/",
        "redirectUrl": "https://your-domain/checkout-page",
        "description": "this is a test payment",
        "finalPaymentMethod": "PIX",
        "finalStatusTimestamp": 1671104207,
        "finalStatusTime": "2022-12-15 19:36:47",
        "refundAmount": 9000,
        "refundStatus": "IN_PROGRESS",
        "refundTime": "2022-12-15 19:38:47",
        "refundTimestamp": 1671104327,
        "email": "liquido-test@gmail.com",
        "phone": "+5511999999999",
        "allowPaymentMethods": [
            "CREDIT_CARD",
            "PIX",
            "BOLETO",
            "BANK_TRANSFER_BR"
        ],
        "billingAddress": {
            "zipCode": "04849333",
            "state": "SP",
            "city": "sao paulo",
            "district": "Jardim Gaivotas",
            "street": "Rua 9 de setembro",
            "number": "15",
            "country": "BR",
            "complement": "casa"
        },
        "refunded": false
    }
}

Request Body Parameters

Parameter Required Type Description
linkId String Unique payment link id.
refundAmount String refund amount. default value is paid amount.
reason String refund reason.
additionalInfo JSON additional Info. such as Account information of user receiving refund

AdditionalInfo Object Parameters

Parameter Type Description
bankTransferAccountInfo JSON Bank transfer account info.

BankTransferAccountInfo Object Parameters

Parameter Type Description
bankCode String The bankcode of the bank, 3 digits
beneficiaryName String The beneficiary name, such as BRL_LIQUIDO
bankAccountNumber String The beneficiary bank account number
bankBranchId String The beneficiary bank branch Id
bankAccountType String The beneficiary bank account type, such as ContaCorrente
ispb String The ISPB of the bank, used in the same way as the shorter bank code, 8 digits
document JSON payer's identity proof, CPF or CNPJ

Document Object Parameters

Parameter Required Type Description
documentId String identity number
type String enum of CPF or CNPJ

Response Body Parameters

Parameter Type Description
linkId String Unique payment link id in liquido.
orderId String Unique order id in merchant system.
amount Long The transfer amount, The minimum settlement granularity of the current currency, such as 100=1BRL
country String Country code
currency String The currency code of the transferred fund
allowPaymentMethods List Declare which payment methods are included in the payment link. Supported Payment Methods see here
paymentStatus String Payment status, enum value as: INITIAL_STATUS, IN_PROGRESS, SETTLED.
finalPaymentMethod String The payment method for user to complete payment.
finalStatusTime String The datetime for user to complete payment. date format: "yyyy-MM-dd HH:mm:ss", timezone: UTC
finalStatusTimestamp Long The timestamp for user to complete payment.
refundTime String The datetime of complete refund. it is null when "refunded" is false. date format: "yyyy-MM-dd HH:mm:ss", timezone: UTC
refundTimestamp Long The timestamp of complete refund. it is 0 when "refunded" is false.
refunded Boolean If true,meaning the payment has been refunded.
refundAmount Long The refund amount, The minimum settlement granularity of the current currency, such as 100=1BRL
refundStatus String The refund status, enum value as: INITIAL_STATUS, IN_PROGRESS, SETTLED, FAILED.
email String customer's email
phone String Mobile phone number, must start with country calling codes, such as "+55".
billingAddress Address Object Billing address info.
callbackUrl String When the payment link status changed. liquido will send a post http request to the callback url.
redirectUrl String When the payment completed. payment link will redirect to redirectUrl if it is not null.
description String Description of payment

BillingAddress Object Parameters

Parameter Type Description
zipCode String zip code. such as CEP in Brazil
state String state. should be abbreviation, such as SP in Brazil
city String city name.
district String district name.
street String street name.
number String street number.
complement String complement info.
country String country code.
Back to top