Skip to content

Boleto

Boleto Payment

Create A Boleto Payment.

HTTP Request

POST /v1/payments/charges/boleto

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Create a Boleto payment with DIRECT payment flow
Request Body
{
    "idempotencyKey": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
    "amount": 10000,
    "currency": "BRL",
    "country": "BR",
    "paymentMethod": "BOLETO",
    "paymentFlow": "DIRECT",
    "payer": {
        "name": "Cliente - Isabela",
        "document": {
            "documentId": "51234567890",
            "type": "CPF"
        },
        "email": "testeemail@gmail.com",
        "phone": "+55 81987654321",
        "billingAddress": {
            "zipCode": "04794000",
            "state": "SP",
            "city": "Sao Paulo",
            "district": "Vila Gertrudes",
            "street": "Avenida das Nacoes Unidas",
            "number": "14401"
        }
    },
    "orderInfo": {  
        "orderId": "test-order-id",  
        "shippingInfo": { 
            "name": "shipping test name",  
            "phone": "+55 81987654321",  
            "email": "thiago@example.com",
            "address": { 
                "street": "street name",
                "number": "building number",
                "complement": "unit, apt, etc.",
                "district": "district, neighborhood, etc.",
                "city": "city name",
                "state": "state, state code",
                "zipCode": "zip code, postal code",
                "country": "BR"
            }
        }
    },
    "paymentTerm": {
        "paymentDeadline": 1671194415
    },
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID"
}
Create a Boleto payment with REDIRECT payment flow
Request Body
{
    "idempotencyKey": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
    "amount": 10000,
    "currency": "BRL",
    "country": "BR",
    "paymentMethod": "BOLETO",
    "paymentFlow": "REDIRECT",
    "payer": {
        "name": "Cliente - Isabela",
        "document": {
            "documentId": "51234567890",
            "type": "CPF"
        },
        "email": "testeemail@gmail.com",
        "phone": "+55 81987654321",
        "billingAddress": {
            "zipCode": "04794000",
            "state": "SP",
            "city": "Sao Paulo",
            "district": "Vila Gertrudes",
            "street": "Avenida das Nacoes Unidas",
            "number": "14401"
        }
    },
    "orderInfo": {  
        "orderId": "test-order-id",  
        "shippingInfo": { 
            "name": "shipping test name",  
            "phone": "+55 81987654321",  
            "email": "thiago@example.com",
            "address": { 
                "street": "street name",
                "number": "building number",
                "complement": "unit, apt, etc.",
                "district": "district, neighborhood, etc.",
                "city": "city name",
                "state": "state, state code",
                "zipCode": "zip code, postal code",
                "country": "BR"
            }
        }
    },
    "paymentTerm": {
        "paymentDeadline": 1671194415
    },
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID",
    "merchantRedirectInfo": {
        "merchantPageUrl": "https://www.merchantpageexample.com/123456"
    }
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "transferErrorMsg": "",
    "idempotencyKey": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
    "referenceId": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
    "paymentMethod": "BOLETO",
    "paymentFlow": "REDIRECT",
    "amount": 10000,
    "currency": "BRL",
    "finalAmount": 10000,
    "finalCurrency": "BRL",
    "country": "BR",
    "createTime": "2022-12-08 08:02:14 UTC",
    "scheduledTime": "2022-12-08 08:02:15 UTC",
    "payer": {
        "name": "Cliente - Isabela",
        "document": {
            "documentId": "51234567890",
            "type": "CPF"
        },
        "email": "testeemail@gmail.com",
        "phone": "+55 81987654321",
        "billingAddress": {
            "zipCode": "04794000",
            "state": "SP",
            "city": "Sao Paulo",
            "district": "Vila Gertrudes",
            "street": "Avenida das Nacoes Unidas",
            "number": "14401"
        }
    },
    "transferStatus": "IN_PROGRESS",
    "description": "this is a test",
    "callbackUrl": "https://api.liquido.com/v1/cashier/callback/",
    "transferDetails": {
        "boleto": {
            "barcode": "33299919800000100000001110725354807300286435",
            "digitalLine": "33290001151072535480673002864350991980000010000",
            "paymentTerm": {
                "paymentDeadline": 1671194415
            }
        }
    },
    "subMerchantId": "UUID",
    "redirectUrl": "https://www.redirect-qa.liquido.com?uid=ZddGZfCB6OergiZ",
    "merchantRedirectInfo": {
        "merchantPageUrl": "https://www.merchantpageexample.com/123456"
    }
}

Notification / Callback

Content-Type: application/json
{
    "eventType": "CHARGE_SUCCEEDED",
    "data":  {
        "chargeDetails": {
            "transferStatusCode": 200,
            "transferErrorMsg": "",
            "idempotencyKey": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
            "referenceId": "0bd88f8a-2c7e-4b95-903f-8da45d0e6129",
            "paymentMethod": "BOLETO",
            "paymentFlow": "REDIRECT",
            "amount": 10000,
            "currency": "BRL",
            "finalAmount": 10000,
            "finalCurrency": "BRL",
            "country": "BR",
            "createTime": "2022-12-08 08:02:14 UTC",
            "scheduledTime": "2022-12-08 08:02:15 UTC",
            "finalStatusTime": "2022-12-08 08:47:02 UTC",
            "payer": {
                "name": "Cliente - Isabela",
                "document": {
                    "documentId": "51234567890",
                    "type": "CPF"
                },
                "email": "testeemail@gmail.com",
                "phone": "+55 81987654321",
                "billingAddress": {
                    "zipCode": "04794000",
                    "state": "SP",
                    "city": "Sao Paulo",
                    "district": "Vila Gertrudes",
                    "street": "Avenida das Nacoes Unidas",
                    "number": "14401"
                }
            },
            "transferStatus": "SETTLED",
            "description": "this is a test",
            "callbackUrl": "https://api.liquido.com/v1/cashier/callback/",
            "transferDetails": {
                "boleto": {
                    "barcode": "33299919800000100000001110725354807300286435",
                    "digitalLine": "33290001151072535480673002864350991980000010000",
                    "paymentTerm": {
                        "paymentDeadline": 1671194415
                    }
                }
            },
            "subMerchantId": "UUID",
            "redirectUrl": "https://www.redirect-qa.liquido.com?uid=ZddGZfCB6OergiZ",
            "merchantRedirectInfo": {
                "merchantPageUrl": "https://www.merchantpageexample.com/123456"
            }
        }
    }
}

