Invoices
Clear Invoice
Report a Standard (B2B) invoice to ZATCA.
POST
/
{onboard_id}
/
invoices
Clear Invoice
curl --request POST \
--url https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoicesimport requests
url = "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9090",
CURLOPT_URL => "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyWhat it does
Submits a standard (B2B) invoice to ZATCA for real-time clearance. ZATCA validates, signs, and returns the cleared invoice with a QR code — all before it’s considered legally issued.Authentication
Requires a valid token from Authenticate.Path Parameters
| Name | Type | Description |
|---|---|---|
| onboard_id | string | ID returned from the Onboard endpoint |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| invoice_number | string | Yes | Your internal invoice reference number |
| invoice_type | string | Yes | standard for B2B clearance |
| issue_date | string | Yes | Invoice issue date, YYYY-MM-DD |
| actual_delivery_date | string | Yes | Delivery date, YYYY-MM-DD |
| issue_time | string | Yes | Issue time, HH:MM:SS |
| note | string | No | Free-text note on the invoice |
| doc_currency_code | string | Yes | Document currency, e.g. SAR |
| tax_currency_code | string | Yes | Tax currency, e.g. SAR |
| customer_info | object | Yes | Buyer VAT number, name, address, party ID |
| supplier_info | object | Yes | Seller VAT number, name, address, party ID |
| payment_means | string | Yes | e.g. cash |
| payment_means_instruction_note | string | No | Free-text payment note |
| allowance_charge | object | Yes | Invoice-level discount/charge details |
| tax_total | object | Yes | Total tax amount and breakdown |
| legal_monitory_total | object | Yes | Total, tax-exclusive, tax-inclusive, and payable amounts |
| invoice_lines | array | Yes | Line items — quantity, price, tax per item |
Example Request
curl -X POST https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"invoice_number": "INV01",
"invoice_type": "standard",
"issue_date": "2026-06-09",
"actual_delivery_date": "2026-06-15",
"issue_time": "10:00:00",
"note": "test invoice",
"doc_currency_code": "SAR",
"tax_currency_code": "SAR",
"customer_info": {
"vat_number": "300295616200003",
"tax_type": "VAT",
"registration_name": "Adnoc Oil and Gas Company",
"address": {
"street_name": "King Fahd Road",
"building_number": "4590",
"plot_identification": "4590",
"city_subdivision_name": "Jeddah",
"city_name": "Jeddah",
"postal_zone": "11311",
"country": "SA",
"country_subentity": ""
},
"party_identification": {
"scheme": "CRN",
"id": "7051298821"
}
},
"supplier_info": {
"vat_number": "311262046600003",
"tax_type": "VAT",
"registration_name": "Najma Al Hulool",
"address": {
"street_name": "Ghirnatah, Riyadh 13241",
"building_number": "2596",
"plot_identification": "2596",
"city_subdivision_name": "Ghirnatah",
"city_name": "Riyadh",
"postal_zone": "13241",
"country": "SA",
"country_subentity": ""
},
"party_identification": {
"scheme": "CRN",
"id": "1010171097"
}
},
"payment_means": "cash",
"payment_means_instruction_note": "will receive in cash",
"allowance_charge": {
"charge_indicator": false,
"reason": "discount",
"amount": 0,
"currency": "SAR",
"tax_category": {
"id": "S",
"percent": 15,
"tax_type": "VAT"
}
},
"tax_total": {
"currency": "SAR",
"tax_amount": 3.75,
"tax_subtotal": {
"taxable_amount": 25,
"tax_amount": 3.75,
"tax_category": {
"id": "S",
"percent": 15,
"tax_type": "VAT"
}
}
},
"legal_monitory_total": {
"total_amount": 25,
"tax_exclusive_amount": 25,
"tax_inclusive_amount": 28.75,
"payable_amount": 28.75
},
"invoice_lines": [
{
"id": "1",
"unit_code": "EA",
"quantity": 1,
"amount": 25,
"tax_total": {
"currency": "SAR",
"tax_amount": 3.75,
"rounding_amount": 28.75
},
"item": {
"name": "Butter",
"classified_tax_category": {
"id": "S",
"percent": 15,
"tax_type": "VAT"
}
},
"price": {
"currency": "SAR",
"price_per_unit": 25,
"base_unit_code": "EA",
"allowance_charge": {
"charge_indicator": false,
"reason": "discount",
"amount": 0,
"base_amount": 25,
"currency": "SAR"
}
}
}
]
}'
Example Response
{
"status": "Success",
"invoice_number": "INV01",
"invoice": "PD94bWwgdmVyc2lvbj0iMS4wIi...(base64-encoded signed UBL XML, truncated)",
"id": "325c1994-2655-4d05-a15a-49398e949660",
"qr_code": "AQ9OYWptYSBBbCBIdWxvb2wCDzMxMTI2MjA0NjYwMDAwMw...(truncated)",
"message": "standard-invoice INV01
Was this page helpful?
⌘I
Clear Invoice
curl --request POST \
--url https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoicesimport requests
url = "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "9090",
CURLOPT_URL => "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.einvoice.sa.com:9090/v1/e-invoicing/{onboard_id}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
