API Reference
Create a payment
/payment/api/v1/intentshttps://pay4fun.mimicr.dev · provider: https://go.dev.pay4fun.comReceives 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/jsonUnique transaction identifier you define. Deduplication uses it, with no idempotency header.
"pedido-123"Absolute (http/https) URL that receives the result webhook. Pay4Fun's example names it callBackUrl; both are accepted and one of them is required.
Same as webhookUrl.
"https://seusite.com/webhooks/payment"Payment amount, greater than zero. Required except for Pix-CopyPaste, where the amount comes from the QR Code.
150Currency of amount (default BRL). Other currencies are converted automatically.
"BRL"Method and destination data.
Pix-Key
Pix-Key.
Pix-KeyShow child attributes
Key type.
CPFCNPJEVPEMAILPHONEValid CPF/CNPJ without punctuation; EVP as a UUID; valid e-mail (up to 77 characters); phone as +55DDDDDDDDDDD.
"cliente@exemplo.com"Pix-BankData
Pix-BankData.
Pix-BankDataShow child attributes
COMPE code (3 characters). Send bankCode or bankISPB.
"341"ISPB (8 characters). Every bank has an ISPB; not every bank has a COMPE code. See GET /pix/api/v1/participants.
"60701190"Branch.
"1234"Account.
"567890"Account type.
PERSONALPAYMENTSAVINGValid CPF or CNPJ of the holder.
"11144477735"Pix-CopyPaste
Pix-CopyPaste.
Pix-CopyPasteShow child attributes
Copy-and-paste QR Code string. The amount you send is ignored; the amount comes from the QR Code.
Pix-Session
Pix-Session.
Pix-SessionShow child attributes
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.
"12345678909"Synchronous validations before sending.
Show child attributes
AccountDestination checks the destination bank; Receiver checks the receiver's document.
AccountDestinationReceiverAccountDestination: array of { bankCode, bankISPB }. In Mimicr, it is the list of blocked banks. Receiver: { documentNumber }, which must match the receiver's document.
If true, retries recoverable failures such as insufficient balance. In Mimicr, up to 3 retries, 1 minute apart.
Free tags for your own organization and reports.
Responses
201Request accepted and queued. Location points to the created intent.
Receipt message.
"Solicitação de pagamento recebida com sucesso"Your externalId.
"pedido-123"Always queued: the request was accepted and queued, not that the Pix was sent.
queued400Required field missing or invalid, or unsupported currency.
Problem type reference (RFC 9110).
"https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400List 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.
409externalId already processed (VAL-031).
Problem type reference (RFC 9110).
"https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400List 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"422Currency conversion failed (currency other than BRL with no quote).
Problem type reference (RFC 9110).
"https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1"Problem summary.
"One or more validation errors occurred."HTTP status.
400List 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