Build with InvoTax.
Connect any finance system in one of three ways — no rip-and-replace. Pick what fits each platform; mix them across a group.
Embed snippet
Webhook
REST API
Embed snippet
<script src="https://cdn.invotax.qa/embed.js"
data-client="acme-trading"
data-key="pk_test_••••"
data-system="odoo"></script>REST API
curl -X POST https://api-invotax.idealsolutions-apps.com/v1/documents \
-H "Authorization: Bearer sk_live_••••" \
-H "Content-Type: application/json" \
-d '{"type":"INVOICE","issuedAt":"2027-01-14T09:00:00+03:00","deviceId":"dev_••••",
"buyerName":{"en":"Acme","ar":"Acme"},
"lines":[{"description":"Steel","quantity":"3","unitPrice":"7800.00"}]}'Core endpoints
| POST | /v1/documents | Create an invoice, credit/debit note, or simplified document |
| POST | /v1/integrations/ingest | Inbound record from a connected system |
| GET | /v1/tax/summary | Computed GTA tax for a period |
| GET | /v1/reports/categories | Categorized totals across systems |
Authentication
Verifying webhook signatures
Node.js
const crypto = require('crypto');
// rawBody must be the exact bytes received (e.g. a Buffer from your raw
// body middleware) -- never the re-serialized, parsed JSON.
function verifyInvoTaxSignature(rawBody, signatureHeader, secret) {
const signingKey = crypto.createHash('sha256').update(secret, 'utf8').digest();
const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));
const { t, v1 } = parts;
const toleranceSeconds = 5 * 60;
if (Math.abs(Math.floor(Date.now() / 1000) - Number(t)) > toleranceSeconds) {
throw new Error('signature timestamp outside tolerance');
}
const signedContent = Buffer.concat([Buffer.from(`${t}.`, 'utf8'), rawBody]);
const expected = crypto.createHmac('sha256', signingKey).update(signedContent).digest('hex');
const expectedBuf = Buffer.from(expected, 'utf8');
const receivedBuf = Buffer.from(v1, 'utf8');
const valid =
expectedBuf.length === receivedBuf.length && crypto.timingSafeEqual(expectedBuf, receivedBuf);
if (!valid) throw new Error('signature mismatch');
}Python
import hashlib
import hmac
import time
# raw_body must be the exact bytes received on the wire -- never
# json.dumps(parsed_body).encode(), which can reorder or reformat.
def verify_invotax_signature(raw_body: bytes, signature_header: str, secret: str) -> None:
signing_key = hashlib.sha256(secret.encode("utf-8")).digest()
parts = dict(p.split("=", 1) for p in signature_header.split(","))
t, v1 = parts["t"], parts["v1"]
tolerance_seconds = 5 * 60
if abs(int(time.time()) - int(t)) > tolerance_seconds:
raise ValueError("signature timestamp outside tolerance")
signed_content = f"{t}.".encode("utf-8") + raw_body
expected = hmac.new(signing_key, signed_content, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, v1):
raise ValueError("signature mismatch")