HTTP Headers Details

Key Value
Authorization "Bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Request Body

Parameter Required Type Description
idempotencyKey String Unique key to ensure idempotent requests. given by the merchant in their 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
paymentMethod String payment method, enum value as BOLETO
paymentFlow String payment flow, enum value as DIRECT or REDIRECT
payer JSON payer info
orderInfo JSON order info
paymentTerm JSON payment term info, such as payment expired date
description String description of payment
callbackUrl String URL where Liquido will send notifications associated to changes to this payment. will receive a post request.
subMerchantId String The sub merchant ID. Required for PSPs.
merchantRedirectInfo JSON The merchant redirect info.
riskData JSON The risk data of the payment. MERCHANT_APP_NAME or MERCHANT_WEBSITE must be provided in risk Data. Please see here for further details.

Create A Payment With Risk Data

Please see here for further details.

Response Body

Parameter Type Description
transferStatus String Transfer status, SETTLED, IN_PROGRESS, FAILED
transferStatusCode Integer Transfer status code, 200 transaction SETTLED or IN_PROGRESS, other FAILED
transferErrorMsg String Transfer error message if failed
referenceId String Unique key to payment ticket, generated by Liquido.
idempotencyKey String Unique key to ensure idempotent requests. given by the merchant in their system
amount Long The transfer amount
country String country code
currency String The currency code of the transferred fund
finalAmount Long The final amount that is used for creating the charge order. EX: for charge orders with FX conversion, this field represents the converted amount from the original requested amount.
finalCurrency String The currency code of the finalAmount.
paymentMethod String payment method, enum value as BOLETO
paymentFlow String payment flow, enum value as DIRECT or REDIRECT
payer JSON payer info
transferDetails JSON transaction details info
description String description of payment
callbackUrl String URL where Liquido will send notifications associated to changes to this payment. will receive a post request.
createTime String Payment ticket created time
scheduledTime String Payment ticket scheduled time
finalStatusTime String Transfer final status update time, final status include SETTLED, FAILED
subMerchantId String The sub merchant ID.
redirectUrl String The URL where you must redirect your customer to complete the payment. It will be included in the response when “paymentFlow” is “REDIRECT” in the request parameters.
merchantRedirectInfo JSON The merchant redirect info.

Object Parameters

Payer

Parameter Required Type Description
name String fullname(Input specification: Only a combination of uppercase and lowercase letters, numbers and spaces is allowed. Spanish and Portuguese letters, and other special characters are not allowed).
email String email.
phone String Mobile phone number. Should include “+55” as a prefix.
document JSON CPF or CNPJ is required in Brazil.
billingAddress JSON Billing address info. If empty, this field will be initialized with the Liquido default address.

Document

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

OrderInfo

Parameter Required Type Description
orderId String order identity number
shippingInfo JSON shipping info

ShippingInfo

Parameter Required Type Description
name String shipping name
phone String Mobile phone number. Should include “+55” as a prefix.
email String email address
address JSON the same as billingAddress

Address

Parameter Required Type Description
zipCode String zip code. such as CEP in Brazil, 8 digits.
state String state. should be abbreviation, such as SP in Brazil, Length 2 characters.
city String city name. The length is no more than 30 characters.
district String district name. The length is no more than 50 characters.
street String street name. The length is no more than 100 characters.
number String street number. The length is no more than 8 characters.
complement String complement info. The length is no more than 50 characters.
country String country code. BR.

PaymentTerm

Parameter Required Type Description
paymentDeadline Long timestamp of seconds, payment dead line should within 5years

TransferDetails

Parameter Type Description
boleto JSON boleto detail info

Boleto

Parameter Type Description
barcode String barcode
digitalLine String digitalLine
paymentTerm JSON payment term info, such as payment expired date

MerchantRedirectInfo

Parameter Required Type Description
merchantPageUrl String It is a URL that redirects to merchant page. It should be include when you need Liquido to redirect your customers back to your page after customers finish payments.
This URL can only be set when ‘paymentFlow’ is ‘REDIRECT’ in the payment request.

Transfer Status

Parameter Description
IN_PROGRESS The transaction of this method has started, but no transactions have been processed yet.
SETTLED The funds of the transaction of this payment have been transferred to the store.
REFUNDING The transaction of this payment is refunding.
REFUNDED The transaction of this payment method has been refunded.
FAILED There was an error while processing the transaction of this payment. This status is followed by a message with more details about the error.

Notification Event Type

CHARGE_SUCCEEDED,
CHARGE_FAILED,
CHARGE_CHARGED_BACK,
CHARGE_REFUND_SUCCEEDED,
CHARGE_REFUND_FAILED;

Boleto Receipt PDF

A receipt PDF can be downloaded after created a payment.

HTTP Request

GET /v1/payments/files/boleto/pdf/{{idempotencyKey}}

Request Parameters

Key Value
Authorization "Bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Response Body Parameters

Parameter Required Type Description
path String A PDF file link for receipt

PDF Example

voucher

Back to top