Skip to content

PIX

PIX is a Brazilian payment method, officially launched by the local Central Bank, that enables immediate payment confirmation and 24/7 availability. The user can complete the payment using any Home Banking or Ewallet App, by copying and pasting a Transaction ID or scanning a QR code

HTTP Request

POST /v1/payments/charges/pix

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "amount": 100,
    "currency": "BRL",
    "country": "BR",
    "paymentMethod": "PIX_STATIC_QR",
    "paymentFlow": "DIRECT",
    "payer": {
        "name": "Thiago Gabriel",
        "email": "thiago@example.com",
        "document": {
            "documentId": "53033315550",
            "type": "CPF"
        },
        "phone": "5058149876",
        "billingAddress": {  
            "zipCode": "04849333",
            "state": "SP",
            "city": "sao paulo",
            "district": "Jardim Gaivotas",
            "street": "Rua 9 de setembro",
            "number": "15",
            "complement": "casa",
            "country": "BR"
        }
    },
    "orderInfo": {  
        "orderId": "test-order-id",  
        "shippingInfo": { 
            "name": "shipping test name",  
            "phone": "shipping phone",  
            "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"
            }
        }
    },
    "riskData": {
        "ipAddress":"192.0.0.130",
        "customProperties": {
            "merchantId":"1527558812935028000",
            "merchantName":"LIQUIDO PTE. LTD."
      }
    },
    "callbackUrl": "http://api.client.com/notifications",
    "description": "hello world"
}

Response

Content-Type: application/json
{
    "transferStatusCode": 200,
    "transferErrorMsg": null,
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "paymentMethod": "PIX_STATIC_QR",
    "amount": 100,
    "currency": "BRL",
    "country": "BR",
    "finalAmount": 100,
    "finalCurrency": "BRL",
    "createTime": "2022-02-20 19:22:32 GMT-08:00",
    "scheduledTime": "2022-02-20 21:19:23 GMT-08:00",
    "finalStatusTime": null,
    "payer": {
        "name": "Thiago Gabriel",
        "document": {
            "documentId": "53033315550",
            "type": "CPF"
        },
        "email": "thiago@example.com",
        "phone": "5058149876",
        "billingAddress": {  
            "zipCode": "04849333",
            "state": "SP",
            "city": "sao paulo",
            "district": "Jardim Gaivotas",
            "street": "Rua 9 de setembro",
            "number": "15",
            "complement": "casa",
            "country": "BR"
        }
    },
    "transferDetails": {
        "pix": {
            "qrCode": "00020101021226580014BR.GOV.BCB.PIX01366b780a05-2659-4c6c-80d2-a8bd20c8396f520400005303986540530.005802BR5925Liquido Brl Pagamentos Di6014Belo Horizonte61083038040362290525tBxJ2ERi5uYks44S5Lz7SSvuI63044492",
            "qrCodeType": "STATIC",
            "expirationTime": null
        }
    },
    "amountDetails": {
        "taxAmountDetails": [
            {
                "taxRate": {
                    "type": "BR_IOF_FX_TAX",
                    "rate": 0.0038
                },
                "amount": 2
            }
        ],
        "fxAmountDetails": {
            "fxRate": {
                "timestamp": 1665082174,
                "base": "USD",
                "target": "BRL",
                "exchangeRate": 5
            },
            "baseAmount": 100,
            "targetAmount": 500
        }
    },
    "transferStatus": "IN_PROGRESS",
    "description": "hello world",
    "callbackUrl": "http://api.client.com/notifications"
}

Notification / Callback

