Pix

ℹ️

Please refer to the API Reference for the full request and response examples.

In Pix, the transmission of the payment order and the availability of funds to the receiving user takes place in real time, 24 hours a day and without the need for intermediates. Thus, it is a type of payment method that enables fast payments with lower transaction costs.

⚠️

Pix is currently available for providers Cielo 3.0 and Bradesco. First, you need to contact the provider in order to authorize this type of payment method.

The life cycle of a Pix transaction is as follows:

SEQUENCERESPONSIBLEDESCRIPTIONTRANSACTION STATUS
1MerchantGenerates the QR Code.12 - Pending
2ShopperPays QR Code.2 - Paid
3MerchantReceives payment confirmation notification.2 - Paid
4MerchantQueries the transaction status.2 - Paid
5MerchantReleases order.2 - Paid
6MerchantIf necessary, requests refund of the Pix transaction (similar to card refund).2 - Paid
7MerchantReceives refund confirmation notification.11 - Refunded
-MerchantQueries the transaction status.11 - Refunded

Creating a transaction with QR code Pix

You can generate a Pix QR code through Gateway de Pagamento by simply performing the integration as specified below.

Among the required request fields, two stand out:

  • Type, which must be sent as "Pix";
  • Provider, which must be "Cielo30" or "Bradesco2".

The response for the request will return the base64 encoded QR Code Pix image, which must be made available to the shopper.

See below the representation of the transactional flow in QR code Pix generation:

QRCode Pix transaction flow

The shopper then performs the QR code reading through one of the Pix payment enabled applications and makes the payment. In this step, there is no participation of the store or Cielo, as shown below:

Pix application transaction flow

Below we show a request example for generating the QR code Pix:

Request for creating the QR Code Pix

{ 
   "MerchantOrderId":"2020102601",
   "Customer":{
      "Name":"Nome do Pagador",
      "Identity":"12345678909",
      "IdentityType":"CPF"
   },
   "Payment":{ 
      "Type":"Pix",
      "Provider":"Bradesco2",
      "Amount":100,
      "QrCodeExpiration":86400
   }    
}

Requesting a Pix Refund

If the merchant needs to "cancel" a Pix transfer, it is possible to perform an operation called a "refund". It is important to note that the refund is not an instant operation, and can be complied with or not by the Pix provider. When a refund is accepted, the store receives a notification.

Pix return transaction flow
  • The shopper must require to the store (merchant) the partial or total refund, through the store's support channels;
  • The merchant agrees with the refund and identifies the original Pix payment.

When to ask for a Pix refund?

Some example scenarios for requesting a Pix refund are product return, charge errors, and product not available in stock.

Who should request a Pix refund via Gateway de Pagamento

The store (seller who received the Pix transaction amount) should request the Pix refund for API Gateway de Pagamento, in agreement with the shopper. Important: Be aware of time limits (regulated by Banco Central do Brasil).

How to ask for a Pix refund?

Via API Gateway de Pagamento .

Pix refund rules

  • Refund will be effective only if the merchant has a positive balance.
  • For transfers, sales and other Pix transactions, the time limit for refund is 90 days, according to Banco Central do Brasil.
  • The account must be scheduled transfer (transferência programada).
  • Clients that opt for automatic transfer will not have a positive balance in the payments account, therefore the refund will not be possible. The expected return is "Merchant with insufficient funds for refund" ("Lojista com saldo insuficiente para devolução").