Guides
Getting started

Homologation rules

The amounts Efí uses in homologation to pay charges, reject refunds and decide sends, and how Mimicr reproduces them.

Efí's homologation has no real payer. To let you test the flows, it decides the outcome of charges, refunds and sends by amount. Mimicr reproduces these rules and adds actions to drive the other side when the rule is not enough.

Charges (cob and cobv)

Original amountOutcome
R$ 0.01 to R$ 10.00Paid on its own in about 3 s: CONCLUIDA, received Pix created and /pix webhook on the key
Above R$ 10.00Stays ATIVA, no webhook

The automatic payer is Efí itself ("EFI SA - INSTITUICAO DE PAGAMENTO", CNPJ 09089356000118) and infoPagador is "Pagamento automático de homologação". That is Mimicr's decision: Efí does not document the payer data.

To pay a charge above R$ 10.00, or with another payer:

bash
npx mimicr action efi pix.pay_cob txid=<txid> tipo=cobv nome="Maria Souza" doc=52998224725

An expired cob (calendario.expiracao on the sandbox clock) can no longer be paid. To receive a Pix without a charge, straight on a key or a static QR, use pix.receive chave=<chave> valor=12.50.

Refunds

Refund amountOutcome
R$ 0.01NAO_REALIZADO in about 3 s, with motivo, and a webhook
Any other valid amountDEVOLVIDO in about 3 s, with horario.liquidacao, and a webhook

A refund cannot exceed the Pix amount minus the refunds already made, nor the available balance. The motivo text of the R$ 0.01 rejection is Mimicr's; Efí does not document it. See Received Pix and refunds.

Pix send

AmountOutcome
R$ 0.01 to R$ 10.00REALIZADO in about 3 s, webhook on the paying key
R$ 10.01 to R$ 20.00NAO_REALIZADO in about 3 s (error AC03), webhook on the paying key
Above R$ 20.00Refused right away: 422 pagamento_negado, no webhook
Exactly R$ 4.00REALIZADO, then two received refunds of R$ 2.00 (natureza: ORIGINAL)
Exactly R$ 5.00REALIZADO, then one received refund of R$ 5.00

Mimicr's differences:

  • Efí only confirms or rejects sends by key when the payee is efipay@sejaefi.com.br; for other keys it answers a key error. Mimicr accepts any valid key. Keys ending in @inexistente.com answer 404 chave_favorecido_nao_encontrada.
  • Efí says sends by bank details "are not affected". In Mimicr, the same amount table applies to keys and bank details.
  • QR code payments (PUT /v2/gn/pix/:idEnvio/qrcode) do not follow the table: they are always REALIZADO, except for insufficient balance or chaos.

See Pix send.

Other homologation behaviors

  • POST /v2/gn/webhook/reenviar answers 500 WebhooksErroInterno, "Funcionalidade desabilitada em ambiente de homologação.". In Mimicr, resend from the console or the control API.
  • PUT /v2/gn/pix/:idEnvio/mesma-titularidade only exists in production and answers 403 AcessoNegado.
  • Efí does not document how to simulate the payer side of Pix Automático. In Mimicr, use the pixauto.* actions (see Pix Automático).

Turn the rules off

To decide everything yourself, turn off the homologation switches:

bash
curl --request PUT \
  --url https://api.mimicr.dev/v1/efi/homolog \
  --header 'Authorization: Bearer mk_...' \
  --header 'Content-Type: application/json' \
  --data '{ "autoPayCob": false, "envioRules": false }'
  • autoPayCob: false: no charge is paid on its own; pay with pix.pay_cob.
  • envioRules: false: the amount table no longer applies and the send stays EM_PROCESSAMENTO until you decide with pix.decide_envio idEnvio=<id> ok=true (or ok=false).

Force failures

Controlled chaos (console or PUT /v1/efi/chaos/{area}) makes charges, sends and Pix Automático fail with SPI codes, delays responses, returns 500, 503 or 429 and makes the first webhook attempt fail. The API Pix areas are cob, envio, conta and rec. See Sandbox control.