Content-Type: application/json
{
    "eventType": "CHARGE_SUCCEEDED",
    "data":  {
        "chargeDetails": {
            "transferStatusCode": 200,
            "transferErrorMsg": null,
            "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
            "referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
            "paymentMethod": "PIX_STATIC_QR",
            "amount": 100,
            "currency": "BRL",
            "country": "BR",
            "finalAmount": 100,
            "finalCurrency": "BRL",
            "createTime": "2022-03-01 17:53:18 GMT-08:00",
            "scheduledTime": "2022-03-01 17:53:18 GMT-08:00",
            "finalStatusTime": null,
            "payer": {
                "name": "Thiago Gabriel",
                "document": {
                    "documentId": "53033315550",
                    "type": "CPF"
                },
                "email": "thiago@example.com",
                "phone": "5058149876",
                "billingAddress": {  
                    "zipCode": "04849333",
                    "state": "SP",
                    "city": "sao paulo",
                    "district": "Jardim Gaivotas",
                    "street": "Rua 9 de setembro",
                    "number": "15",
                    "complement": "casa",
                    "country": "BR"
                }
            },
            "transferDetails": {
                "pix": {
                    "qrCode": "00020101021226580014BR.GOV.BCB.PIX01366b780a05-2659-4c6c-80d2-a8bd20c8396f520400005303986540530.005802BR5925Liquido Brl Pagamentos Di6014Belo Horizonte61083038040362290525tBxJ2ERi5uYks44S5Lz7SSvuI63044492",
                    "qrCodeType": "STATIC",
                    "expirationTime": null
                }
            },
            "amountDetails": {
                "taxAmountDetails": [
                    {
                        "taxRate": {
                            "type": "BR_IOF_FX_TAX",
                            "rate": 0.0038
                        },
                        "amount": 2
                    }
                ],
                "fxAmountDetails": {
                    "fxRate": {
                        "timestamp": 1665082174,
                        "base": "USD",
                        "target": "BRL",
                        "exchangeRate": 5
                    },
                    "baseAmount": 100,
                    "targetAmount": 500
                }
            },
            "transferStatus": "SETTLED",
            "description": "hello world",
            "callbackUrl": "http://api.client.com/notifications"
        }
    }
}

HTTP Headers Details

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

Request Body Parameters

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 PIX_DYNAMIC_QR, PIX_STATIC_QR
paymentFlow String payment flow, enum value as DIRECT or REDIRECT
payer JSON payer info
expirationInfo JSON pix payment expiration info, required when using PIX_DYNAMIC_QR
orderInfo JSON order info
riskData JSON risk control info, if PSP, please add sub-merchant here, example as "customProperties":{"merchantId":"1527558812935028000","merchantName":"LIQUIDO PTE. LTD."}
description String description of payment.
NOTE:
1. If PIX_STATIC_QR, the max length accepted is 33 characters.
2. If PIX_DYNAMIC_QR, the max length accepted is 43 characters.
callbackUrl String URL where Liquido will send notifications associated to changes to this payment. will receive a post request.

Payer Object Parameters

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.
document JSON Wallet holder identity proof, such as CPF for Brazil.
billingAddress JSON Billing address info.

document Object Parameters

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

billingAddress Object Parameters

Parameter Required 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.

orderInfo Object Parameters

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

shippingInfo Object Parameters

Parameter Required Type Description
name String shipping name
phone String phone number
email String email address
address JSON the same as billingAddress

RiskData Object Parameters

Parameter Required Type Description
ipAddress String Payer's IP address
customProperties JSON Key/value pairs used to store additional custom metadata

expirationInfo Object Parameters

Parameter Required Type Description
expiresAt Long Dynamic QR code will expire at that time. unix timestamp in seconds. EX: 1651035000. The number of seconds to increment must be between 3600 and 604800.

Response Body Details

Parameter Required Type Description
idempotencyKey String Unique key to ensure idempotent requests. given by the merchant in their system
referenceId String Unique key to payment ticket
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
finalAmount String 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 flow, enum value as PIX_STATIC_QR, PIX_DYNAMIC_QR
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
transferStatus String Transfer status, SETTLED, IN_PROGRESS, FAILED
transferStatusCode int Transfer status code, 200 transaction SETTLED or IN_PROGRESS, other FAILED
transferErrorMsg String Transfer error message if failed
amountDetails JSON Amount details info

transferDetails Object Parameters

Parameter Type Description
pix JSON pix detail info

pix Object Parameters

Parameter Type Description
qrCode String barcode of pix order
qrCodeType String enum value of STATIC, DYNAMIC
expirationTime String expired time

AmountDetails

Parameter Type Description
taxAmountDetails JSON Tax amount details info
fxAmountDetails JSON FX amount details info

TaxAmountDetails

Parameter Type Description
taxRate JSON Tax rate info
amount Long Tax amount for this payment

TaxRate

Parameter Type Description
type String Taxes type string
rate Double Tax rate for this payment

FXAmountDetails

Parameter Type Description
fxRate JSON FX rate info
baseAmount Long The amount before exchange
targetAmount Long The amount after exchange

FXRate

Parameter Type Description
timestamp Long The time for getting exchange rate
base String Source currency
target String Target currency
exchangeRate Double The actual exchange rate

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.
CANCELED The transaction of this payment has been canceled.
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;
Back to top