Skip to main content

Payment and Send Pix

The following endpoints bring the functionalities available for managing Pix Sending and Pix QR Code Payment.


Request for Pix sending

Endpoint designed to perform the direct sending of a Pix to a Pix key registered with a PSP, whether it's Efí or another. This endpoint may undergo changes when it enters the BACEN standardization scope. In this case, enabled clients will be notified in advance.

To use the Request for Pix sending endpoint, in addition to selecting the pix.send scope in yout Efi Bank account, it is necessary for the payer's Pix key to have a webhook associated with it. Through the webhook, Efí will inform you whether the Pix sending was successful or not.

If your application was created before July 29, 2024, you will need to modify the scopes (?) by deactivating and reactivating the pix.send scope within the Pix API to use the resource.

Instructions for Testing in Production

If you need to test the Pix sending endpoint in production, be aware of the following pre-approved limits for each account:


  • Efí Pro Accounts: R$ 0.30 - For yourself or secure contacts.
  • Efi Empresas Accounts: R$ 1.00 - For yourself or secure contacts.

It is a requirement of the endpoint to have an Efi Empresas account to make changes in the send Pix limits.


Instructions for testing in Sandbox

If you need to test the Pix sending endpoint, we have a functional Sandbox environment where it is possible to simulate all statuses returned by our API and by the webhook.

  • If the value of Pix is between R$ 0.01 and R$ 10.00:
    Pix is confirmed, information will come via Webhook.
  • If the value of Pix is between R$ 10.01 and R$ 20.00:
    Pix is rejected, information will come via Webhook
  • If the Pix value is above R$ 20.00:
    Pix is rejected already in the request, information will not come via Webhook.
  • Payments sent with a value of R$ 4.00 will generate two refunds received in the value of R$ 2.00.
  • Payments sent with a value of R$ 5.00 will generate one refund received in the value of R$ 5.00.
  • Payments sent via key will only be confirmed or rejected if the test key is used: [email protected]. Otherwise, an invalid key error will be reported.
  • Payments sent via bank details will not be changed.

Attention!

To improve service performance and avoid balance conflicts, we recommend that the Pix sending via API be conditioned on the completion of the previous transaction, which is notified through the webhook. If this practice is not followed and multiple sending requests are made at the same time, the integrator may face issues with sending.



PUT /v2/gn/pix/:idEnvio
Requires authorization for the scope: pix.send


Request

// Example of transfer to Pix key
{
"valor": "12.34",
"pagador": {
"chave": "19974764017",
"infoPagador": "Segue o pagamento da conta"
},
"favorecido": {
"chave": "joã[email protected]"
}
}

Responses

The responses below represent Success(201) and consumption failures/errors.

{
"idEnvio": "12453567890123456789",
"e2eId": "E09089356202011251226APIff82f2e5",
"valor": "12.31",
"horario": {
"solicitacao": "2021-11-25T12:26:42.905Z"
},
"status":"EM_PROCESSAMENTO"
}

Get Pix sent through the endToEndId

Endpoint to retrieve a Pix sent through its e2eId.

GET /v2/gn/pix/enviados/:e2eId
Requires authorization for the scope: gn.pix.send.read


Responses

The responses below represent Success(200) and consumption failures/errors.

{ // Pix sent through Pix API endpoint to a pix key
"endToEndId": "E09089356202210251208APIcdbe38b4",
"idEnvio": "identificadoEnvio123456789",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (endpoint pix sent)",
"horario": {
"solicitacao": "2022-10-26T09:05:32.000Z",
"liquidacao": "2022-10-26T09:05:31.000Z"
},
"favorecido": {
"chave": "[email protected]",
"identificacao": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**"
}
}
}

Get Pix sent through the Transaction identifier

Endpoint to retrieve a Pix sent through its idEnvio.

GET /v2/gn/pix/enviados/id-envio/:idEnvio
Requires authorization for the scope: lotecobv.writeRequer autorização para o escopo: gn.pix.send.read


Responses

The responses below represent Success(200) and consumption failures/errors.

{ // Pix sent through Pix API endpoint to a pix key
"endToEndId": "E09089356202210251208APIcdbe38b4",
"idEnvio": "identificadoEnvio123456789",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (endpoint pix sent)",
"horario": {
"solicitacao": "2022-10-26T09:05:32.000Z",
"liquidacao": "2022-10-26T09:05:31.000Z"
},
"favorecido": {
"chave": "[email protected]",
"identificacao": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**"
}
}
}

