---
updatedAt: 2026-09-13T21:03:51.000Z
agentTools:
  projectIndex: https://ae.docs.digitax.tech/llms.txt
---

# Create a UAE Self-Billed Invoice

Creates a new PINT-AE compliant self-billed e-invoice and submits it to the Peppol network.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DigiTax UAE API Endpoints",
    "description": "DigiTax UAE Public API — Peppol PINT-AE compliant e-invoicing.",
    "version": "3",
    "termsOfService": "https://digitax.tech/page/terms",
    "contact": {
      "name": "DigiTax",
      "url": "https://digitax.tech",
      "email": "support@namiri.tech"
    },
    "license": {
      "name": "Apache 2.0"
    }
  },
  "servers": [
    {
      "url": "https://api.digitax.tech/ae/v1",
      "description": "API"
    }
  ],
  "paths": {
    "/self-billed-invoices": {
      "post": {
        "tags": [
          "Self-Billed Invoices"
        ],
        "summary": "Create a UAE Self-Billed Invoice",
        "description": "Creates a new PINT-AE compliant self-billed e-invoice and submits it to the Peppol network.",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "trader_invoice_number",
                  "invoice_type_code",
                  "issue_date",
                  "document_currency_code",
                  "supplier_id",
                  "items",
                  "payments"
                ],
                "properties": {
                  "public_metadata": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Free-form text to attach to this resource, such as your own reference or a JSON string, up to 100 characters. Digitax stores it as given and returns it as `public_metadata` on the resource. Set at creation only."
                  },
                  "trader_invoice_number": {
                    "type": "string",
                    "description": "An issuer-assigned invoice number, unique within the business. When given, this is the document number sent over Peppol; otherwise, the DigiTax-generated number is used. Must contain valid Unicode and XML characters, with no leading or trailing whitespace, tabs, or line breaks",
                    "example": "ACME-SBI-2024-0042"
                  },
                  "transaction_types": {
                    "type": "array",
                    "description": "The list of applicable PINT-AE transaction types",
                    "items": {
                      "type": "string",
                      "enum": [
                        "FREE_TRADE_ZONE",
                        "DEEMED_SUPPLY",
                        "PROFIT_MARGIN_SCHEME",
                        "SUMMARY_INVOICE",
                        "CONTINUOUS_SUPPLY",
                        "AGENT_BILLING",
                        "SUPPLY_THROUGH_ECOMMERCE",
                        "EXPORTS"
                      ]
                    },
                    "example": [
                      "CONTINUOUS_SUPPLY"
                    ]
                  },
                  "invoice_type_code": {
                    "type": "string",
                    "description": "The UN/CEFACT document type code. See `GET /resources/invoice-types` for available values.",
                    "example": "389"
                  },
                  "issue_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The date on which the self-billed invoice was issued (YYYY-MM-DD). Must not be in the future and must not be more than 30 days in the past.",
                    "example": "2026-07-14"
                  },
                  "issue_time": {
                    "type": "string",
                    "description": "The invoice issue time (HH:MM:SS)",
                    "example": "10:00:00"
                  },
                  "due_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The payment due date (YYYY-MM-DD)",
                    "example": "2026-08-13"
                  },
                  "document_currency_code": {
                    "type": "string",
                    "description": "A code that specifies the currency in which the invoice is issued. See `GET /resources/currencies` for available values.",
                    "example": "AED"
                  },
                  "tax_currency_exchange_rate": {
                    "type": "number",
                    "format": "double",
                    "description": "The exchange rate between document and tax currencies. Required and must be > 0 when `document_currency_code` is not `AED`. When `document_currency_code` is `AED`, must be `1` or omitted. Maximum 6 decimal places.",
                    "example": 1
                  },
                  "supplier_id": {
                    "type": "string",
                    "description": "The DigiTax supplier ID of the supplier from whom the buyer is self-billing",
                    "example": "supplier_01HC3J1VVVM05YCTS61G7V3KC6"
                  },
                  "payee_party": {
                    "$ref": "#/components/schemas/PayeeParty"
                  },
                  "tax_representative_party": {
                    "$ref": "#/components/schemas/TaxRepresentativeParty"
                  },
                  "tax_point_date": {
                    "type": "string",
                    "format": "date",
                    "description": "The VAT point date (YYYY-MM-DD). Must be strictly before the issue_date.",
                    "example": "2026-07-13"
                  },
                  "buyer_reference": {
                    "type": "string",
                    "description": "An identifier assigned by the buyer used for internal routing purposes",
                    "example": "BR-2026-00789"
                  },
                  "accounting_cost": {
                    "type": "string",
                    "description": "A textual value that specifies where to book the relevant data into the buyer's financial accounts",
                    "example": "CAPEX-2024-Q4"
                  },
                  "project_reference": {
                    "type": "string",
                    "description": "A project reference",
                    "example": "PROJ-JEBEL-2024"
                  },
                  "note": {
                    "type": "string",
                    "description": "A free-text note on the self-billed invoice",
                    "example": "Self-billed invoice details"
                  },
                  "invoice_period": {
                    "$ref": "#/components/schemas/InvoicePeriod"
                  },
                  "order_reference": {
                    "$ref": "#/components/schemas/OrderReference"
                  },
                  "billing_reference": {
                    "type": "array",
                    "description": "References to preceding invoices",
                    "items": {
                      "$ref": "#/components/schemas/BillingReference"
                    }
                  },
                  "despatch_document_reference": {
                    "description": "Despatch advice reference (BT-16)",
                    "$ref": "#/components/schemas/DocumentReferenceID"
                  },
                  "receipt_document_reference": {
                    "description": "Receiving advice reference (BT-15)",
                    "$ref": "#/components/schemas/DocumentReferenceID"
                  },
                  "originator_document_reference": {
                    "description": "Tender or lot reference (BT-17)",
                    "$ref": "#/components/schemas/DocumentReferenceID"
                  },
                  "contract_document_reference": {
                    "description": "Contract reference (BT-12)",
                    "$ref": "#/components/schemas/DocumentReferenceID"
                  },
                  "additional_documents": {
                    "type": "array",
                    "description": "Additional supporting document references",
                    "items": {
                      "$ref": "#/components/schemas/AdditionalDocumentReference"
                    }
                  },
                  "delivery": {
                    "$ref": "#/components/schemas/InvoiceDelivery"
                  },
                  "payment_terms_note": {
                    "type": "string",
                    "description": "Textual payment terms",
                    "example": "Next 30 days"
                  },
                  "allowance_charges": {
                    "type": "array",
                    "description": "Invoice-level allowances and charges",
                    "items": {
                      "$ref": "#/components/schemas/InvoiceAllowanceCharge"
                    }
                  },
                  "payments": {
                    "type": "array",
                    "description": "Payment details for this self-billed invoice",
                    "items": {
                      "$ref": "#/components/schemas/CreateInvoicePaymentRequest"
                    }
                  },
                  "items": {
                    "type": "array",
                    "description": "The self-billed invoice line items",
                    "items": {
                      "$ref": "#/components/schemas/CreateInvoiceItemRequest"
                    }
                  },
                  "prepaid_amount": {
                    "type": "number",
                    "format": "double",
                    "description": "The amount already paid, to be deducted from the payable amount",
                    "example": 0
                  },
                  "payable_rounding_amount": {
                    "type": "number",
                    "format": "double",
                    "description": "The rounding amount",
                    "example": 0
                  },
                  "beneficiary_tax_number": {
                    "type": "string",
                    "description": "The TRN or TIN of the beneficiary for Free Trade Zone supplies. Required when `transaction_types` includes `FREE_TRADE_ZONE`.",
                    "example": "123456789098703"
                  },
                  "principle_trn": {
                    "type": "string",
                    "description": "The TRN of the principal for Disclosed Agent billing. Required when `transaction_types` includes `AGENT_BILLING`. Must differ from the business's own TRN.",
                    "example": "123456789098703"
                  }
                }
              },
              "examples": {
                "standard_self_billed_invoice": {
                  "description": "Full-featured self-billed invoice (type 389) issued by the buyer; includes order reference, originator reference, a billing reference to a prior invoice, and document- and line-level allowances/charges",
                  "summary": "Standard Self-Billed Invoice",
                  "value": {
                    "accounting_cost": "Regular sales",
                    "additional_documents": [
                      {
                        "id": "PO-AE-220"
                      },
                      {
                        "id": "PO-AE-220"
                      }
                    ],
                    "allowance_charges": [
                      {
                        "amount": 262.15,
                        "base_amount": 10486,
                        "charge_indicator": false,
                        "multiplier_rate": 0.025,
                        "reason": "Special Rebate",
                        "reason_code": "100",
                        "tax_category_code": "S",
                        "tax_rate": 0.05
                      },
                      {
                        "amount": 419.44,
                        "base_amount": 10486,
                        "charge_indicator": true,
                        "multiplier_rate": 0.04,
                        "reason": "Rush Delivery",
                        "reason_code": "AAT",
                        "tax_category_code": "S",
                        "tax_rate": 0.05
                      }
                    ],
                    "billing_reference": [
                      {
                        "id": "INV-234-2025",
                        "issue_date": "2026-08-27"
                      }
                    ],
                    "buyer_reference": "PO-AE-220",
                    "despatch_document_reference": {
                      "id": "Memo-1000"
                    },
                    "document_currency_code": "AED",
                    "due_date": "2026-09-03",
                    "invoice_period": {
                      "end_date": "2026-08-27",
                      "start_date": "2026-08-21"
                    },
                    "invoice_type_code": "389",
                    "issue_date": "2026-08-27",
                    "issue_time": "07:54:00",
                    "items": [
                      {
                        "allowance_charges": [
                          {
                            "amount": 294,
                            "base_amount": 9800,
                            "charge_indicator": false,
                            "multiplier_rate": 0.03,
                            "reason": "Discount",
                            "reason_code": "95"
                          },
                          {
                            "amount": 980,
                            "base_amount": 9800,
                            "charge_indicator": true,
                            "multiplier_rate": 0.1,
                            "reason": "Technical Modification",
                            "reason_code": "AAC"
                          }
                        ],
                        "buyers_item_id": "Purchase goods",
                        "gross_price": 5,
                        "item_id": "item_01HFXK2VV2M05YCTS61G7SVCS1",
                        "note": "All items",
                        "price_amount": 4.9,
                        "price_discount": 0.1,
                        "quantity": 2000,
                        "sellers_item_id": "Sales Goods",
                        "tax_category_code": "S",
                        "tax_rate": 0.05,
                        "unit_of_measure_code": "H87"
                      }
                    ],
                    "note": "Self Billing Tax invoice",
                    "order_reference": {
                      "purchase_order_id": "PO-AE-220",
                      "sales_order_id": "Salesorder-2122"
                    },
                    "originator_document_reference": {
                      "id": "PO-AE-220"
                    },
                    "payable_rounding_amount": 0.05,
                    "payment_terms_note": "Within a week",
                    "payments": [
                      {
                        "card_holder_name": "Card Holder Name",
                        "card_network_id": "VISA",
                        "card_primary_account_number": "XXXXXXXXXXXX1234",
                        "payment_means_code": "55"
                      }
                    ],
                    "project_reference": "Regular work",
                    "supplier_id": "supplier_01HC3J1VVVM05YCTS61G7V3KC6",
                    "tax_point_date": "2026-08-20",
                    "trader_invoice_number": "AE-01-SB-TEST"
                  }
                },
                "standard_self_billed_invoice_minimal": {
                  "description": "Minimal valid self-billed invoice containing only the required fields; useful as a starting point for integration",
                  "summary": "Standard Self-Billed Invoice — Mandatory Fields Only",
                  "value": {
                    "document_currency_code": "AED",
                    "due_date": "2026-09-26",
                    "invoice_type_code": "389",
                    "issue_date": "2026-08-27",
                    "items": [
                      {
                        "item_id": "item_01HFXK2VV2M05YCTS61G7SVCS1",
                        "price_amount": 500,
                        "quantity": 1,
                        "tax_category_code": "S",
                        "tax_rate": 0.05,
                        "unit_of_measure_code": "EA"
                      }
                    ],
                    "payments": [
                      {
                        "payee_account_id": "AE070331234567890123456",
                        "payee_account_name": "ACME Trading LLC",
                        "payment_means_code": "30"
                      }
                    ],
                    "supplier_id": "supplier_01HC3J1VVVM05YCTS61G7V3KC6",
                    "trader_invoice_number": "ACME-SBI-2026-0002"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Self-billed invoice created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PayeeParty": {
        "type": "object",
        "description": "The payee (IBG-10), when payment is collected by someone other than the seller.\nPINT AE binds only a name, an optional identifier and an optional legal\nregistration identifier here — a payee has no address, electronic address or tax\nregistration number.\n",
        "required": [
          "party_name"
        ],
        "properties": {
          "party_name": {
            "type": "string",
            "description": "The payee's name. Required whenever a payee is given.",
            "example": "Gulf Factoring FZ-LLC"
          },
          "party_identifier": {
            "type": "string",
            "description": "An identifier for the payee, in the scheme given by `party_identifier_scheme`",
            "example": "1012345678"
          },
          "party_identifier_scheme": {
            "type": "string",
            "description": "The ISO 6523 ICD code for `party_identifier`, required when it is given. See `GET /resources/international-code-designator-schemes`.",
            "example": "0235"
          },
          "registration_number": {
            "type": "string",
            "description": "The payee's legal registration number, such as a trade licence number",
            "example": "CN-1234567"
          },
          "registration_scheme": {
            "type": "string",
            "description": "The ISO 6523 ICD code for `registration_number`, required when it is given",
            "example": "0235"
          }
        }
      },
      "TaxRepresentativeParty": {
        "type": "object",
        "description": "The seller's tax representative (IBG-11). PINT AE binds a name, a postal address\nand a VAT registration number here — no electronic address and no legal\nregistration identifier. The tax registration number is mandatory, so a\nrepresentative identified only by a TIN cannot be expressed.\n",
        "required": [
          "party_name",
          "tax_registration_number",
          "address"
        ],
        "properties": {
          "party_name": {
            "type": "string",
            "description": "The tax representative's name",
            "example": "AE Tax Agents LLC"
          },
          "tax_registration_number": {
            "type": "string",
            "description": "The tax representative's UAE Tax Registration Number (TRN)",
            "example": "105827364900003"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          }
        }
      },
      "Address": {
        "type": "object",
        "description": "Postal address",
        "required": [
          "street_name",
          "city_name",
          "country_subentity",
          "country_code"
        ],
        "properties": {
          "street_name": {
            "type": "string",
            "description": "The main address line (street name, building number)",
            "example": "Sheikh Zayed Road, Tower 1"
          },
          "additional_street_name": {
            "type": "string",
            "description": "An additional address line",
            "example": "Floor 22"
          },
          "city_name": {
            "type": "string",
            "description": "The city of the address",
            "example": "Dubai"
          },
          "postal_zone": {
            "type": "string",
            "description": "The postal zone or postcode",
            "example": "00000"
          },
          "country_subentity": {
            "type": "string",
            "description": "The country subdivision. When `country_code` is `AE` this is the emirate — see `GET /resources/ae-country-subentities` for available values. Free text for any other country.",
            "example": "DXB"
          },
          "country_code": {
            "type": "string",
            "description": "The ISO 3166-1 alpha-2 country code. See `GET /resources/countries` for available values.",
            "example": "AE"
          },
          "address_line": {
            "type": "string",
            "description": "A free-form address line for additional details",
            "example": "Near Dubai Mall"
          }
        }
      },
      "OrderReference": {
        "type": "object",
        "description": "A reference to a purchase and/or sales order",
        "properties": {
          "purchase_order_id": {
            "type": "string",
            "description": "An identifier of a referenced purchase order, issued by the Buyer",
            "example": "PO-2024-00123"
          },
          "sales_order_id": {
            "type": "string",
            "description": "An identifier of a referenced sales order, issued by the Seller",
            "example": "SO-2024-00456"
          }
        }
      },
      "DocumentReferenceID": {
        "type": "object",
        "description": "A reference to another document by its identifier only. Used for the despatch advice (BT-16), receiving advice (BT-15), tender or lot (BT-17) and contract (BT-12) references.",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of the referenced document",
            "example": "DA-2024-001"
          }
        }
      },
      "BillingReference": {
        "type": "object",
        "description": "A reference to a preceding invoice (BG-3)",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The number of the preceding invoice (BT-25)",
            "example": "INV-2026-0042"
          },
          "issue_date": {
            "type": "string",
            "description": "The issue date of the preceding invoice (BT-26, YYYY-MM-DD)",
            "example": "2026-07-14"
          }
        }
      },
      "AdditionalDocumentReference": {
        "type": "object",
        "description": "A supporting document that accompanies the invoice (BG-24)",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The identifier of the supporting document (BT-122)",
            "example": "DOC-2024-001"
          },
          "document_type_code": {
            "type": "string",
            "description": "The UNCL1001 document type code of the supporting document. `130` marks the invoiced object identifier (BT-18), which can be given at most once and cannot carry a description.",
            "example": "916"
          },
          "document_description": {
            "type": "string",
            "description": "A human-readable description of the supporting document (BT-123)",
            "example": "Despatch Advice"
          }
        }
      },
      "InvoicePeriod": {
        "type": "object",
        "description": "The period to which the invoice relates",
        "properties": {
          "start_date": {
            "type": "string",
            "description": "The start date of the invoice period (YYYY-MM-DD)",
            "example": "2026-07-14"
          },
          "end_date": {
            "type": "string",
            "description": "The end date of the invoice period (YYYY-MM-DD)",
            "example": "2026-08-13"
          },
          "billing_frequency_code": {
            "type": "string",
            "description": "The billing frequency code. See `GET /resources/billing-frequencies` for available values.",
            "example": "MTH"
          }
        }
      },
      "InvoiceDelivery": {
        "type": "object",
        "description": "Delivery information for the items in the invoice. When `transaction_types` includes `EXPORTS`, `delivery` is required and `delivery_address.country_code` must not be `AE`. Incoterms are optional.",
        "properties": {
          "actual_delivery_date": {
            "type": "string",
            "description": "The actual delivery date (YYYY-MM-DD)",
            "example": "2026-07-14"
          },
          "delivery_location_id": {
            "type": "string",
            "description": "The identifier of the delivery location",
            "example": "LOC-JEBEL-ALI-001"
          },
          "delivery_location_scheme_id": {
            "type": "string",
            "description": "The scheme identifier for the delivery location ID. See `GET /resources/delivery-location-schemes` for available values.",
            "example": "0088"
          },
          "delivery_address": {
            "$ref": "#/components/schemas/Address"
          },
          "delivery_party_name": {
            "type": "string",
            "description": "The name of the party receiving the delivery",
            "example": "Global Imports FZE - Warehouse"
          },
          "delivery_terms_id": {
            "type": "string",
            "description": "The Incoterms delivery terms identifier (optional), sent with `schemeID=\"Incoterms\"`.",
            "example": "DAP"
          }
        }
      },
      "InvoiceAllowanceCharge": {
        "type": "object",
        "description": "An allowance or charge at document level. Meaningful reason text or a valid reason_code is required.",
        "required": [
          "charge_indicator",
          "amount",
          "tax_category_code",
          "tax_rate"
        ],
        "properties": {
          "charge_indicator": {
            "type": "boolean",
            "description": "If true, this is a charge; if false, it is an allowance",
            "example": false
          },
          "amount": {
            "type": "number",
            "format": "double",
            "description": "The monetary amount of the allowance or charge",
            "example": 50
          },
          "base_amount": {
            "type": "number",
            "format": "double",
            "description": "The base amount on which the allowance or charge percentage is calculated",
            "example": 1000
          },
          "multiplier_rate": {
            "type": "number",
            "format": "double",
            "description": "The rate(between 0 to 1) used to calculate the allowance/charge amount",
            "example": 0.05,
            "minimum": 0,
            "maximum": 1
          },
          "reason_code": {
            "type": "string",
            "description": "The coded reason for the allowance or charge. See `GET /resources/allowance-reasons` (for allowances) or `GET /resources/charge-reasons` (for charges) for available values.",
            "example": "95"
          },
          "reason": {
            "type": "string",
            "description": "The textual reason for the allowance or charge",
            "example": "Volume discount"
          },
          "tax_category_code": {
            "type": "string",
            "description": "The VAT category code for this allowance/charge. It is required for document-level allowances/charges. See `GET /resources/tax-categories` for available values.",
            "example": "E"
          },
          "tax_rate": {
            "type": "number",
            "format": "double",
            "description": "The VAT rate applicable to this allowance/charge",
            "example": 0,
            "minimum": 0,
            "maximum": 1
          },
          "tax_exemption_reason_code": {
            "type": "string",
            "description": "The coded reason for VAT exemption if the allowance/charge is tax exempt. See `GET /resources/tax-exemption-reasons` for available values.",
            "example": "DL8.46.1"
          },
          "tax_exemption_reason": {
            "type": "string",
            "description": "The textual reason for VAT exemption if the allowance/charge is tax exempt",
            "example": "Certain financial services"
          }
        }
      },
      "InvoiceItemAllowanceCharge": {
        "type": "object",
        "description": "An allowance or charge at invoice item level. Meaningful reason text or a valid reason_code is required.",
        "required": [
          "charge_indicator",
          "amount"
        ],
        "properties": {
          "charge_indicator": {
            "type": "boolean",
            "description": "If true, this is a charge; if false, it is an allowance",
            "example": false
          },
          "amount": {
            "type": "number",
            "format": "double",
            "description": "The monetary amount of the allowance or charge",
            "example": 50
          },
          "base_amount": {
            "type": "number",
            "format": "double",
            "description": "The base amount on which the allowance or charge percentage is calculated",
            "example": 1000
          },
          "multiplier_rate": {
            "type": "number",
            "format": "double",
            "description": "The rate(between 0 to 1) used to calculate the allowance/charge amount",
            "example": 0.05,
            "minimum": 0,
            "maximum": 1
          },
          "reason_code": {
            "type": "string",
            "description": "The coded reason for the allowance or charge. See `GET /resources/allowance-reasons` (for allowances) or `GET /resources/charge-reasons` (for charges) for available values.",
            "example": "95"
          },
          "reason": {
            "type": "string",
            "description": "The textual reason for the allowance or charge",
            "example": "Volume discount"
          }
        }
      },
      "InvoicePayment": {
        "type": "object",
        "description": "Payment means information for the invoice",
        "required": [
          "id",
          "payment_means_code"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique DigiTax identifier for this payment record",
            "example": "payment_01KMFHQG90HC0H5CA6D2C1H5MK"
          },
          "payment_means_code": {
            "type": "string",
            "description": "The UNCL4461 code identifying the payment means",
            "example": "30"
          },
          "payment_means_code_name": {
            "type": "string",
            "description": "The name of the payment means code",
            "example": "Credit transfer"
          },
          "payment_id": {
            "type": "string",
            "description": "The payment reference or remittance information",
            "example": "PAY-REF-2024-001"
          },
          "payee_account_id": {
            "type": "string",
            "description": "The payee's bank account number (IBAN)",
            "example": "AE070331234567890123456"
          },
          "payee_account_name": {
            "type": "string",
            "description": "The name of the payee's bank account",
            "example": "Acme Trading LLC - Main Account"
          },
          "payee_financial_institution_bic": {
            "type": "string",
            "description": "The BIC/SWIFT code of the payee's bank",
            "example": "ADCBAEAA"
          },
          "card_primary_account_number": {
            "type": "string",
            "description": "The last few digits of the card used for payment",
            "example": "****1234"
          },
          "card_network_id": {
            "type": "string",
            "description": "The network identifier of the payment card",
            "example": "VISA"
          },
          "card_holder_name": {
            "type": "string",
            "description": "The name of the card holder",
            "example": "Ahmed Al-Rashid"
          },
          "payment_mandate_id": {
            "type": "string",
            "description": "The mandate reference for direct debit",
            "example": "MANDATE-2024-001"
          },
          "payment_terms_note": {
            "type": "string",
            "description": "A textual description of the payment terms",
            "example": "Payment due within 30 days"
          },
          "payment_terms_due_date": {
            "type": "string",
            "description": "The due date for payment (YYYY-MM-DD)",
            "example": "2026-08-13"
          }
        }
      },
      "TaxBreakdown": {
        "type": "object",
        "description": "A breakdown of VAT by category",
        "required": [
          "tax_category_code",
          "taxable_amount",
          "tax_amount",
          "currency",
          "tax_rate"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique DigiTax identifier for this tax breakdown record",
            "example": "taxbreakdown_01KMFHQG90HC0H5CA6CZ0A93VC"
          },
          "tax_category_code": {
            "type": "string",
            "description": "The VAT category code",
            "example": "S"
          },
          "taxable_amount": {
            "type": "number",
            "format": "double",
            "description": "The net amount subject to this VAT category",
            "example": 10000
          },
          "tax_amount": {
            "type": "number",
            "format": "double",
            "description": "The VAT amount for this category",
            "example": 500
          },
          "currency": {
            "type": "string",
            "description": "The currency code for the tax amounts",
            "example": "AED"
          },
          "tax_rate": {
            "type": "number",
            "format": "double",
            "description": "The VAT rate(between 0 and 1)",
            "example": 0.05,
            "minimum": 0,
            "maximum": 1
          }
        }
      },
      "InvoiceItem": {
        "type": "object",
        "description": "A line item within an invoice",
        "required": [
          "id",
          "item_id",
          "quantity",
          "unit_of_measure_code",
          "line_extension_amount",
          "price_amount",
          "tax_category_code",
          "tax_rate"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique DigiTax identifier for this invoice line",
            "example": "invoiceitem_01KMFQN8P2CE43QQGH29FH32CT"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the line item was created",
            "example": "2026-07-14T10:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the line item was last updated",
            "example": "2026-07-14T10:00:00Z"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the line item is active",
            "example": true
          },
          "item_id": {
            "type": "string",
            "description": "The DigiTax item ID associated with this line",
            "example": "item_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "line_id": {
            "type": "integer",
            "description": "The sequential line identifier within the invoice",
            "example": 1
          },
          "note": {
            "type": "string",
            "description": "A free-text note on the invoice line",
            "example": "Special handling required"
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "description": "The quantity of items on this line",
            "example": 10
          },
          "unit_of_measure_code": {
            "type": "string",
            "description": "The unit of measure code for the quantity and price",
            "example": "C62"
          },
          "line_extension_amount": {
            "type": "number",
            "format": "double",
            "description": "The net amount for this line ((quantity x price amount) - sum of allowances + sum of charges)",
            "example": 5000
          },
          "tax_amount": {
            "type": "number",
            "format": "double",
            "description": "The VAT amount for this line",
            "example": 250
          },
          "price_amount": {
            "type": "number",
            "format": "double",
            "description": "The net price per unit (excluding VAT)",
            "example": 500
          },
          "price_discount": {
            "type": "number",
            "format": "double",
            "description": "The discount applied to the gross price to arrive at the net price",
            "example": 25
          },
          "gross_price": {
            "type": "number",
            "format": "double",
            "description": "The gross price per unit before any price discount",
            "example": 525
          },
          "tax_category_code": {
            "type": "string",
            "description": "The VAT category code for this line",
            "example": "S"
          },
          "tax_rate": {
            "type": "number",
            "format": "double",
            "description": "The VAT rate for this line, between 0 and 1",
            "example": 0.05
          },
          "tax_exemption_reason_code": {
            "type": "string",
            "description": "The coded reason for VAT exemption on this line",
            "example": "DL8.46.1"
          },
          "tax_exemption_reason": {
            "type": "string",
            "description": "The textual reason for VAT exemption on this line",
            "example": "Certain financial services"
          },
          "accounting_cost": {
            "type": "string",
            "description": "A textual value that specifies where to book the relevant data into the Buyer's financial accounts",
            "example": "CC-OPEX-001"
          },
          "invoice_period": {
            "$ref": "#/components/schemas/InvoicePeriod"
          },
          "buyers_item_id": {
            "type": "string",
            "description": "The buyer's identifier for this item",
            "example": "BUY-ITEM-9901"
          },
          "sellers_item_id": {
            "type": "string",
            "description": "The seller's identifier for this item",
            "example": "PUMP-X500-BLK"
          },
          "allowance_charges": {
            "type": "array",
            "description": "Line-level allowances and charges",
            "items": {
              "$ref": "#/components/schemas/InvoiceItemAllowanceCharge"
            }
          },
          "allowance_total_amount": {
            "type": "number",
            "format": "double",
            "description": "The total amount of all line-level allowances",
            "example": 25
          },
          "charge_total_amount": {
            "type": "number",
            "format": "double",
            "description": "The total amount of all line-level charges",
            "example": 0
          },
          "item_nature_code": {
            "type": "string",
            "description": "The nature code of the item, required when the tax category is reverse charge (AE)",
            "example": "DL8.48.8.2"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "description": "Represents a UAE PINT-AE compliant invoice or credit note created on DigiTax",
        "required": [
          "id",
          "created_at",
          "updated_at",
          "active",
          "invoice_type_code",
          "issue_date",
          "document_currency_code",
          "customer_party_id",
          "line_extension_amount",
          "tax_exclusive_amount",
          "tax_inclusive_amount",
          "payable_amount",
          "tax_amount",
          "overall_status",
          "validation",
          "submission",
          "reporting",
          "references"
        ],
        "properties": {
          "public_metadata": {
            "type": "string",
            "description": "The free-form text that was sent as `public_metadata` when this resource was created. Omitted when none was set."
          },
          "id": {
            "type": "string",
            "description": "The unique DigiTax identifier for this invoice",
            "example": "invoice_01KMFSMEYVCDV0150T6P4WECVR"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the invoice was created on DigiTax",
            "example": "2026-07-14T10:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when the invoice was last updated on DigiTax",
            "example": "2026-07-14T12:30:00Z"
          },
          "active": {
            "type": "boolean",
            "description": "Whether this invoice record is active on DigiTax",
            "example": true
          },
          "invoice_number": {
            "type": "string",
            "description": "The sequential invoice number assigned by DigiTax. This remains unchanged when trader_invoice_number is used as the document number over Peppol.",
            "example": "INV-2024-00001"
          },
          "uuid": {
            "type": "string",
            "description": "The universally unique identifier (UUID) of the invoice",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "trader_invoice_number": {
            "type": "string",
            "description": "An issuer-assigned invoice number, unique within the business. When given, this is the document number sent over Peppol; otherwise, the DigiTax-generated number is used. Must contain valid Unicode and XML characters, with no leading or trailing whitespace, tabs, or line breaks",
            "example": "ACME-INV-2024-0042"
          },
          "transaction_type_code": {
            "type": "string",
            "description": "A binary code that identifies the invoice transaction types that apply to the invoice. Each digit represents a specific transaction type, in the order defined by Peppol",
            "example": "10000001"
          },
          "transaction_types": {
            "type": "array",
            "description": "The list of applicable PINT-AE transaction types",
            "items": {
              "type": "string",
              "enum": [
                "FREE_TRADE_ZONE",
                "DEEMED_SUPPLY",
                "PROFIT_MARGIN_SCHEME",
                "SUMMARY_INVOICE",
                "CONTINUOUS_SUPPLY",
                "AGENT_BILLING",
                "SUPPLY_THROUGH_ECOMMERCE",
                "EXPORTS"
              ]
            },
            "example": [
              "FREE_TRADE_ZONE",
              "EXPORTS"
            ]
          },
          "invoice_type_code": {
            "type": "string",
            "description": "The UN/CEFACT document type code",
            "example": "380"
          },
          "issue_date": {
            "type": "string",
            "format": "date",
            "description": "The date the invoice was issued (YYYY-MM-DD)",
            "example": "2026-07-14"
          },
          "issue_time": {
            "type": "string",
            "description": "The time the invoice was issued (HH:MM:SS)",
            "example": "10:00:00"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "description": "The payment due date (YYYY-MM-DD)",
            "example": "2026-08-13"
          },
          "tax_point_date": {
            "type": "string",
            "format": "date",
            "description": "The date for tax purposes (VAT point date) (YYYY-MM-DD). Must be strictly before the issue_date.",
            "example": "2026-07-13"
          },
          "document_currency_code": {
            "type": "string",
            "description": "The currency of the invoice amounts",
            "example": "AED"
          },
          "tax_currency_code": {
            "type": "string",
            "description": "The tax accounting currency. It's always AED for UAE e-invoices",
            "example": "AED"
          },
          "tax_currency_exchange_rate": {
            "type": "number",
            "format": "double",
            "description": "The exchange rate between document currency and tax currency",
            "example": 1
          },
          "buyer_reference": {
            "type": "string",
            "description": "An identifier assigned by the Buyer used for internal routing purposes",
            "example": "BR-2024-00789"
          },
          "accounting_cost": {
            "type": "string",
            "description": "A textual value that specifies where to book the relevant data into the Buyer's financial accounts",
            "example": "CAPEX-2024-Q4"
          },
          "project_reference": {
            "type": "string",
            "description": "A reference to a project relating to this invoice",
            "example": "PROJ-JEBEL-2024"
          },
          "note": {
            "type": "string",
            "description": "Free-text notes on the invoice",
            "example": "Thank you for your business"
          },
          "invoice_period": {
            "$ref": "#/components/schemas/InvoicePeriod"
          },
          "order_reference": {
            "$ref": "#/components/schemas/OrderReference"
          },
          "billing_reference": {
            "type": "array",
            "description": "References to preceding invoices for credit notes",
            "items": {
              "$ref": "#/components/schemas/BillingReference"
            }
          },
          "despatch_document_reference": {
            "description": "Despatch advice reference (BT-16)",
            "$ref": "#/components/schemas/DocumentReferenceID"
          },
          "receipt_document_reference": {
            "description": "Receiving advice reference (BT-15)",
            "$ref": "#/components/schemas/DocumentReferenceID"
          },
          "originator_document_reference": {
            "description": "Tender or lot reference (BT-17)",
            "$ref": "#/components/schemas/DocumentReferenceID"
          },
          "contract_document_reference": {
            "description": "Contract reference (BT-12)",
            "$ref": "#/components/schemas/DocumentReferenceID"
          },
          "additional_documents": {
            "type": "array",
            "description": "References to additional supporting documents",
            "items": {
              "$ref": "#/components/schemas/AdditionalDocumentReference"
            }
          },
          "customer_party_id": {
            "type": "string",
            "description": "The DigiTax party ID of the buyer",
            "example": "party_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "payee_party": {
            "$ref": "#/components/schemas/PayeeParty"
          },
          "tax_representative_party": {
            "$ref": "#/components/schemas/TaxRepresentativeParty"
          },
          "delivery": {
            "$ref": "#/components/schemas/InvoiceDelivery"
          },
          "payment_terms_note": {
            "type": "string",
            "description": "Textual description of the payment terms",
            "example": "Net 30 days"
          },
          "line_extension_amount": {
            "type": "number",
            "format": "double",
            "description": "The sum of all invoice line net amounts",
            "example": 10000
          },
          "tax_exclusive_amount": {
            "type": "number",
            "format": "double",
            "description": "The total amount without VAT (sum of net amounts minus document-level allowances plus document-level charges)",
            "example": 9500
          },
          "tax_inclusive_amount": {
            "type": "number",
            "format": "double",
            "description": "The total amount including VAT",
            "example": 9975
          },
          "payable_amount": {
            "type": "number",
            "format": "double",
            "description": "The amount due for payment after subtracting any prepaid amount and adding payable rounding amount",
            "example": 9975
          },
          "allowance_total_amount": {
            "type": "number",
            "format": "double",
            "description": "The sum of all document-level allowances",
            "example": 500
          },
          "charge_total_amount": {
            "type": "number",
            "format": "double",
            "description": "The sum of all document-level charges",
            "example": 0
          },
          "prepaid_amount": {
            "type": "number",
            "format": "double",
            "description": "The amount already paid to be deducted from the payable amount",
            "example": 0
          },
          "payable_rounding_amount": {
            "type": "number",
            "format": "double",
            "description": "The rounding amount added to make the payable amount a round number",
            "example": 0
          },
          "tax_amount": {
            "type": "number",
            "format": "double",
            "description": "The total VAT amount for the invoice",
            "example": 475
          },
          "tax_included_indicator": {
            "type": "boolean",
            "description": "Indicates whether VAT is included in the invoice line amounts",
            "example": false
          },
          "tax_amount_in_tax_currency": {
            "type": "number",
            "format": "double",
            "description": "The VAT amount expressed in the tax currency",
            "example": 475
          },
          "overall_status": {
            "type": "string",
            "enum": [
              "PROCESSING",
              "COMPLETED",
              "FAILED",
              "DIGITAX_ACTION_REQUIRED"
            ],
            "description": "The overall state of the document across validation, submission and reporting. `PROCESSING` means DigiTax is still working on it. `COMPLETED` means it settled successfully. `FAILED` means it settled unsuccessfully, so you need to fix the document and issue it again. `DIGITAX_ACTION_REQUIRED` means a message DigiTax generates failed and the DigiTax operations team is handling it.\n",
            "example": "COMPLETED"
          },
          "validation": {
            "$ref": "#/components/schemas/ValidationResult"
          },
          "submission": {
            "$ref": "#/components/schemas/InvoiceSubmission"
          },
          "reporting": {
            "$ref": "#/components/schemas/InvoiceReporting"
          },
          "references": {
            "$ref": "#/components/schemas/TransmissionReferences"
          },
          "allowance_charges": {
            "type": "array",
            "description": "Document-level allowances and charges",
            "items": {
              "$ref": "#/components/schemas/InvoiceAllowanceCharge"
            }
          },
          "payments": {
            "type": "array",
            "description": "Payment means for this invoice",
            "items": {
              "$ref": "#/components/schemas/InvoicePayment"
            }
          },
          "items": {
            "type": "array",
            "description": "The invoice line items",
            "items": {
              "$ref": "#/components/schemas/InvoiceItem"
            }
          },
          "taxes": {
            "type": "array",
            "description": "The VAT breakdown by category",
            "items": {
              "$ref": "#/components/schemas/TaxBreakdown"
            }
          },
          "credit_note_reason_code": {
            "type": "string",
            "description": "The code for the reason a credit note was issued",
            "example": "DL8.61.1.A"
          },
          "credit_note_reason": {
            "type": "string",
            "description": "The textual reason a credit note was issued",
            "example": "Supply was cancelled"
          },
          "original_invoice_id": {
            "type": "string",
            "description": "The DigiTax ID of the original invoice this credit note relates to",
            "example": "invoice_01KMFSMEYVCDV0150T6P4WECVR"
          },
          "beneficiary_tax_number": {
            "type": "string",
            "description": "The TRN or TIN of the beneficiary in case of Free Trade Zone supply",
            "example": "100111222300003"
          },
          "principle_trn": {
            "type": "string",
            "description": "The TRN of the principal in case of Disclosed Agent billing",
            "example": "100333444500003"
          },
          "supplier_id": {
            "type": "string",
            "description": "The DigiTax supplier ID of the supplier, populated only on self-billed invoices and credit notes",
            "example": "supplier_01HC3J1VVVM05YCTS61G7V3KC6"
          }
        }
      },
      "ValidationResult": {
        "type": "object",
        "description": "The result of validating the document against the PINT-AE rules",
        "required": [
          "status",
          "validated_at",
          "errors"
        ],
        "properties": {
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "PROCESSING",
              "PASSED",
              "FAILED",
              null
            ],
            "example": "PASSED"
          },
          "validated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-07-14T10:03:00Z"
          },
          "errors": {
            "type": "array",
            "description": "The rules the document broke. A sent invoice fails on any of them. A received invoice can pass with warnings listed here.\n",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "description": "One PINT-AE rule the document broke",
        "required": [
          "rule_id",
          "severity",
          "location",
          "message"
        ],
        "properties": {
          "rule_id": {
            "type": "string",
            "example": "ibr-001-ae"
          },
          "severity": {
            "type": "string",
            "example": "fatal"
          },
          "location": {
            "type": "string",
            "description": "The XPath of the element that broke the rule",
            "example": "/Invoice"
          },
          "message": {
            "type": "string",
            "example": "[IBR-001-AE]-An invoice must have a specification identifier."
          }
        }
      },
      "InvoiceSubmission": {
        "type": "object",
        "description": "Delivery of the document to C3, the buyer's Access Point, or to C2, the supplier's Access Point, when self-billed. `status` is null until validation passes.\n",
        "required": [
          "status",
          "predefined_endpoint",
          "skip_reason",
          "sent_at",
          "accepted_at",
          "rejected_at",
          "rejection_reason",
          "as4_message_id"
        ],
        "properties": {
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "NOT_REQUIRED",
              "PROCESSING",
              "SENT",
              "ACCEPTED",
              "REJECTED",
              "FAILED",
              "UNACKNOWLEDGED",
              null
            ],
            "description": "`NOT_REQUIRED` means the document is only reported to C5(FTA) and is never sent to the receiver. `UNACKNOWLEDGED` means the receiver never acknowledged receiving the document in time.\n",
            "example": "ACCEPTED"
          },
          "predefined_endpoint": {
            "type": "string",
            "nullable": true,
            "description": "The `0235` endpoint ID substituted for the receiver's address when `status` is `NOT_REQUIRED`. `9900000097` for a deemed supply, `9900000098` for a receiver not subject to UAE e-invoicing, `9900000099` for an export to a receiver not on Peppol.\n",
            "example": null
          },
          "skip_reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "DEEMED_SUPPLY",
              "RECEIVER_NOT_SUBJECT_TO_UAE_EINVOICING_REGULATIONS",
              "EXPORT_RECEIVER_NOT_REGISTERED_ON_PEPPOL",
              null
            ],
            "description": "Why the document was not sent to the receiver, set when `status` is `NOT_REQUIRED`. The receiver is the buyer, or the supplier when self-billed. Each reason goes with one `predefined_endpoint`. `DEEMED_SUPPLY` (`9900000097`) means the transaction is a deemed supply, which has no receiver to deliver to. `RECEIVER_NOT_SUBJECT_TO_UAE_EINVOICING_REGULATIONS` (`9900000098`) means the document is not an export and the receiver can't be reached on Peppol, such as a buyer outside the UAE with no `peppol_id`. `EXPORT_RECEIVER_NOT_REGISTERED_ON_PEPPOL` (`9900000099`) means the document is an export and the receiver can't be reached on Peppol.\n",
            "example": null
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-07-14T10:04:00Z"
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the receiver acknowledged the document with a positive Message Level Status",
            "example": "2026-07-14T10:06:00Z"
          },
          "rejected_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the receiver rejected the document with a negative Message Level Status",
            "example": null
          },
          "rejection_reason": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "as4_message_id": {
            "type": "string",
            "nullable": true,
            "example": "b7c1e2a4-5d3f-4e8a-9c21-0f6d7a8b9c10@digitax.tech"
          }
        }
      },
      "InvoiceReporting": {
        "type": "object",
        "description": "The tax report of the document to C5, the FTA, including any withdrawal of that report. `status` is null until validation passes.\n",
        "required": [
          "status",
          "sent_at",
          "accepted_at",
          "rejected_at",
          "rejection_reason",
          "as4_message_id",
          "withdrawal"
        ],
        "properties": {
          "status": {
            "type": "string",
            "nullable": true,
            "enum": [
              "NOT_REQUIRED",
              "PROCESSING",
              "SENT",
              "ACCEPTED",
              "REJECTED",
              "FAILED",
              "WITHDRAWING",
              "WITHDRAWAL_ACCEPTED",
              "WITHDRAWAL_REJECTED",
              "WITHDRAWAL_FAILED",
              null
            ],
            "example": "ACCEPTED"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-07-14T10:05:00Z"
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When C5(FTA) acknowledged the tax report with a positive Message Level Status",
            "example": "2026-07-14T10:07:00Z"
          },
          "rejected_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When C5(FTA) rejected the tax report with a negative Message Level Status",
            "example": null
          },
          "rejection_reason": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "as4_message_id": {
            "type": "string",
            "nullable": true,
            "example": "3f9a0c2e-1b7d-4a6e-8f45-2c9d0e1a7b33@digitax.tech"
          },
          "withdrawal": {
            "description": "The withdrawal of the tax report, raised when the receiver rejected the document, never acknowledged receiving it, or could not be sent the document. `reason` says which. Null when no withdrawal was raised.\n",
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/InvoiceWithdrawal"
              }
            ]
          }
        }
      },
      "InvoiceWithdrawal": {
        "type": "object",
        "required": [
          "raised_at",
          "reason",
          "reason_detail",
          "sent_at",
          "accepted_at",
          "rejected_at",
          "rejection_reason",
          "as4_message_id"
        ],
        "properties": {
          "raised_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-07-14T10:08:00Z"
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "enum": [
              "SUBMISSION_REJECTED",
              "SUBMISSION_UNACKNOWLEDGED",
              "SUBMISSION_FAILED",
              null
            ],
            "description": "Why the withdrawal was raised. `SUBMISSION_REJECTED` means the receiver rejected the document. `SUBMISSION_UNACKNOWLEDGED` means the receiver did not acknowledge the document in time. `SUBMISSION_FAILED` means DigiTax could not deliver the document to the receiver's Access Point after retrying. The first reason stays, even if the receiver responds later.\n",
            "example": "SUBMISSION_REJECTED"
          },
          "reason_detail": {
            "type": "string",
            "nullable": true,
            "description": "The receiver's rejection message for `SUBMISSION_REJECTED`, or the AS4 gateway's failure text for `SUBMISSION_FAILED`. Null when neither gave one, including every `SUBMISSION_UNACKNOWLEDGED`.\n",
            "example": "Buyer TRN does not match our records"
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2026-07-14T10:08:30Z"
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When C5(FTA) acknowledged the withdrawal with a positive Message Level Status",
            "example": "2026-07-14T10:09:00Z"
          },
          "rejected_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When C5(FTA) rejected the withdrawal with a negative Message Level Status",
            "example": null
          },
          "rejection_reason": {
            "type": "string",
            "nullable": true,
            "example": null
          },
          "as4_message_id": {
            "type": "string",
            "nullable": true,
            "example": "9e2d4b61-7a0c-4f3e-b8d2-5c1a6f0e3d47@digitax.tech"
          }
        }
      },
      "TransmissionReferences": {
        "type": "object",
        "description": "The identifiers the Peppol network uses to track the document",
        "required": [
          "uuid",
          "transport_id"
        ],
        "properties": {
          "uuid": {
            "type": "string",
            "nullable": true,
            "description": "The UUID carried in the document itself",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "transport_id": {
            "type": "string",
            "nullable": true,
            "description": "The instance identifier of the document's envelope, which the tax report repeats as its TransportID",
            "example": "7d2f0b9e-3c41-4a8e-b6d5-0e9a1c2f4b76"
          }
        }
      },
      "CreateInvoicePaymentRequest": {
        "type": "object",
        "required": [
          "payment_means_code"
        ],
        "properties": {
          "payment_means_code": {
            "type": "string",
            "description": "The UNCL4461 payment means code. See `GET /resources/payment-means` for available values.",
            "example": "30"
          },
          "payment_id": {
            "type": "string",
            "description": "The payment reference",
            "example": "PAY-REF-2024-001"
          },
          "payee_account_id": {
            "type": "string",
            "description": "The payee IBAN or account number",
            "example": "AE070331234567890123456"
          },
          "payee_account_name": {
            "type": "string",
            "description": "The payee bank account name",
            "example": "Acme Trading LLC - Main Account"
          },
          "payee_financial_institution_bic": {
            "type": "string",
            "description": "The BIC/SWIFT code of the payee's bank",
            "example": "ADCBAEAA"
          },
          "card_primary_account_number": {
            "type": "string",
            "description": "The primary account number of the payment card",
            "example": "66541234"
          },
          "card_network_id": {
            "type": "string",
            "description": "The payment card network identifier",
            "example": "VISA"
          },
          "card_holder_name": {
            "type": "string",
            "description": "The name of the card holder",
            "example": "Ahmed Al-Rashid"
          },
          "payment_mandate_id": {
            "type": "string",
            "description": "The direct debit mandate reference",
            "example": "MANDATE-2024-001"
          },
          "payment_terms_note": {
            "type": "string",
            "description": "A description of the payment terms",
            "example": "Payment due within 30 days"
          },
          "payment_terms_due_date": {
            "type": "string",
            "description": "The payment due date (YYYY-MM-DD)",
            "example": "2026-08-13"
          }
        }
      },
      "CreateInvoiceItemRequest": {
        "type": "object",
        "required": [
          "item_id",
          "quantity",
          "unit_of_measure_code",
          "price_amount",
          "tax_category_code",
          "tax_rate"
        ],
        "properties": {
          "item_id": {
            "type": "string",
            "description": "The DigiTax item ID of the item being invoiced",
            "example": "item_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "quantity": {
            "type": "number",
            "format": "double",
            "description": "The number of units of the item being invoiced",
            "example": 10
          },
          "unit_of_measure_code": {
            "type": "string",
            "description": "The code of the unit of measure used for the invoiced quantity. See `GET /resources/units-of-measure` for available values.",
            "example": "C62"
          },
          "price_amount": {
            "type": "number",
            "format": "double",
            "description": "The net unit price (excluding VAT) for the invoiced item and in the specified unit of measure",
            "example": 500
          },
          "price_discount": {
            "type": "number",
            "format": "double",
            "description": "The discount on the gross price to arrive at the net price",
            "example": 25
          },
          "gross_price": {
            "type": "number",
            "format": "double",
            "description": "The gross unit price before discount",
            "example": 525
          },
          "tax_category_code": {
            "type": "string",
            "description": "The VAT category code for this invoice item. See `GET /resources/tax-categories` for available values.",
            "example": "S"
          },
          "tax_rate": {
            "type": "number",
            "format": "double",
            "description": "The VAT rate(between 0 and 1) percentage",
            "example": 0.05,
            "minimum": 0,
            "maximum": 1
          },
          "tax_exemption_reason_code": {
            "type": "string",
            "description": "The coded reason for VAT exemption. See `GET /resources/tax-exemption-reasons` for available values.",
            "example": "DL8.46.1"
          },
          "tax_exemption_reason": {
            "type": "string",
            "description": "The textual reason for VAT exemption",
            "example": "Certain financial services"
          },
          "note": {
            "type": "string",
            "description": "A free-text note on this invoice item",
            "example": "General invoice item details"
          },
          "accounting_cost": {
            "type": "string",
            "description": "A textual value that specifies where to book the relevant data into the Buyer's financial accounts",
            "example": "CC-OPEX-001"
          },
          "invoice_period": {
            "$ref": "#/components/schemas/InvoicePeriod"
          },
          "buyers_item_id": {
            "type": "string",
            "description": "The buyer's identifier for this item",
            "example": "BUY-ITEM-9901"
          },
          "sellers_item_id": {
            "type": "string",
            "description": "The seller's identifier for this item",
            "example": "PUMP-X500-BLK"
          },
          "order_line_reference": {
            "$ref": "#/components/schemas/OrderReference"
          },
          "allowance_charges": {
            "type": "array",
            "description": "Invoice item-level allowances and charges",
            "items": {
              "$ref": "#/components/schemas/InvoiceItemAllowanceCharge"
            }
          },
          "item_nature_code": {
            "type": "string",
            "description": "The item nature code, required when tax category is reverse charge (AE). See `GET /resources/goods-types` for available values.",
            "example": "DL8.48.8.2"
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message",
                "code"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "example": "An error occurred"
                },
                "code": {
                  "type": "string",
                  "example": "400"
                },
                "metadata": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```