API Reference
Deposits (Pay In)

Create a deposit intent

POST/deposit/api/v1/intents
Base URL: https://pay4fun.mimicr.dev · provider: https://go.dev.pay4fun.com

Creates a Pix deposit intent with one or more methods (Pix-QrDynamic, Pix-QrStatic, Pix-ITP). Each deposit carries the copy-and-paste code or the ITP URL in reference. Deduplication is by externalId. In Mimicr, nobody pays on their own: the test payer pays on the url page, on the ITP page or through the deposit.pay action.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Body

application/json
externalIdstringrequired

Unique transaction identifier you define. Deduplication uses it, with no idempotency header.

Example: "deposito-456"
webhookUrlstring<uri>required

Absolute (http/https) URL for the intent's notifications.

Example: "https://seusite.com/webhooks/deposit"
depositsobject[]required

One or more deposit methods.

Pix-QrDynamic
methodstringrequired

Pix-QrDynamic.

Pix-QrDynamic
amountnumberrequired

Amount, greater than zero and within the deposit limits.

Example: 200
currencystring

ISO 4217 code (default BRL). Other currencies are converted to BRL.

dataobject
Show child attributes
expirationinteger

QR Code lifetime in seconds.

Example: 600
textInformationstring

Optional text shown to the payer.

rejectDifferentPayerboolean

Rejects payments from another holder.

Pix-QrStatic
methodstringrequired

Pix-QrStatic.

Pix-QrStatic
amountnumberrequired

Amount, greater than zero and within the deposit limits.

Example: 25
currencystring

ISO 4217 code (default BRL). Other currencies are converted to BRL.

dataobject
Show child attributes
textInformationstring

Optional text shown to the payer.

Pix-ITP
methodstringrequired

Pix-ITP.

Pix-ITP
amountnumberrequired

Amount, greater than zero and within the deposit limits.

Example: 100
currencystring

ISO 4217 code (default BRL). Other currencies are converted to BRL.

dataobjectrequired
Show child attributes
documentstringrequired

Valid CPF/CNPJ of whoever will pay. In Mimicr, only the holder of this document can pay the ITP.

Example: "39053344705"
redirectUrlstring<uri>required

Where the payer's bank returns after authorization.

Example: "https://sua-app.dev/retorno"
textInformationstring

Optional text shown to the payer.

matchingStrategystring

How the deposits release the intent. In Mimicr: FirstDeposit releases on the first paid deposit and closes the others; Accumulated releases only when all of them are paid.

FirstDepositAccumulated
validationsobject

Optional validations. Mimicr also accepts preValidations and postValidations at the root of the body.

Show child attributes
preValidationsobject[]

Synchronous, evaluated before the intent is accepted.

Show child attributes
typestring

Payer: the payer's document must be this one. AccountOrigin: the source account must be on the list.

PayerAccountOrigin
dataobject | array

Payer: { documentType: CPF|CNPJ, documentNumber }. AccountOrigin: array of { ispb, code, branch, account, accountType: CC|POUPANCA|IP }.

postValidationsobject[]

Asynchronous, processed after the payment.

Show child attributes
typestring

Only Screening.

Screening
tagsstring[]

Free tags.

sessionboolean

Marks the intent as a session deposit, reusable later in a Pix-Session payment.

draftboolean

Mimicr extension: creates the intent in Draft, the only status that accepts PUT. Pay4Fun does not document how to create an intent in Draft.

Responses

201Intent created. Location points to it.
externalIdstring

Your externalId.

Example: "deposito-456"
idstring<uuid>

Canonical identifier of the intent.

intentIdstring<uuid>

Deprecated alias of id.

urlstring<uri>

In Mimicr, the intent's hosted checkout page (/checkout/{id}), where the test payer pays.

statusstring

Intent status in the write vocabulary.

DraftPending
depositsobject[]

The deposits created.

Show child attributes
idstring<uuid>

Deposit id.

methodstring
Pix-QrDynamicPix-QrStaticPix-ITP
referencestring

The BR Code (copy and paste) to show the customer; for Pix-ITP, the ITP URL to redirect them to.

amountnumber

Amount in BRL.

Example: 200
statusstring

Deposit status.

Example: "Pending"
tagsstring[]

Tags sent.

400Field validation error (for example DEP-041 invalid or disabled method).
typestringrequired

Problem type reference (RFC 9110).

Example: "https://tools.ietf.org/html/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

Example: "One or more validation errors occurred."
statusintegerrequired

HTTP status.

Example: 400
intentIdstring | null

Id of the intent involved, or null when there is none yet.

errorsobject[]required

List of errors, one per field.

Show child attributes
codestringrequired

Error code (VAL-XXX on Payment, DEP-XXX on Deposit).

Example: "VAL-001"
messagestringrequired

Human-readable message.

Example: "Invalid Pix key"
fieldstring | null

Field that caused the error.

Example: "payment.data.pixKeyValue"
401Missing, expired or invalid token. Empty body.
409Duplicate externalId (DEP-123).
typestringrequired

Problem type reference (RFC 9110).

Example: "https://tools.ietf.org/html/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

Example: "One or more validation errors occurred."
statusintegerrequired

HTTP status.

Example: 400
intentIdstring | null

Id of the intent involved, or null when there is none yet.

errorsobject[]required

List of errors, one per field.

Show child attributes
codestringrequired

Error code (VAL-XXX on Payment, DEP-XXX on Deposit).

Example: "VAL-001"
messagestringrequired

Human-readable message.

Example: "Invalid Pix key"
fieldstring | null

Field that caused the error.

Example: "payment.data.pixKeyValue"
422Intent declined by the validation pipeline (DEP-110). In Mimicr, it happens with a Payer pre-validation for CPF 52998224725.
typestringrequired

Problem type reference (RFC 9110).

Example: "https://tools.ietf.org/html/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

Example: "One or more validation errors occurred."
statusintegerrequired

HTTP status.

Example: 400
intentIdstring | null

Id of the intent involved, or null when there is none yet.

errorsobject[]required

List of errors, one per field.

Show child attributes
codestringrequired

Error code (VAL-XXX on Payment, DEP-XXX on Deposit).

Example: "VAL-001"
messagestringrequired

Human-readable message.

Example: "Invalid Pix key"
fieldstring | null

Field that caused the error.

Example: "payment.data.pixKeyValue"
500Internal error.
titlestring

Error title.

Example: "Authentication service unavailable"
statusinteger

HTTP status.

Example: 502