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 1
- Example 2
- Example 3
- Example 4
{
"valor": "12.34",
"pagador": {
"chave": "19974764017",
"infoPagador": "Segue o pagamento da conta"
},
"favorecido": {
"chave": "joã[email protected]"
}
}
{
"valor": "12.34",
"pagador": {
"chave": "19974764017",
"infoPagador": "Segue o pagamento da conta"
},
"favorecido": {
"contaBanco": {
"nome": "JOSE CARVALHO",
"cpf": "10519952057",
"codigoBanco": "09089356",
"agencia": "1",
"conta": "123453",
"tipoConta": "cacc"
}
}
}
{
"valor": "12.34",
"pagador": {
"chave": "19974764017"
},
"favorecido": {
"chave": "joã[email protected]",
"cpf": "58629188090"
}
}
{
"valor": "12.34",
"pagador": {
"chave": "19974764017",
"infoPagador": "Segue o pagamento da conta"
},
"favorecido": {
"chave": "+5531999998888"
}
}
Responses The responses below represent Success(201) and consumption failures/errors.
- 🟢 201
- 🔴 400
- 🔴 409
- 🔴 422
- 🔴 500
{
"idEnvio": "12453567890123456789",
"e2eId": "E09089356202011251226APIff82f2e5",
"valor": "12.31",
"horario": {
"solicitacao": "2021-11-25T12:26:42.905Z"
},
"status":"EM_PROCESSAMENTO"
}
{
"nome": "documento_bloqueado",
"mensagem": "O documento desta conta tem bloqueios que impedem a emissão"
}
Ou
{
"nome": "chave_invalida",
"mensagem": "A chave informada não faz referência à conta Efíautenticada"
}
Ou
{
"nome": "chave_nao_pertence_ao_documento",
"mensagem": "O cpf do favorecido é diferente do documento em posse da chave"
}
InvalidValueError
{
"nome": "valor_invalido",
"mensagem": "Campo valor.original deve ser maior que zero"
}
Ou
{
"nome": "valor_invalido",
"mensagem": "Campo calendario.expiracao deve ser maior que zero"
}
Ou
{
"nome": "valor_invalido",
"mensagem": "Documento CPF em devedor.cpf é inválido"
}
{
"nome": "valor_invalido",
"mensagem": "Documento CNPJ em devedor.cnpj é inválido"
}
{
"nome": "id_envio_duplicado",
"mensagem": "O id de envio informado já foi utilizado em outro pagamento"
}
{
"nome": "pagamento_negado",
"mensagem": "Pagamento negado por análises"
}
ApplicationError
{
"nome": "erro_aplicacao",
"mensagem": "Ocorreu um erro ao validar a chave"
}
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.
{
"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-**"
}
}
}
{
"endToEndId": "E09089356202210262021APIbh1457fa",
"idEnvio": "4",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (pix.sent dados bancarios)",
"horario": {
"solicitacao": "2022-10-26T17:21:19.000Z",
"liquidacao": "2022-10-26T17:21:18.000Z"
},
"favorecido": {
"contaBanco": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**",
"agencia": "1",
"conta": "12345678",
"tipoConta": "corrente"
}
}
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/PixEnviadoNaoEncontrado",
"title": "Não Encontrado",
"status": 404,
"detail": "Pix enviado não encontrado para o e2eId informado."
}
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.write
Requer autorização para o escopo: gn.pix.send.read
Responses The responses below represent Success(200) and consumption failures/errors.
{
"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-**"
}
}
}
{
"endToEndId": "E09089356202210262021APIbh1457fa",
"idEnvio": "4",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (pix.sent dados bancarios)",
"horario": {
"solicitacao": "2022-10-26T17:21:19.000Z",
"liquidacao": "2022-10-26T17:21:18.000Z"
},
"favorecido": {
"contaBanco": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**",
"agencia": "1",
"conta": "12345678",
"tipoConta": "corrente"
}
}
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/PixEnviadoNaoEncontrado",
"title": "Não Encontrado",
"status": 404,
"detail": "Pix enviado não encontrado para o idEnvio informado."
}
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.
{
"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-**"
}
}
}
{
"endToEndId": "E09089356202210262021APIbh1457fa",
"idEnvio": "4",
"valor": "0.01",
"chave": "19974764017",
"status": "REALIZADO",
"infoPagador": "Segue o pagamento da conta (pix.sent dados bancarios)",
"horario": {
"solicitacao": "2022-10-26T17:21:19.000Z",
"liquidacao": "2022-10-26T17:21:18.000Z"
},
"favorecido": {
"contaBanco": {
"nome": "Francisco da Silva",
"cpf": "***.456.789-**",
"agencia": "1",
"conta": "12345678",
"tipoConta": "corrente"
}
}
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/PixEnviadoNaoEncontrado",
"title": "Não Encontrado",
"status": 404,
"detail": "Pix enviado não encontrado para o e2eId informado."
}
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.
- 🟢 200
- 🔴 400
- 🔴 403
- 🔴 422
- 🔴 429
- 🔴 500
{
"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."
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeOperacaoInvalida",
"title": "Operação Inválida",
"status": 400,
"detail": "A requisição que busca pagar um qrcode não respeita o schema ou está semanticamente errada.",
"violacoes": [
{
"razao": "O pixCopiaECola informado é referente a uma cobrança estática",
"propriedade": "qrcode.pixCopiaECola"
}
]
}
Ou
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeOperacaoInvalida",
"title": "Operação Inválida",
"status": 400,
"detail": "A requisição que busca pagar um qrcode não respeita o schema ou está semanticamente errada.",
"violacoes": [
{
"razao": "A chave do recebedor não foi encontrada",
"propriedade": "qrcode.pixCopiaECola"
}
]
}
{
"error": "insufficient_scope",
"error_description": "Access token has insufficient scope"
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeOperacaoInvalida",
"title": "Operação Inválida",
"status": 422,
"detail": "A requisição que busca pagar um qrcode não respeita o schema ou está semanticamente errada.",
"violacoes": [
{
"razao": "O pixCopiaECola informado é inválido.",
"propriedade": "qrcode.pixCopiaECola"
}
]
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/BaldeFichasVazio",
"title": "Balde de Fichas Vazio ",
"status": 429,
"detail": "Não há fichas no balde a serem consumidas "
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeErroInterno",
"title": "Erro Interno",
"status": 500,
"detail": "Funcionalidade desabilitada em ambiente de homologação."
}
OU
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeErroInterno",
"title": "Erro Interno",
"status": 500,
"detail": "Ocorreu um erro interno ao processar a requisição para detalhar o qrcode."
}
OU
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeErroInterno",
"title": "Erro Interno",
"status": 500,
"detail": "Ocorreu um erro interno ao buscar os detalhes da chave do recebedor."
}
OU
{
"nome": "erro_interno_servidor",
"mensagem": "Erro Interno do servidor"
}
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"
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeOperacaoInvalida",
"title": "Operação Inválida",
"status": 400,
"detail": "A requisição que busca pagar um qrcode não respeita o schema ou está semanticamente errada.",
"violacoes": [
{
"razao": "Saldo insuficiente para realizar o pagamento",
"propriedade": "qrcode.pagador"
}
]
}
{
"error": "insufficient_scope",
"error_description": "Access token has insufficient scope"
}
{
"type": "https://pix.bcb.gov.br/api/v2/error/QrcodeErroInterno",
"title": "Erro Interno",
"status": 500,
"detail": "Funcionalidade desabilitada em ambiente de homologação."
}
OU
{
"nome": "erro_interno_servidor",
"mensagem": "Erro Interno do servidor"
}