An invoice extraction API that checks its own work

Updated

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 warnings with 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.

Try it on one of your invoices

No account needed. The original is deleted right after processing.

Drop invoices or receipts here

PDF, JPG, PNG, iPhone photos, e-invoice XML or a ZIP — up to 10 MB each

Questions

Is there a sandbox?

Use the free plan in the dashboard to try extraction; API keys are available from the Starter plan.

How are webhooks signed?

With HMAC-SHA256 over the timestamp and raw body, sent in the AlFasil-Signature header.

Ready for a whole month of invoices?

Start free with 50 pages a month. Paid plans add more pages, the API and Xero, QuickBooks and Zoho Books layouts.

Start freeSee plans and prices