SolaBill API Getting Started
Integrate your ERP or billing system in a few steps: authenticate, submit invoice payloads, monitor processing status, and receive events through webhooks.
Prerequisites
Before calling production APIs, make sure your client account setup is complete.
| Requirement | Description | Status |
|---|---|---|
| Client User Credentials | Active email/password for API login | Required |
| Peppol Participant ID | Registered ID for outbound document exchange | Required |
| Webhook Endpoint | Public HTTPS endpoint to receive callbacks | Recommended |
| Sandbox Validation | Run end-to-end test in sandbox first | Recommended |
Authentication
Get an access token and pass it in the Authorization: Bearer <token> header.
curl -X POST "https://solabill.com/api/v1/client/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "client.user@example.com",
"password": "password",
"device_name": "erp-connector"
}'
{
"success": true,
"message": "Login successful",
"data": {
"token": "1|sample-token-value",
"token_type": "Bearer"
}
}
Send Invoice
Create an invoice using your bearer token. Keep invoice_number unique per client account.
curl -X POST "https://solabill.com/api/v1/client/invoices" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"invoice_number": "INV-2026-1001",
"recipient_name": "Acme LLC",
"recipient_peppol_id": "ae:TRN123456789000003",
"issue_date": "2026-02-12",
"due_date": "2026-03-12",
"currency": "AED",
"total_amount": 1500.00
}'
Validation
Payload is validated before persistence. Invalid fields return HTTP 422 with field-level messages.
Queue Processing
After create, message processing runs in the background queue for transport and status updates.
Idempotency Strategy
Use unique invoice identifiers on retries to avoid duplicate financial records.
Track Status
Use tracking endpoints to monitor lifecycle states from acceptance to delivery.
curl -X GET "https://solabill.com/api/v1/client/messages/{trackingId}" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
| Status | Meaning | Action |
|---|---|---|
| accepted | Request accepted and queued | Wait for next event |
| processing | Document under validation/transport | Poll or wait for webhook |
| delivered | Successfully delivered | Mark complete in ERP |
| failed | Delivery or validation failed | Inspect error and retry flow |
Webhook Flow
Subscribe to events to avoid frequent polling and get near-real-time updates.
- Create a webhook subscription from your client account.
- Verify signatures on incoming callback requests.
- Return HTTP 2xx quickly and process asynchronously in your system.
- Handle retries for duplicate deliveries safely.
Errors and Retries
| HTTP Code | Type | Handling Guidance |
|---|---|---|
| 400 | Bad request | Fix payload structure and retry once corrected. |
| 401 | Unauthorized | Refresh login token and retry. |
| 403 | Forbidden | Verify account permissions and tenant scope. |
| 422 | Validation error | Inspect field errors and correct source mapping. |
| 429 | Rate limited | Apply exponential backoff and jitter. |
| 500/503 | Server/transient | Retry with backoff; alert if repeated. |
{
"success": false,
"message": "Validation failed",
"errors": {
"invoice_number": ["The invoice number field is required."]
}
}
Go Live Checklist
- Validate all mandatory invoice fields from your ERP mapping.
- Confirm tenant and client scope boundaries in every API call.
- Run sandbox tests for happy-path and failure-path scenarios.
- Enable alerting on webhook failures, queue delays, and API 5xx spikes.
- Review changelog before each release deployment.