Guides
Sandbox testing
Test payers, the Pay Out amount table, validation triggers, the homologation switch and controlled chaos.
The GO 2.0 documentation has no test data and no way to simulate payments. Everything on this page is a Mimicr rule, designed so you can reach each outcome Pay4Fun documents.
Opening balances
| Account | Opening balance |
|---|---|
transactional | R$ 10,000.00 |
owner | R$ 500.00 |
Paid deposits go into transactional; payments and refunds come out of it; fees come out of owner. A sandbox reset goes back to the opening balances.
Test payers (Pay In)
Deposits are not paid on their own. The payer pays on the hosted checkout (the intent's url), on the ITP page or through the deposit.pay action with one of these payers:
payer | Name and CPF | Bank | Outcome |
|---|---|---|---|
ana (default) | Ana Souza, 12345678909 | Bradesco, CC account | Approved: Success webhook, intent Released |
bruno | Bruno Lima, 52998224725 | Nubank, IP account | Fails screening (FAILED, DEP-114) when the intent asks for postValidations: Screening; without screening, pays normally |
carla | Carla Mendes, 11144477735 | Itaú, CC account | Her bank refuses over a limit: Rejected webhook with error AM02 |
davi | Davi Rocha, 39053344705 | Inter, POUPANCA account | Pays normally, with another CPF: use it to test Payer, rejectDifferentPayer and ITP |
The action also takes document and name to pay with any CPF/CNPJ (Bradesco bank, approved outcome). With Pix-ITP, only the holder of data.document pays; without payer or document, that holder pays (the test payer with the same CPF, if there is one).
Pay In triggers
| You send | Outcome |
|---|---|
Payer pre-validation with CPF 52998224725 | 422 DEP-110 on creation; the intent is DECLINED with DEP-111 in validation-errors |
Payer pre-validation and another payer | FAILED webhook, DEP-112 |
rejectDifferentPayer: true on Pix-QrDynamic, a Payer pre-validation and another payer | Rejected webhook, error DIFFERENT_PAYER |
AccountOrigin pre-validation without the payer's bank/account | FAILED webhook, DEP-113 |
postValidations: [{"type": "Screening"}] and payer bruno | FAILED webhook, DEP-114 |
Pix-QrDynamic not paid before expiration (default 300 s) | Expiry webhook, intent Expired |
Method turned off in /configurations/api/v1/deposit-methods | 400 DEP-041 |
Amount outside minDepositLimit and maxDepositLimit | 400 DEP-042 |
A paid deposit that takes the day's total over the transactional account's daily DEPOSIT limit (R$ 100,000.00) | FAILED webhook, DEP-115 in validation-errors |
Inactive currency (COP, PEN) or one without a quote (ARS) | 400 DEP-043 |
Pay Out amount table
Payments move on their own: validation ~1 s after creation, sending to the SPI (PendingPSP) and settlement ~3 s later (Completed, Released webhook). The cents of the BRL amount decide the outcome:
| Amount | Outcome |
|---|---|
| R$ x.11 | Error, Declined webhook with AC03 "Conta do recebedor inexistente ou inválida" |
| R$ x.12 | Recoverable failure AB03 (SPI timeout): PendingRetry, a new attempt ~3 s later and Completed |
| R$ x.13 | Error, Declined webhook with RR04 "Pagamento recusado por questões regulatórias" |
| Anything else | Completed, Released webhook |
Pay Out validation triggers
These are asynchronous: creation answers 201 queued and the refusal shows up in Validation errors, with a Declined webhook.
| Situation | Code |
|---|---|
Method turned off in /configurations/api/v1/payment-methods | VAL-020 |
Amount outside minPaymentLimit and maxPaymentLimit | VAL-021 |
The day's total goes over the transactional account's daily PAYMENT limit (R$ 50,000.00) | VAL-022 |
Pix-Session with no paid session deposit for that document | VAL-023 |
Receiver pre-validation with another document | VAL-024 |
AccountDestination pre-validation with the receiver's bank | VAL-025 |
| Not enough available balance | AM04 in withdraw-errors; with onFailRetry: true, PendingRetry and up to 3 more attempts, 1 minute apart |
Homologation switch
autoProcessPayments (on by default) makes payments settle on their own. Off, they stop at PendingPSP until you run payment.settle or payment.decline. Validation stays automatic.
curl --request PUT \
--url https://api.mimicr.dev/v1/pay4fun/homolog \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "autoProcessPayments": false }'Controlled chaos
To test resilience, turn on failures per area: deposit, payment or account.
curl --request PUT \
--url https://api.mimicr.dev/v1/pay4fun/chaos/payment \
--header 'Authorization: Bearer mk_...' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "apiErrorRate": 20, "apiErrorStatus": 503, "opsFailRate": 10, "opsFailCode": "AM04", "webhookFailRate": 30 }'- API errors answer
500,503or429with{"title": ..., "status": ...}, before or after processing. opsFailCodeindeposit:RejectedorFAILED. Inpayment:AC03,AM04,AB03orRR04, with the same semantics as the other sources.AC03andRR04decline the payment (Error,Declinedwebhook).AB03is recoverable:PendingRetryand a new attempt ~3 s later, up to 3 times.AM04is recoverable only withonFailRetry: true(a new attempt every minute, up to 3); without it, it declines. Chaos is rolled again on each attempt.accountonly has API errors and latency.webhookFailRatemakes the first attempt fail (and the retry kick in);webhookDuplicateRatedelivers the notification twice./authis not affected by chaos.
Every field is detailed in Sandbox control.