API Integration

Sales Invoice (Cash / Credit)

API Information

In order to start using Post2Tax service you must integrate your existing billing system with our APIs. The API is based on POST method and accessible via the following link: https://apiservice.post2tax.com/api/Invoice

Request Header

All requests made to the API must have the following header structure and elements

HEADERS: {
    "Content-Type": "application/json",
    "license-key": "your-post2tax-license-key",
    "client-id": "your-tax-account-client-id",
    "secret-key": "your-tax-account-secret-key"
}

Request Body

BODY
{
    "ID": "202300000001", (INVOICE NUMBER)
    "UUID": "8055b137-a128-46d6-9421-8c2a6de57465", (INVOICE UUID / INVOICE NUMBER)
    "SerialNo": "1", (INVOICE SERIAL NUMBER)
    "InvoiceType": 1, (1-CASH, 2-CREDIT)
    "InvoiceDate": "2023-01-10", (yyyy-MM-dd)
    "CountryCode": "JO",
    "AreaCode": "AM", (AM-Amman, MN-Maan, MD-Madaba, MA-Mafraq, KA-Karak, JA-Jerrash, IR-Irbid, AZ-Zarqa, AT-Tafila, AQ-Aqaba, AJ-Ajloun)
    "CurrencyCode": "JOD",
    "Supplier": {
        "ID": "1234", (تسلسل مصدر الدخل)
        "Name": "إسم الشركة التجاري",
        "TaxNumber": "112233" (الرقم الضريبي)
    },
    "Customer": {
        "Name": "إسم العميل",
        "IdentifiedBy": 1, الرقم الوطني(1), رقم الوثيقة(2), الرقم الضريبي(3)
        "Identifier": "332211", الرقم الوطني / رقم الوثيقة / الرقم الضريبي
        "PostalZone": "33554",
        "Telephone": "00962790000000"
    },
    "TotalDiscountAmount": 0.000,
    "TotalTaxAmount": 0.578,
    "SubTotalAmount": 11.554,
    "TotalAmount": 12.132,
    "InvoiceLines": [
        {
            "ID": "2057",
            "ItemName": "Item 2057",
            "Quantity": 6.000,
            "Price": 0.953,
            "DiscountAmount": 0,
            "TaxAmount": 0.286,
            "TaxPercent": 5.000
        }, {
            "ID": "2053",
            "ItemName": "Item 2053",
            "Quantity": 6.000,
            "Price": 0.215,
            "DiscountAmount": 0,
            "TaxAmount": 0.065,
            "TaxPercent": 5.000
        }, {
            "ID": "3004",
            "ItemName": "Item 3004",
            "Quantity": 3.000,
            "Price": 0.866,
            "DiscountAmount": 0,
            "TaxAmount": 0.130,
            "TaxPercent": 5.000
        }, {
            "ID": "3002",
            "ItemName": "Item 3002",
            "Quantity": 1.000,
            "Price": 1.948,
            "DiscountAmount": 0,
            "TaxAmount": 0.097,
            "TaxPercent": 5.000
        }
    ],
    "Note": "Test Invoice"
}

Request Response
1- STATUS 200
{
    "error": false,
    "result": {
        "status": "SUBMITTED",
        "qrCode": ENCODED_QR_CODE,
        "id": INVOICE_ID,
        "uuid": INVOICE_UUID
    }
}

2- STATUS 400
{
    "error": true,
    "result": ERROR_CODE,
    "message": ERROR_DESCRIPTION
}
Share this Doc

Sales Invoice (Cash / Credit)

Or copy link

CONTENTS