API Reference
API Pix: authenticationPOSTGet a token
Billing · AuthenticationPOSTGet a token (Billing)
Billing · NotificationsGETGet a notification
Bill payment

Get a token (Bill payment)

POST/v1/oauth/token
Base URL: https://pagarcontas.efi.mimicr.dev · provider: https://pagarcontas-h.api.efipay.com.br

Exchanges the application credentials (Client_Id and Client_Secret, in HTTP Basic) for a Bearer access token valid for 3600 seconds. The token only works on the Bill payment API: each Efí API has its own authorization endpoint and scopes. At Efí the request requires the application certificate (mTLS); Mimicr has no certificate, just swap the host.

Authorization

Public route, no token.

Body

application/json
grant_typestringrequired

Always client_credentials.

client_credentials

Responses

200Access token.
access_tokenstringrequired

JWT to send in Authorization: Bearer <token>.

token_typestringrequired

Always Bearer.

Bearer
expires_inintegerrequired

Lifetime in seconds (3600).

Example: 3600
scopestringrequired

Granted scopes, space-separated: gn.barcode.read, gn.barcode.pay.write, gn.barcode.pay.read, payment.webhook.write, payment.webhook.read.

400grant_type other than client_credentials (unsupported_grant_type).
errorstringrequired

Authentication error code.

invalid_clientunsupported_grant_typeinvalid_tokeninsufficient_scope
error_descriptionstringrequired

Error description.

Example: "Credenciais inválidas ou inativas"
401Invalid Client_Id or Client_Secret (invalid_client).
errorstringrequired

Authentication error code.

invalid_clientunsupported_grant_typeinvalid_tokeninsufficient_scope
error_descriptionstringrequired

Error description.

Example: "Credenciais inválidas ou inativas"