API Reference
Configure the application
/v1/confighttps://openfinance.efi.mimicr.dev · provider: https://openfinance-h.api.efipay.com.brRegisters the application's return URL (redirectURL) and webhook URL (webhookURL). Without this configuration no webhook is sent and the payer doesn't return to your application after the consent. Each call replaces the previous one.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Body
application/jsonWhere the payer returns after authorizing or refusing at the bank. Efí appends identificadorPagamento (or identificadorVinculo, identificadorAdesao) and, on refusal, erro=acesso_negado.
"https://sua-app.dev/open-finance/retorno"URL that receives the webhooks of payments, refunds, enrollments and consents.
"https://sua-app.dev/open-finance"How your server recognizes Efí's webhooks. Mimicr has no mTLS: in mtls mode the POST goes to the URL as is.
Show child attributes
mtls (default): Efí presents its certificate. hmac: the registered hash goes in the URL query string (?hmac=<hash>), with no body signature.
mtlshmacRequired when type is hmac.
sync (default): the payer sees Efí's processing page on the way back. async: returns straight away and the result arrives through the webhook.
syncasyncGenerates a txid automatically for payments to a Pix key. Default false.
Responses
201Configuration saved (the body echoes the full configuration).
Where the payer returns after authorizing or refusing at the bank. Efí appends identificadorPagamento (or identificadorVinculo, identificadorAdesao) and, on refusal, erro=acesso_negado.
"https://sua-app.dev/open-finance/retorno"URL that receives the webhooks of payments, refunds, enrollments and consents.
"https://sua-app.dev/open-finance"How your server recognizes Efí's webhooks. Mimicr has no mTLS: in mtls mode the POST goes to the URL as is.
Show child attributes
mtls (default): Efí presents its certificate. hmac: the registered hash goes in the URL query string (?hmac=<hash>), with no body signature.
mtlshmacRequired when type is hmac.
sync (default): the payer sees Efí's processing page on the way back. async: returns straight away and the result arrives through the webhook.
syncasyncGenerates a txid automatically for payments to a Pix key. Default false.
400redirect_url_obrigatorio or webhook_url_obrigatorio.
Error code, in snake_case (e.g. valor_invalido, chave_idempotencia_obrigatorio).
"valor_invalido"Error description.
"O valor do pagamento é inválido"401Missing, invalid or expired token, or a token issued for another API (invalid_token).
Authentication error code.
invalid_clientunsupported_grant_typeinvalid_tokeninsufficient_scopeError description.
"Credenciais inválidas ou inativas"403The token lacks the scope the route requires (insufficient_scope).
Authentication error code.
invalid_clientunsupported_grant_typeinvalid_tokeninsufficient_scopeError description.
"Credenciais inválidas ou inativas"422redirect_url_invalido, webhook_url_invalido, webhook_seguranca_invalido, webhook_seguranca_hash_invalido or process_payment_invalido.
Error code, in snake_case (e.g. valor_invalido, chave_idempotencia_obrigatorio).
"valor_invalido"Error description.
"O valor do pagamento é inválido"500erro_aplicacao: internal server error.
Error code, in snake_case (e.g. valor_invalido, chave_idempotencia_obrigatorio).
"valor_invalido"Error description.
"O valor do pagamento é inválido"