Skip to content

PIX

Brazilian Instant Payment System

Introduction

The Brazilian Instant Payment System (PIX) is a new payment method created by the Central Bank of Brazil. It is a fast, secure and convenient way to make payments and transfer money. PIX is available 24/7, including weekends and holidays, and it is free for individuals and small businesses. Currently is the most popular payment method in Brazil.

Getting Started

Generate Orders

To generate a PIX order, you need to send a POST request to the following endpoint:

POST /api/v1/order
Host: binance.latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"

{
  "customer": {
    "name": "Customer’s full name",
    "document": "111.222.333-44", # Note 1 below (required)
    "email": "[email protected]", # (required)
    "phone": "11999999999", # (required)
    "birth": "1996-03-09", # (required)
    "kyc_level_merchant": "Kyc_10k" # (optional)
  },
  "order":{
    "code": "123", # Order reference in your system (required)
    "notification_url": "your_payback_notification_url.com", # Where we'll notify when status changes (required)
    "value": 50.00, # (required)
    "additional_info": "Some description of your order as String", # (required)
    "ocbs": false, # (optional)
    "payment_method": "pix", # (required)
    "submerchant": {
      "document": "12.345.678/0001-90"
    }
  }
}

The document can be a valid CPF or CNPJ. If CNPJ is used, the company name must be passed in the name parameter.

CPF and CNPJ are the Brazilian individual and company identification numbers, respectively.

If your request is successful, you will receive a response to the following:

{
  "latam_id": "7c0b8129-f556-4357-bb6e-8189c2943024",
  "code": "order_id_in_your_system",
  "confirmation_url": "https://binance.latamgateway.com/7c0b8129-f556-4357-bb6e-8189c2943024", # Redirect URL
  "qrcode_link": "https://binance.latamgateway.com/qrcode/7c0b8129-f556-4357-bb6e-8189c2943024" # Link to the QRcode
}

Business errors are returned with a 403 status code. The response will contain the following parameters:

{
  "latam_id": "7c0b8129-f556-4357-bb6e-8189c2943024",
  "message": "kyc message table below",
  "code": "kyc code table below"
}

KYC RESPONSE CODES DESCRIPTIONS

Code Message
KYC110 Invalid CPF, please verify your date of birth and CPF number.
KYC111 Invalid CNPJ, please verify your CNPJ number.
KYC112 Different name from the federal revenue register of natural persons.

Get QR code and Image

To get QR Code info and image after generating the order:

GET /api/v1/qrcode/{latam_id}
Host: binance.latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"

The response will contain the following parameters:

{
  "qrcode_data": "string with all pix transaction info needed to be copy and paste into bank app",
  "qrcode_image": "base64 of the image"
}

Reverse Order

To reverse the order:

POST /api/v1/order/{order_id}/reverse
Host: binance.latamgateway.com
Content-Type: "application/json"
ACCOUNT_TOKEN: "<token>"

If your request is successful, you will receive a response to the following:

{
  "message": "message": "Refund requested. Waiting for confirmation from the bank."
}

Business errors are returned with a 400 status code. The response will be:

{
  "message": "Only PIX and PicPay transactions can be refunded."
}