Guides
Getting started

Environment

Hosts, headers, response formats, pagination, dates, amounts and the GO 2.0 status vocabularies.

Hosts

EnvironmentBase URL
Pay4Fun sandboxhttps://go.dev.pay4fun.com
Pay4Fun productionhttps://go.pay4fun.com
Mimicrhttps://pay4fun.mimicr.dev
Local Mimicr (development)http://pay4fun.localhost:4010

Every path is relative to the base and none ends with /. The API areas live under prefixes:

AreaPrefix
Authentication/auth
Payment (Pay Out)/payment/api/v1
Deposit (Pay In)/deposit/api/v1
Account/account/api/v1/{transactional,owner}
Configurations/configurations/api/v1
Profile/profile/api/v1
Billings/billings/api/v1
Currencies/currencies/api/v1
Pix utilities/pix/api/v1

Headers

HeaderWhere
Authorization: Bearer <token>On every call except /auth
Content-Type: application/jsonOn POST, PUT and PATCH
X-Trace-ID (response)On every response, errors included. Keep it and send it to support
Location (response)On the 201 creations of payments and deposits, with the intent's path

There is no idempotency header: deduplication uses the externalId within your merchant. Repeating an externalId answers 409 (VAL-031 for payments, DEP-123 for deposits). In Mimicr, the externalId is unique forever per intent type.

Response format

The HTTP status says what happened and the body is the resource itself, with no envelope:

  • Lookup: the object (200).
  • List: a pagination object (200).
  • Creation: the resource (201).
  • Most PUT and DELETE: 200 with no body. Cancelling a deposit intent answers 204.
  • Receipts: the file (application/pdf or application/zip).

Errors come in three shapes; see Errors.

Pagination

json
{
  "items": [],
  "totalCount": 100,
  "page": 1,
  "pageSize": 20,
  "totalPages": 5,
  "hasPreviousPage": false,
  "hasNextPage": true
}

The default is page=1 and pageSize=20. In Mimicr, a pageSize above 100 is reduced to 100. Intent lists come most recent first.

Dates and amounts

  • Dates in ISO 8601 UTC, without milliseconds: 2026-07-08T12:00:00Z.
  • Amounts are decimal numbers in reais (150.00). The exception is the deposit webhook, where amountOriginal and amountConverted are strings ("200.00").
  • currency is an ISO 4217 code. Amounts in another currency are converted to BRL; see List currencies.

Statuses: three vocabularies

Always compare statuses case-insensitively.

WhereDepositPayment
Write responseDraft, Pending, Approved, Released, Declined, Cancelled, Expired, Error, Refundqueued
Lookups and filtersDRAFT, PENDING, APPROVED, DECLINED, EXPIRED, CANCELEDPending, PendingRetry, PendingPSP, Completed, Error
WebhookSuccess, Rejected, FAILED, RETURNED, ExpiredReleased, Declined

In Mimicr, in deposit lookups, Released shows as APPROVED, Error as DECLINED and an intent with a refund as REFUND.

Isolation

Each sandbox is a merchant. Lookups of another merchant's resources answer 404; writes on another merchant's deposit intent answer 403 (DEP-130 in Mimicr).