Guides
Environment
Hosts, headers, response formats, pagination, dates, amounts and the GO 2.0 status vocabularies.
Hosts
| Environment | Base URL |
|---|---|
| Pay4Fun sandbox | https://go.dev.pay4fun.com |
| Pay4Fun production | https://go.pay4fun.com |
| Mimicr | https://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:
| Area | Prefix |
|---|---|
| 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
| Header | Where |
|---|---|
Authorization: Bearer <token> | On every call except /auth |
Content-Type: application/json | On 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
PUTandDELETE:200with no body. Cancelling a deposit intent answers204. - Receipts: the file (
application/pdforapplication/zip).
Errors come in three shapes; see Errors.
Pagination
{
"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, whereamountOriginalandamountConvertedare strings ("200.00"). currencyis an ISO 4217 code. Amounts in another currency are converted to BRL; see List currencies.
Statuses: three vocabularies
Always compare statuses case-insensitively.
| Where | Deposit | Payment |
|---|---|---|
| Write response | Draft, Pending, Approved, Released, Declined, Cancelled, Expired, Error, Refund | queued |
| Lookups and filters | DRAFT, PENDING, APPROVED, DECLINED, EXPIRED, CANCELED | Pending, PendingRetry, PendingPSP, Completed, Error |
| Webhook | Success, Rejected, FAILED, RETURNED, Expired | Released, 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).