---
title: Generate Arabic Invoice PDF API
slug: generate-arabic-invoice-pdf
url: https://apyhub.com/odelyo/service/generate-arabic-invoice-pdf
provider: Odelyo
tags: [arabic-invoice, invoice-pdf, bilingual-invoice, rtl-pdf, invoice-generation, pdf-generation]
auth: api_key
version: v1
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Generate Arabic Invoice PDF API

Arabic invoice PDF API: send seller, buyer and line items as JSON and get back an Arabic, English or bilingual invoice PDF with totals. Free tier, no card.f

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/odelyo/generate-arabic-invoice-pdf/invoices` | What it does Creates an invoice PDF in Arabic, English or both from the invoice data you send. It r… | 10 |

## Endpoint reference

### Invoice PDF

`POST https://api.eu.apyhub.com/odelyo/generate-arabic-invoice-pdf/invoices` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | body | string | yes | Required. Invoice date, printed as sent. Example: `2026-11-30`. |
| `font` | body | string | no | Font family. One of: naskh, kufi, sans, amiri. Default: `naskh`. Example: `naskh`. |
| `buyer.name` | body | string | yes | Required. Buyer name. Example: `Mohammed Ali`. |
| `buyer.email` | body | string | no | Buyer email. Example: `billing@example.com`. |
| `buyer.phone` | body | string | no | Buyer phone number. Example: `+966 11 000 0000`. |
| `buyer.address` | body | string | no | Buyer address. Example: `Riyadh, Saudi Arabia`. |
| `buyer.name_en` | body | string | no | Buyer name in English, used in bilingual layouts. Example: `Mohammed Ali`. |
| `buyer.cr_number` | body | string | no | Buyer commercial registration (CR) number. Example: `1010000000`. |
| `buyer.tax_number` | body | string | no | Buyer tax or VAT number. Example: `300000000000003`. |
| `lines` | body | array of object | yes | Required. Invoice line items. 1 to 500 items. |
| `lines[].discount` | body | number | no | Flat discount amount in the document currency, not a percent. Must not be more than quantity × unit_price, or the API returns 422 invalid_discount. Example: `10`. |
| `lines[].quantity` | body | number | yes | Required. Quantity. Minimum 0. Example: `2`. |
| `lines[].unit_price` | body | number | yes | Required. Price per unit. Minimum 0. Example: `500`. |
| `lines[].description` | body | string | yes | Required. Line description. Example: `Consulting`. |
| `lines[].tax_percent` | body | number | no | Tax rate for this line in percent, 0 to 100. Example: `15`. |
| `lines[].description_en` | body | string | no | Line description in English, used in bilingual layouts. Example: `Consulting`. |
| `notes` | body | string | no | Free-text notes printed near the bottom. Example: `Thank you for your business.`. |
| `title` | body | string | no | Heading printed on the invoice. Example: `فاتورة ضريبية`. |
| `format` | body | string | no | Page size. One of: A4, A5, Letter, Legal, receipt-80mm, receipt-58mm. Default: `A4`. Example: `A4`. |
| `number` | body | string | yes | Required. Invoice number. Example: `INV-1001`. |
| `output` | body | string | no | `base64` returns JSON with the PDF as base64. `binary` returns the PDF file itself (application/pdf). One of: base64, binary. Default: `base64`. Example: `base64`. |
| `seller.name` | body | string | yes | Required. Seller name. Example: `Al Nakheel Trading`. |
| `seller.email` | body | string | no | Seller email. Example: `billing@example.com`. |
| `seller.phone` | body | string | no | Seller phone number. Example: `+966 11 000 0000`. |
| `seller.address` | body | string | no | Seller address. Example: `Riyadh, Saudi Arabia`. |
| `seller.name_en` | body | string | no | Seller name in English, used in bilingual layouts. Example: `Al Nakheel Trading`. |
| `seller.cr_number` | body | string | no | Seller commercial registration (CR) number. Example: `1010000000`. |
| `seller.tax_number` | body | string | no | Seller tax or VAT number. Example: `300000000000003`. |
| `qr_text` | body | string | no | Text to encode in a QR code on the document. Example: `INV-1001`. |
| `currency` | body | string | yes | Required. Currency code or label printed next to amounts. Example: `SAR`. |
| `decimals` | body | integer | no | Number of decimal places for amounts, 0 to 3. Example: `2`. |
| `due_date` | body | string | no | Payment due date, printed as sent. Example: `2026-12-30`. |
| `filename` | body | string | no | File name for the PDF. Letters, digits, spaces, dots, dashes and underscores, up to 100 characters. Example: `invoice-1001.pdf`. |
| `language` | body | string | no | Language of the labels. One of: ar, en, bilingual. Example: `bilingual`. |
| `logo_url` | body | string | no | Logo as an http(s) URL or a data:image/ URI. Up to 2,000,000 characters. Example: `https://example.com/logo.png`. |
| `direction` | body | string | no | Text direction. `auto` uses right-to-left when the content has Arabic. One of: auto, rtl, ltr. Default: `auto`. Example: `auto`. |
| `landscape` | body | boolean | no | Render the page in landscape. Example: `false`. |
| `margin_mm` | body | number | no | Page margin in millimetres, 0 to 40. Example: `10`. |
| `footer_html` | body | string | no | Custom HTML for the page footer. Example: `<div>Footer</div>`. |
| `header_html` | body | string | no | Custom HTML for the page header. Example: `<div>Header</div>`. |
| `accent_color` | body | string | no | Accent colour as a hex value. Example: `#0F766E`. |
| `page_numbers` | body | boolean | no | Print page numbers. Example: `true`. |
| `amount_in_words` | body | string | no | Total in words, printed as sent. The API does not write it for you. Example: `ألف ومئة وخمسون ريالاً`. |

