Tax Calculation

Purpose

For POS operating in tax exclusive regions, a tax calculation webhook URL should be provided to recieve complete order payloads and return the correct tax calculation in response

Example Order Payload

{
    "_created": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
    "_updated": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
    "_id": "62********************7c",
    "account": "61********************a1",
    "channelOrderId": "TEST******4206",
    "channelOrderDisplayId": "T**4206",
    "posId": "",
    "posReceiptId": "",
    "posLocationId": "",
    "location": "62********************3r",
    "channelLink": "67********************59",
    "status": 4,
    "statusHistory": [],
    "packaging": {
        "includeCutlery": false
    },
    "by": "",
    "orderType": 1,
    "channel": 20003,
    "pos": 0,
    "rating": [],
    "pickupTime": "YYYY-MM-DDTHH:mm:ss.SSSSSSZ",
    "deliveryIsAsap": false,
    "courier": {
        "deliveryBy": "restaurant"
    },
    "customer": {
        "name": "",
        "companyName": "",
        "phoneNumber": "",
        "email": "",
        "note": "",
        "tin": ""
    },
    "deliveryAddress": {},
    "orderIsAlreadyPaid": false,
    "taxes": [
        {
            "name": "GST",
            "total": 465
        }
    ],
    "taxTotal": 466,
    "taxRemitted": 0,
    "payment": {
        "amount": 3811,
        "type": 9,
        "due": 0,
        "rebate": 0
    },
    "note": "",
    "items": [
        {
            "_id": "68********************3c",
            "plu": "11309003-1",
            "name": "Chicken Crunchers",
            "sortOrder": 0,
            "price": 1550,
            "quantity": 2,
            "productType": 1,
            "categoryInfo": {},
            "subItems": [
                {
                    "_id": "68********************3c",
                    "plu": "P-GHRK",
                    "name": "Extra Gherkin",
                    "sortOrder": 0,
                    "price": 50,
                    "quantity": 2,
                    "productType": 1,
                    "subItems": [],
                    "productTags": []
                }
            ],
            "packaging": {
                "includeCutlery": false
            },
            "discountReferenceIds": []
        }
    ],
    "decimalDigits": 2,
    "numberOfCustomers": 0,
    "channelOrderHistoryRawIds": [],
    "serviceCharge": 93,
    "deliveryCost": 0,
    "bagFee": 152,
    "tip": 0,
    "driverTip": 0,
    "smallOrderFee": 0,
    "discountTotal": 0,
    "discounts": [],
    "capacityUsages": [],
    "recent": false,
    "resolvedBy": ""
}

Response

The webhook response includes a "taxes" array. Each entry represents a tax applied to the ordered items, with the following attributes:

ParameterDefinitionType
nameHuman-readable name of the applied taxstring
taxClassIdUnique identifier for the tax in the POS systeminteger
totalAmount of tax payable for the specified tax, expressed as an integer with 2 decimal digits e.g. 1 dollar would be sent as 100integer

Webhook Response

{
    "taxes":
    [
        {
            "name": "tax-name",
            "taxClassId": 123,
            "total": 100
        }
    ]
}

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json