API Reference
Create a deposit intent
/deposit/api/v1/intentshttps://pay4fun.mimicr.dev · provider: https://go.dev.pay4fun.comCreates 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/jsonUnique transaction identifier you define. Deduplication uses it, with no idempotency header.
"deposito-456"Absolute (http/https) URL for the intent's notifications.
"https://seusite.com/webhooks/deposit"One or more deposit methods.
Pix-QrDynamic
Pix-QrDynamic.
Pix-QrDynamicAmount, greater than zero and within the deposit limits.
200ISO 4217 code (default BRL). Other currencies are converted to BRL.
Show child attributes
QR Code lifetime in seconds.
600Optional text shown to the payer.
Rejects payments from another holder.
Pix-QrStatic
Pix-QrStatic.
Pix-QrStaticAmount, greater than zero and within the deposit limits.
25ISO 4217 code (default BRL). Other currencies are converted to BRL.
Show child attributes
Optional text shown to the payer.
Pix-ITP
Pix-ITP.
Pix-ITPAmount, greater than zero and within the deposit limits.
100ISO 4217 code (default BRL). Other currencies are converted to BRL.
Show child attributes
Valid CPF/CNPJ of whoever will pay. In Mimicr, only the holder of this document can pay the ITP.
"39053344705"Where the payer's bank returns after authorization.
"https://sua-app.dev/retorno"Optional text shown to the payer.
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.
FirstDepositAccumulatedOptional validations. Mimicr also accepts preValidations and postValidations at the root of the body.
Show child attributes
Synchronous, evaluated before the intent is accepted.
Show child attributes
Payer: the payer's document must be this one. AccountOrigin: the source account must be on the list.
PayerAccountOriginPayer: { documentType: CPF|CNPJ, documentNumber }. AccountOrigin: array of { ispb, code, branch, account, accountType: CC|POUPANCA|IP }.
Asynchronous, processed after the payment.
Show child attributes
Only Screening.
ScreeningFree tags.
Marks the intent as a session deposit, reusable later in a Pix-Session payment.
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.
Your externalId.
"deposito-456"Canonical identifier of the intent.
Deprecated alias of id.
In Mimicr, the intent's hosted checkout page (/checkout/{id}), where the test payer pays.
Intent status in the write vocabulary.
DraftPendingThe deposits created.
Show child attributes
Deposit id.
Pix-QrDynamicPix-QrStaticPix-ITPThe BR Code (copy and paste) to show the customer; for Pix-ITP, the ITP URL to redirect them to.
Amount in BRL.
200Deposit status.
"Pending"Tags sent.
400Field validation error (for example DEP-041 invalid or disabled method).
Problem type reference (RFC 9110).
"https://tools.ietf.org/html/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400Id of the intent involved, or null when there is none yet.
List of errors, one per field.
Show child attributes
Error code (VAL-XXX on Payment, DEP-XXX on Deposit).
"VAL-001"Human-readable message.
"Invalid Pix key"Field that caused the error.
"payment.data.pixKeyValue"401Missing, expired or invalid token. Empty body.
409Duplicate externalId (DEP-123).
Problem type reference (RFC 9110).
"https://tools.ietf.org/html/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400Id of the intent involved, or null when there is none yet.
List of errors, one per field.
Show child attributes
Error code (VAL-XXX on Payment, DEP-XXX on Deposit).
"VAL-001"Human-readable message.
"Invalid Pix key"Field that caused the error.
"payment.data.pixKeyValue"422Intent declined by the validation pipeline (DEP-110). In Mimicr, it happens with a Payer pre-validation for CPF 52998224725.
Problem type reference (RFC 9110).
"https://tools.ietf.org/html/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400Id of the intent involved, or null when there is none yet.
List of errors, one per field.
Show child attributes
Error code (VAL-XXX on Payment, DEP-XXX on Deposit).
"VAL-001"Human-readable message.
"Invalid Pix key"Field that caused the error.
"payment.data.pixKeyValue"500Internal error.
Error title.
"Authentication service unavailable"HTTP status.
502