Build with the Wafeq API
Automate complete accounting workflows—from sales and purchasing to banking, journals, and financial reports.
Build complete accounting workflows with Wafeq
Wafeq is a full accounting platform. Its public API lets you connect the commercial events in your product—quotes, sales, purchases, expenses, payments, and bank activity—to the accounting records and reports that finance teams rely on.
One connected accounting modelCreate an invoice or bill once, then use its Wafeq ID to record payments, apply dimensions, retrieve PDFs, and report on the resulting ledger activity.
What you can automate
| Workflow | API capabilities |
|---|---|
| Sales and receivables | Contacts, quotes, invoices, credit notes, payments, and tax-authority reporting |
| Purchases and payables | Suppliers, purchase orders, bills, debit notes, and supplier payments |
| Spend management | Expenses, receipt files, tax rates, accounts, projects, and cost centers |
| Banking | Bank accounts, imported statement transactions, and ledger transactions |
| Core accounting | Chart of accounts, manual journals, branches, and accounting dimensions |
| Financial reporting | Profit and loss, balance sheet, cash flow, and trial balance |
| Operations | Items, warehouses, employees, payslips, revenue recognition, and amortization |
Choose how to connect
Both integration types use the same API base URL and endpoint schemas. The difference is who owns the connection and how it is authorized.
| API key integration | OAuth app | |
|---|---|---|
| Best for | A private, server-to-server integration you control | A product or platform that connects Wafeq customers |
| Ownership | One Wafeq accounting organization | A developer organization, independent of any accounting organization |
| Organizations connected | One per API key | Many customer organizations |
| Authorization | An organization admin creates a key | Each customer chooses an organization and grants consent |
| Access | Organization-wide | Limited by the scopes the customer grants |
| Request header | Authorization: Api-Key <key> | Authorization: Bearer <access_token> |
| Manage it | API Keys in the connected Wafeq organization | Wafeq Developer Portal |
Start here
- Choose an integration type and authenticate, then verify the connected organization.
- Choose an accounting journey below.
- Use the linked API reference pages for the complete request and response schemas.
- Add idempotency and incremental sync before going to production.
Choose your workflow
- Quote to cash: create a quote, convert it to an invoice, and record the customer payment.
- Manage the invoice lifecycle: create invoices directly, issue adjustments, download PDFs, and report tax documents.
- Purchase to pay: create a purchase order, convert it to a bill, and record supplier payment.
- Record expenses and receipts: capture day-to-day spend and supporting files.
- Import and account for bank transactions: keep statement activity and the ledger aligned.
- Post journals and read financial reports: work with double-entry journals and management reports.
- Design a reliable integration: handle pagination, retries, idempotency, errors, and incremental sync.
- Track projects, cost centers, and custom data: preserve the dimensions your finance team needs.
- Work with files and attachments: upload supporting documents and connect them to accounting records.
API basics
The base URL is:
https://api.wafeq.com/v1Authenticate each request with the credential for your integration type:
# Private API key integration
Authorization: Api-Key <API_KEY>
# OAuth app connection
Authorization: Bearer <ACCESS_TOKEN>The endpoints and payloads are otherwise identical. See Choose an integration type and authenticate for API-key setup and the complete OAuth Authorization Code flow.
Keep API keys, OAuth client secrets, access tokens, and refresh tokens on your server. Never embed them in browser or mobile application code.
Accounting IDs connect the workflow
Most relationships use Wafeq object IDs. For example:
- An invoice references a customer contact, revenue account, and tax rate.
- A payment references the invoice and the account through which the money moved.
- A bill references a supplier and expense or asset accounts.
- Transactions can carry a project, cost center, branch, contact, or custom-field value.
List or create the required records first, store their IDs in your integration, and keep your own identifier in external_id where the endpoint supports it.
Public API and Saudi e-invoicing
Use the Wafeq Public API when Wafeq should hold the accounting record and its downstream financial impact. Saudi Arabia Phase 2 e-invoicing has additional compliance and onboarding requirements; see Wafeq Public API vs ZATCA API before choosing an integration path.
Next step
Updated about 9 hours ago