API Reference
AuthenticationPOSTGet a token
Payments (Pay Out)POSTCreate a paymentGETList paymentsGETGet a payment intentGETGet a payment by externalIdGETGet a payment by its own idGETValidation errorsGETWithdraw errorsGETPayment receipt
Deposits (Pay In)POSTCreate a deposit intentPUTUpdate an intentPATCHUpdate an intent's depositsDELCancel an intentPOSTRequest a refundGETList deposit intentsGETGet a deposit intentGETGet an intent by externalIdGETGet a depositGETValidation errorsGETDeposit errorsGETIntent receiptsGETDeposit receipt
AccountGETGet the accountGETGet the balanceGETGet the statementGETStatement entry receiptGETList Pix keysPOSTRegister a Pix keyDELDelete a Pix keyGETList account limitsGETGet an account limitPOSTRequest a limit increase
ConfigurationsGETList flagsPUTUpdate a flagGETList proxiesPUTUpdate a proxyGETGet transaction limitsPUTUpdate transaction limitsGETList payment methodsPUTUpdate payment methodsGETList deposit methodsPUTUpdate deposit methods
Get a token
POST
Base URL: /authhttps://pay4fun.mimicr.dev · provider: https://go.dev.pay4fun.comExchanges clientId and clientSecret for a Bearer JWT (RS256, Keycloak format) valid for 300 seconds. The client credentials flow has no refresh: request a new token before it expires. In Mimicr, the credentials are your sandbox's (GET https://api.mimicr.dev/v1/pay4fun).
Authorization
Public route, no token.
Body
application/jsonclientIdstringrequired
Client ID issued by Pay4Fun.
"<client_id>"clientSecretstringrequired
Client Secret issued by Pay4Fun.
"<client_secret>"Responses
200Token issued.
access_tokenstring
JWT (RS256) to send in the Authorization: Bearer header.
expires_ininteger
Token lifetime in seconds (300).
300refresh_expires_ininteger
Refresh token lifetime in seconds (0 when not applicable).
0refresh_tokenstring | null
Refresh token. Always null in the client credentials flow.
token_typestring
Always Bearer.
Bearernot-before-policyinteger
Keycloak field, always 0.
0session_statestring | null
Keycloak field, always null.
scopestring
Scope granted to the client.
"payment-gateway"401Invalid clientId or clientSecret. Empty body.
502Authentication service unavailable.
titlestring
Error title.
"Authentication service unavailable"statusinteger
HTTP status.
502