API Introduction
Overview
The FyPay Public API is a comprehensive platform for integrating with PIX payment services and account management. Our API allows you to:
- Generate dynamic PIX charges for receiving payments
- Send PIX payments to any key
- Send PIX payments via QR Code
- Query balances in real time
- Manage transaction refunds
- Integrate instant payments into your application
Environment
Production
| Resource | URL |
|---|---|
| API base URL | https://api.fypay.me/api |
| Health check | GET https://api.fypay.me/health |
| Dashboard | https://banking.fypay.me |
All API endpoints live under the /api prefix (for example, https://api.fypay.me/api/balance). The health check is the only route outside that prefix.
Authentication
All API endpoints (except token generation) require Bearer token authentication. The token is obtained with your OAuth 2.0 credentials and an X.509 client certificate presented in the TLS handshake (mTLS):
In the FyPay Dashboard, go to Settings → Credentials and generate your clientId and clientSecret. The clientSecret is shown only once.
Use the X.509 certificate (PEM, RSA 2048, valid for 2 years) linked to your account and its private key.
Call POST https://api.fypay.me/api/auth/token with your credentials, presenting the certificate in the TLS handshake (for example, curl --cert client.crt --key client.key).
Include the token in the Authorization: Bearer <token> header on all other requests. They do not require a certificate.
The token lifetime is returned in the expires_in field (in seconds) of the response. Renew the token before it expires.
HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of a request:
| Code | Meaning | Description |
|---|---|---|
200 | OK | Successful request |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid data in the request |
401 | Unauthorized | Token missing, invalid, or expired |
403 | Forbidden | Access to the resource denied |
404 | Not Found | Resource not found |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Internal server error |
503 | Service Unavailable | Service temporarily unavailable |
Date Format
All dates in the API follow the ISO 8601 standard with UTC timezone:
2024-01-15T10:30:00.000ZGetting Started
Authentication
Learn how to authenticate and obtain access tokens
Check Balance
Query your account balance
Generate PIX Charge
Create charges to receive payments
Send PIX Payment
Send PIX payments to any key
Pay via QR Code
Pay by scanning PIX QR Codes
Support
For technical questions or support, contact us:
- Email: suporte@fypay.me [A DEFINIR]
- Documentation: https://docs.fypay.me
- API health:
GET https://api.fypay.me/health