Get list of sent Pix

Endpoint to retrieve multiple sent Pix.

This endpoint has filters to narrow down the search results. Among all available filters, the inicio and fim filters are mandatory and represent the date range in which the queried transactions must be included.

GET /v2/gn/pix/enviados
Requires authorization for the scope: gn.pix.send.read


Request

To obtain the query result, it is necessary to inform the inicio and fim parameters, as shown in the code snippet below. These parameters restrict the results to the sent Pix transactions within this date range.

/v2/gn/pix/enviados?inicio=2022-01-01T00:00:00.000Z&fim=2022-12-31T23:59:59.000Z

Responses

The responses below represent Success(200) and consumption failures/errors.

// Pix sent through Pix API endpoint to a pix key
{
"endToEndId": "E09089356202210251208APIcdbe38b4",
"idEnvio": "identificadoEnvio123456789",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (endpoint pix sent)",
"horario": {
"solicitacao": "2022-10-26T09:05:32.000Z",
"liquidacao": "2022-10-26T09:05:31.000Z"
},
"favorecido": {
"chave": "[email protected]",
"identificacao": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**"
}
}
}

Detail QR Code Pix

Endpoint that allows you to detail the information associated with a QR Code Pix.

Attention!

Currently, the gn.qrcodes.read scope is down for maintenance, so this endpoint is temporarily unavailable. This functionality will be restored shortly.


POST /v2/gn/qrcodes/detalhar
Requires authorization for the scope: gn.qrcodes.read


Request

{
"pixCopiaECola": "00020101021226830014BR.GOV.BCB.PIX2561qrcodespix.sejaefi.com.br/v2 41e0badf811a4ce6ad8a80b306821fce5204000053000065802BR5905EFISA6008SAOPAULO60070503***61040000"
}

Responses

The responses below represent Success(200) and consumption failures/errors.

{
"tipoCob": "cob",
"txid": "7978c0c97ea847e78e8849634473c1f1",
"revisao": 0,
"calendario": {
"criacao": "2024-07-03T12:34:27.000Z",
"apresentacao": "2024-07-03T12:34:40.238Z",
"expiracao": 3600
},
"status": "ATIVA",
"devedor": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**"
},
"recebedor": {
"nome": "Empresa de Serviços SA",
"cpf": "***.456.789-**"
},
"valor": {
"final": "567.89"
},
"chave": "a1f4102e-a446-4a57-bcce-6fa48899c1d1",
"solicitacaoPagador": "Cobrança dos serviços prestados."
}

Pay QR Code Pix

Endpoint that allows you to pay for a Pix QR Code via API.

The endpoint of paying a QR Code Pix via API is similar to Pix sending, as the sending in question will be used to pay the charge specified in the pixCopiaECola field. This endpoint may undergo changes when it enters the BACEN standardization scope. In this case, enabled clients will be notified in advance.

To use Pay QR Code Pix endpoint, in addition to releasing the gn.qrcodes.pay scope, it is necessary for the payer's Pix key to have a webhook associated with it. Through the webhook, Efí will inform you whether the payment was made successfully or not.

Important!

To pay a charge via API it is necessary to inform the idEnvio, just as with regular shipping. This identifier must be unique for both common shipments and QR Code payment submissions;

To consume the QR Code Pix payment endpoint, it is not necessary to previously consume the Detail QR Code Pix endpoint. The detailing endpoint is complementary to the payment endpoint, that is, the integrator can consume the detailing endpoint, check the information and, later, consume the payment endpoint. However, the integrator is free to consume the payment endpoint directly;


PUT /v2/gn/pix/:idEnvio/qrcode
Requires authorization for the scope: gn.qrcodes.pay


Request

{
"pagador": {
"chave": "a1f4102e-a446-4a57-bcce-6fa48899c1d1",
"infoPagador": "Pagamento de QR Code via API Pix"
},
"pixCopiaECola": "00020101021226830014BR.GOV.BCB.PIX2561qrcodespix.sejaefi.com.br/v2 41e0badf811a4ce6ad8a80b306821fce5204000053000065802BR5905EFISA6008SAOPAULO60070503***61040000"
}

Responses

The responses below represent Success(201) and consumption failures/errors.

{
"idEnvio": "12453567890123456789",
"e2eId": "E09089356202011251226APIff82f2e5",
"valor": "12.31",
"horario": {
"solicitacao": "2021-11-25T12:26:42.905Z"
},
"status":"EM_PROCESSAMENTO"
}