API Reference
Payments (Pay Out)

Create a payment

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

Receives a Pix payment intent and queues it for asynchronous processing. The response only confirms receipt (queued); the result arrives in the webhook (Released or Declined). The intent id is in the Location header. Deduplication is by externalId. In Mimicr, the payment is validated ~1 s later, sent to the SPI (PendingPSP) and settled ~3 s later; amounts ending in ,11 and ,13 are declined and ,12 fails once in a recoverable way.

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: "pedido-123"
webhookUrlstring<uri>

Absolute (http/https) URL that receives the result webhook. Pay4Fun's example names it callBackUrl; both are accepted and one of them is required.

callBackUrlstring<uri>

Same as webhookUrl.

Example: "https://seusite.com/webhooks/payment"
amountnumber

Payment amount, greater than zero. Required except for Pix-CopyPaste, where the amount comes from the QR Code.

Example: 150
currencystring

Currency of amount (default BRL). Other currencies are converted automatically.

Example: "BRL"
paymentobjectrequired

Method and destination data.

Pix-Key
methodstringrequired

Pix-Key.

Pix-Key
dataobjectrequired
Show child attributes
pixKeyTypestringrequired

Key type.

CPFCNPJEVPEMAILPHONE
pixKeyValuestringrequired

Valid CPF/CNPJ without punctuation; EVP as a UUID; valid e-mail (up to 77 characters); phone as +55DDDDDDDDDDD.

Example: "cliente@exemplo.com"
Pix-BankData
methodstringrequired

Pix-BankData.

Pix-BankData
dataobjectrequired
Show child attributes
bankCodestring

COMPE code (3 characters). Send bankCode or bankISPB.

Example: "341"
bankISPBstring

ISPB (8 characters). Every bank has an ISPB; not every bank has a COMPE code. See GET /pix/api/v1/participants.

Example: "60701190"
branchstringrequired

Branch.

Example: "1234"
accountstringrequired

Account.

Example: "567890"
accountTypestringrequired

Account type.

PERSONALPAYMENTSAVING
documentstringrequired

Valid CPF or CNPJ of the holder.

Example: "11144477735"
Pix-CopyPaste
methodstringrequired

Pix-CopyPaste.

Pix-CopyPaste
dataobjectrequired
Show child attributes
qrCodeCopyPastestringrequired

Copy-and-paste QR Code string. The amount you send is ignored; the amount comes from the QR Code.

Pix-Session
methodstringrequired

Pix-Session.

Pix-Session
dataobjectrequired
Show child attributes
documentstringrequired

CPF/CNPJ with an active deposit session in your merchant. Only the latest valid one counts. In Mimicr, the session is the latest released session: true intent this document paid.

Example: "12345678909"
preValidationsobject[]

Synchronous validations before sending.

Show child attributes
typestringrequired

AccountDestination checks the destination bank; Receiver checks the receiver's document.

AccountDestinationReceiver
dataobject | arrayrequired

AccountDestination: array of { bankCode, bankISPB }. In Mimicr, it is the list of blocked banks. Receiver: { documentNumber }, which must match the receiver's document.

onFailRetryboolean

If true, retries recoverable failures such as insufficient balance. In Mimicr, up to 3 retries, 1 minute apart.

tagsstring[]

Free tags for your own organization and reports.

Responses

201Request accepted and queued. Location points to the created intent.
messagestring

Receipt message.

Example: "Solicitação de pagamento recebida com sucesso"
externalIdstring

Your externalId.

Example: "pedido-123"
statusstring

Always queued: the request was accepted and queued, not that the Pix was sent.

queued
400Required field missing or invalid, or unsupported currency.
typestringrequired

Problem type reference (RFC 9110).

Example: "https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

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

HTTP status.

Example: 400
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.
409externalId already processed (VAL-031).
typestringrequired

Problem type reference (RFC 9110).

Example: "https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

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

HTTP status.

Example: 400
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"
422Currency conversion failed (currency other than BRL with no quote).
typestringrequired

Problem type reference (RFC 9110).

Example: "https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"
titlestringrequired

Problem summary.

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

HTTP status.

Example: 400
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