#### Quickstart

Create a one-line invoice with 15% tax and get the PDF back as base64.

```bash
curl -X POST "https://api.eu.apyhub.com/odelyo/generate-arabic-invoice-pdf/invoices" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"number":"INV-1001","date":"2026-11-30","currency":"SAR","seller":{"name":"Al Nakheel Trading"},"buyer":{"name":"Mohammed Ali"},"lines":[{"description":"Consulting","quantity":2,"unit_price":500,"tax_percent":15}]}'
```

#### What you'll get back

Returns a JSON object with `data` and `meta`. `data` holds the PDF as base64, its size, page count and the worked-out totals.

```json
{
  "data": {
    "pdf_base64": "JVBERi0x...",
    "bytes": 33232,
    "pages": 1,
    "totals": { "subtotal": 1000, "tax": 150, "total": 1150 }
  },
  "meta": { "request_id": "req_1567d9f22e1ec2ff", "version": "v1" }
}
```

## About

## What it does
The Arabic Invoice PDF API turns invoice data sent as JSON into a finished PDF invoice in Arabic, English or both. Send the invoice number, date, currency, seller and line items. The API returns the PDF with the subtotal, tax and total already worked out.

Set `language` to `ar`, `en` or `bilingual`. `direction` defaults to `auto`, which switches to right-to-left when the content has Arabic. Each item in `lines` takes a `quantity`, a `unit_price`, an optional `tax_percent` from 0 to 100, and an optional `discount`. The discount is a flat amount and cannot be more than the line amount. You can send up to 500 lines. Choose the page size with `format` (A4 by default), add your logo with `logo_url`, and print a QR code from any text with `qr_text`.

Teams use the Arabic Invoice PDF API to send bilingual invoices from online stores, add seller and buyer tax numbers to B2B invoices, and store an RTL invoice PDF with each order. Set `output` to `binary` to get the PDF file itself, or keep the default base64 JSON.

The API creates the PDF only. It does not submit invoices to a tax authority.

For a layout of your own, use [Convert HTML Content to PDF API](https://apyhub.com/apyhub/service/convert-html-content-to-pdf). For a separate QR image, such as a payment link in an email, use [Generate QR Code API](https://apyhub.com/apyhub/service/generate-qr-code).

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/odelyo/service/generate-arabic-invoice-pdf
