Electronic Invoicing API
Fact Flexi Connect is an HTTP service that allows third-party systems, ERPs, billing software, SaaS platforms, to communicate with the AGT Angola Electronic Invoicing API (SIFP).
Why use Connect?
Integrating directly with the AGT API is complex. It requires:
- Implementing JWS RS256 digital signature with certificates
- Managing multiple environments (sandbox and production)
- Maintaining TLS 1.2 connections with keep-alive
- Handling AGT-specific errors and validations
Connect abstracts all this complexity. Your system sends a simple JSON and receives the AGT response.
What Connect does not do
Fact Flexi Connect is a bridge, not a database. The service:
- Does not store products, customers, stock or any business information from your system
- Does not keep issued documents, only records usage metadata for billing and logs
- Does not retain data after communication with AGT is complete
Your data stays in your system. Connect only authenticates, signs and forwards documents to AGT, ensuring they are registered in the official Electronic Invoicing database. The private key you send in each request is never stored, it is used exclusively for that request’s JWS signing and then discarded.
How it works
Features
| Feature | Description |
|---|---|
| Authentication | API Key via x-api-key header or Authorization: Bearer |
| v2 model | Company data sent in each request (NIF + private key) |
| Digital signature | Automatic JWS RS256 |
| Environments | Sandbox (HML) and Production (PROD) |
| Rate limiting | 60 req/min per API Key |
| Logs | Complete record of all calls |
| Validation | Zod, input errors caught before reaching AGT |
| Normalized responses | Connect translates AGT responses into a consistent format |
Environments (Sandbox HML / Production PROD)
The gateway communicates with AGT in two environments: sandbox/homologation (HML) and production (PROD). There is no separate URL for each environment: the API URL is always https://connect.factflexi.com.
The environment used for each request is determined automatically based on the type of your API Key:
- If your key was created in sandbox/homologation mode, the request is forwarded to AGT in the HML environment.
- If your key was created in production mode, the request is forwarded to AGT in the PROD environment.
You do not need to select the environment manually or change the endpoint. Just use the API Key corresponding to the environment where you want to operate.
Important: Do not mix keys from different environments in the same integration flow. Test first with a sandbox key, and only after validation switch to a production key.
Available Endpoints
Series
| Method | Route | Description | Scope |
|---|---|---|---|
POST | /v2/series | List numbering series | series:listar |
POST | /v2/series/solicitar | Request series creation | facturas:emitir |
Documents
| Method | Route | Description | Scope |
|---|---|---|---|
POST | /v2/documentos/emitir | Issue fiscal documents | facturas:emitir |
POST | /v2/documentos/status | Check validation status | facturas:consultar |
System
| Method | Route | Description |
|---|---|---|
GET | /health | Check service status |
Response Model
All responses follow the same format:
{
"success": true,
// ... endpoint-specific data
} On error:
{
"success": false,
"error": "Error description",
"code": "ERROR_CODE",
"details": {} // optional, validation details
} Common Error Codes
| HTTP | code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | API Key missing, invalid or revoked |
| 402 | LICENSE_EXPIRED | License expired or missing (unlimited model) |
| 402 | NIF_REQUIRED | nif field required (per-NIF model) |
| 402 | NIF_NOT_LICENSED | NIF not authorized or license expired (per-NIF model) |
| 403 | FORBIDDEN | Insufficient scope for this endpoint |
| 400 | INVALID_JSON | Request body is not valid JSON |
| 400 | VALIDATION_ERROR | Required fields missing or invalid |
| 502 | AGT_ERROR | Communication error with AGT |
Quick Start Guide
- Authentication, Get your API Key
- List Series, See available series
- Request Series, Create new series if needed
- Issue Document, Submit documents to AGT
- Check Status, Verify they were validated
Help and Contacts
If you need assistance during integration or have commercial questions:
- 📞 Phone / WhatsApp: 922 696 376
- ✉️ Email: [email protected]
- 🌐 Portal: connect.factflexi.com
- 📖 View Support Details