If you’re building an expense app, an ERP integration or an AP workflow, you need invoice data as JSON — and you need to know when it’s wrong. The AlFasil API returns both the data and the checks.
One request in, structured JSON out
curl https://alfasil.com/v1/documents \
-H "Authorization: Bearer alfasil_live_…" \
-H "Content-Type: application/pdf" \
-H "Idempotency-Key: bill-4471" \
--data-binary @invoice.pdf
You get a document id immediately; a signed document.processed webhook arrives when it’s done (or poll GET /v1/documents/{id}).
What makes it different
- Validation built in: every response includes
warningswith stable codes (TOTAL_MISMATCH,TAX_ID_FORMAT,DUPLICATE_INVOICE…) and messages in English and Arabic. - Decimal strings, not floats: amounts are exact.
- Arabic-first: Arabic-Indic digits, Hijri dates and Gulf currencies are normalized.
- Idempotency keys make retries safe.
- Multi-invoice PDFs are split into separate documents.
Plans
The API is included in every paid plan, priced by pages processed. See the API documentation for endpoints, webhook verification code in Node.js and Python, and error codes.