DEV Community

Cover image for ZIMRA Fiscalisation with the Panier API: A Step-by-Step Guide
Anthony Jekanyika
Anthony Jekanyika

Posted on • Edited on

ZIMRA Fiscalisation with the Panier API: A Step-by-Step Guide

Panier is a system built for small business with features including Point of Sale, Invoices, Credit Notes, Debit Notes, Delivery Notes, Quotations, Multi-Currency, Stock Management, Profit and Loss and much more. Panier also includes the ability to ZIMRA Fiscalize and extends this ability to the Panier API allowing you to integrate with it from your project. In this article we will show you how you can integrate your project with ZIMRA's FDMS through the Panier API.

Setup Panier

First you need to register an account on Panier and create a company if you don't already have one. You will get a 14 day FREE trial when you register, after which you will have to pay a US$4.99 monthly subscription for each company that you have.

Next navigate to the Developer API page of your company and generate the API Credentials.

Next go to the API Credentials tab and copy down the APP ID and API KEY, we are going to need them later.

Panier API Credentials Tab

ZIMRA Fiscalisation Integration

We are now going to generate a ZIMRA Virtual Fiscal Device by going to the ZIMRA Fisc page of our company and filling in the form with your ZIMRA VAT information.

Panier ZIMRA Fiscalisation Setup Form

This will automatically generate the virtual fiscal device for you in about 5 minutes (depending on your internet connection) and automatically submit it for approval to ZIMRA (This might take up to 3 working days).

Panier ZIMRA Integration Progress Page

Whilst you wait for your virtual fiscal device to be approved and put into production, you can use the API inside ZIMRA's test environment, which is what we will be doing today.

ZIMRA Taxes

When generate a virtual fiscal device, ZIMRA will send us a list of applicable taxes that you can use. We then add these ZIMRA Taxes, as readonly taxes on your company's Taxes page.

Panier ZIMRA Taxes list

All the products you create must be linked to one of these ZIMRA Taxes in order to fiscalize.

Setup API Credentials

You need to open the Panier API Documentation and add the APP ID and API KEY in order to get access to the API.

Panier API Credentials

Get the ZIMRA Taxes

Go to Search Taxes endpoint and run the request, with the following payload so that we get all the taxes associated with your company:

{
  "data": {
    "query": "*"
  }
}
Enter fullscreen mode Exit fullscreen mode

If everything went well, you should get a response similar to this:

{
  "searched": [
    {
      "id": "cmac8znc00008zm0gxrwpm55t",
      "name": "VAT",
      "percentage": 5,
      "code": null,
      "zimra_tax_id": 514,
      "updated_at": "2025-05-06T08:28:53.673Z",
      "created_at": "2025-05-06T08:28:47.712Z"
    },
    {
      "id": "cmac8znby0006zm0gppkcd15d",
      "name": "VAT",
      "percentage": 0,
      "code": null,
      "zimra_tax_id": 2,
      "updated_at": "2025-05-06T08:28:53.658Z",
      "created_at": "2025-05-06T08:28:47.710Z"
    },
    {
      "id": "cmac8znby0007zm0gilfcssvi",
      "name": "VAT",
      "percentage": 15,
      "code": null,
      "zimra_tax_id": 3,
      "updated_at": "2025-05-06T08:28:53.656Z",
      "created_at": "2025-05-06T08:28:47.710Z"
    },
    {
      "id": "cmac8znbu0005zm0gdy8xxoi6",
      "name": "VAT Exempt",
      "percentage": null,
      "code": null,
      "zimra_tax_id": 1,
      "updated_at": "2025-05-06T08:28:53.653Z",
      "created_at": "2025-05-06T08:28:47.707Z"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Notice that ZIMRA Taxes have a non-null zimra_tax_id.

Create a Product

Go to the Create Product endpoint and create a product. Making sure to link one of the ZIMRA Taxes above. For this example we will use the id of the ZIMRA VAT Exempt tax as the applicable_tax_id in the following payload:

{
  "data": [
    {
      "name": "Eggs",
      "description": "One dozen large eggs",
      "buying_price": 2.51,
      "selling_price": 5.81,
      "initial_quantity": 100,
      "hs_code": "0808.01.01",
      "is_inventory_item": true,
      "applicable_tax_id": "cmac8znbu0005zm0gdy8xxoi6"
    }
  ],
  "overwrite_duplicates": true
}
Enter fullscreen mode Exit fullscreen mode

According to the ZIMRA Guidelines all products now need to have an HS Code in order to fiscalize.

You should get a similar response to this:

{
  "created": [
    {
      "id": "cma5e7aca0000zm1x9aiabiil",
      "name": "Eggs",
      "description": "One dozen large eggs",
      "buying_price": 2.51,
      "sku": "",
      "hs_code": "0808.01.01",
      "selling_price": 5.81,
      "quantity": 100,
      "is_inventory_item": true,
      "updated_at": "2025-05-06T09:26:12.407Z",
      "created_at": "2025-05-01T13:20:18.970Z",
      "applicable_tax": {
        "id": "cmac8znbu0005zm0gdy8xxoi6",
        "name": "VAT Exempt",
        "percentage": null,
        "code": null,
        "zimra_tax_id": 1
      }
    }
  ],
  "excluded_duplicates": []
}
Enter fullscreen mode Exit fullscreen mode

Create a Customer

Now let's create a customer by going to the Create Customer endpoint and using the following payload:

{
  "data": [
    {
      "name": "Corner Bakery",
      "contact_person": "John Smith",
      "phone": "0772000001",
      "email": "john@cornerbakery.com",
      "address": "123 Road Drive, City, Country",
      "fax": "02888881",
      "website": "https://example.com",
      "tax_reg_number": "",
      "company_reg_number": "",
      "tin_number": "",
      "vat_number": ""
    }
  ],
  "overwrite_duplicates": true
}
Enter fullscreen mode Exit fullscreen mode

You should get a similar response to this:

{
  "created": [
    {
      "id": "cmaccp0vy0000zmksubook8hd",
      "name": "Corner Bakery",
      "contact_person": "John Smith",
      "phone": "0772000001",
      "email": "john@cornerbakery.com",
      "address": "123 Road Drive, City, Country",
      "fax": "02888881",
      "website": "https://example.com",
      "tax_reg_number": "",
      "company_reg_number": "",
      "tin_number": "",
      "vat_number": "",
      "updated_at": "2025-05-06T10:12:30.527Z",
      "created_at": "2025-05-06T10:12:30.527Z"
    }
  ],
  "excluded_duplicates": []
}
Enter fullscreen mode Exit fullscreen mode

Create a ZIMRA Fiscal Invoice

Panier has a smart automated ZIMRA Open day and Close day feature, so it will first check if the fiscal day is opened or not, if not it automatically open it before it creates a Fiscal Invoice. In addition, if the fiscal day has been opened for close to 24 hours, it will automatically close the fiscal day for you. However if you wish to manually open or close the fiscal day you can use the ZIMRA Open Day and ZIMRA Close Day endpoints on the Panier API.

Now let us create a Fiscal Invoice by going to the Create Invoice endpoint and using the following payload:

{
  "data": [
    {
      "customer_id": "cmaccp0vy0000zmksubook8hd",
      "products": [
        {
          "id": "cma5e7aca0000zm1x9aiabiil",
          "quantity": 1
        }
      ],
      "date_format": "dd/mm/yy",
      "payment_due": "2025-04-18T15:40:00.546Z",
      "payment_information": "Please make all payments to our CBZ Bank Account XXXXXXXXXXX",
      "terms_n_conditions": "This invoice will be considered invalid when the payment due date has lapsed"
    }
  ],
  "zimra_fiscalize": true
}
Enter fullscreen mode Exit fullscreen mode

Et voila, here is our ZIMRA Fiscal Invoice 💪

{
  "created": [
    {
      "id": "cmacdp73c0005zmjpdime2h47",
      "number": "WGYM9GMJ639N",
      "date_format": "dd/mm/yy",
      "date_issued": "2025-05-06T10:40:30.102Z",
      "recipients": [],
      "payment_due": "2025-04-18T15:40:00.546Z",
      "currency": {
        "symbol": "$",
        "name": "US Dollar",
        "symbol_native": "$",
        "decimal_digits": 2,
        "rounding": 0,
        "code": "USD",
        "name_plural": "US dollars",
        "exchange_rate": 1
      },
      "products": [
        {
          "id": "cma5e7aca0000zm1x9aiabiil",
          "name": "Eggs",
          "description": "One dozen large eggs",
          "buying_price": 2.51,
          "sku": "",
          "hs_code": "0808.01.01",
          "is_inventory_item": true,
          "applicable_tax": {
            "id": "cmac8znbu0005zm0gdy8xxoi6",
            "name": "VAT Exempt",
            "percentage": null,
            "code": null,
            "zimra_tax_id": 1
          },
          "_selling_price": 5.81,
          "_quantity": 1,
          "_discount": 0,
          "_total_excluding_tax": 5.81,
          "_tax": 0,
          "_total_including_tax": 5.81
        }
      ],
      "total": 5.81,
      "discount": 0,
      "payment_information": "Please make all payments to our CBZ Bank Account XXXXXXXXXXX",
      "terms_n_conditions": "This invoice will be considered invalid when the payment due date has lapsed",
      "sending_status": "Do not send",
      "template_preference": {
        "template": 1,
        "color": "primary",
        "table_layout": "Plain"
      },
      "is_paid": false,
      "updated_at": "2025-05-06T10:40:38.185Z",
      "created_at": "2025-05-06T10:40:38.185Z",
      "zimra_receipt": {
        "id": "cmacdp72x0004zmjpchd3veni",
        "device_id": 24455,
        "device_serial_number": "HQAUR8QVG29BBY33",
        "receipt_type": "FISCALINVOICE",
        "receipt_currency": "USD",
        "receipt_counter": 1,
        "receipt_global_no": 4,
        "receipt_date": "2025-05-06T12:40:34",
        "receipt_total": 5.81,
        "receipt_taxes": [
          {
            "taxID": 1,
            "taxAmount": 0,
            "salesAmountWithTax": 5.81
          }
        ],
        "previous_receipt_hash": "",
        "result_used_to_hash": "24455FISCALINVOICEUSD72025-05-06T12:40:345810581",
        "receipt_hash": "oDCrjJ5wjYdt+DjjqEJ6Z9zEtjttpb5OYLlYh9Avsic=",
        "signature": "rsMdb9briDnowH7cVyu67heYdZgVzImYQSCz+tLo4LWhS/+lkGQOoPIHUmsnv+y6PAjKR2HMP9hwKesViGQRf3xeqryzwM2+Yb6QtRh9ZfwRvj7qbM99pbd+111CStGimwrXuWRYhBRJpKbaSi0awD2rlOq4ZIAdM2tHVXb8Zvw+Xc6bZk8KmmY6Wa+RlzpGCP9m2rc3bep+sT5FHLf5CzOkCUtpNvJJBcjEowGSuU6nbe8peRMxX7gVifup7+pwmYnh6oShK4oyIlWvbzYVtdI9H50hlzomTy7EOs9eLoZH1iEXumHejCuI09mGqPjaLTTzpgX7CdVjvNwkJdf04w==",
        "qr_code_url": "https://fdmstest.zimra.co.zw/000002445506052025000000000724F42D4F3579D932",
        "verification_code": "24F4-2D4F-3579-D932",
        "receipt_data": {
          "receipt": {
            "receiptType": "FiscalInvoice",
            "receiptCurrency": "USD",
            "receiptCounter": 1,
            "receiptGlobalNo": 4,
            "receiptDate": "2025-05-06T12:40:34",
            "receiptLinesTaxInclusive": false,
            "receiptLines": [
              {
                "receiptLineType": "Sale",
                "receiptLineNo": 1,
                "receiptLineHSCode": "08080101",
                "receiptLineName": "Eggs",
                "receiptLinePrice": 5.81,
                "receiptLineQuantity": 1,
                "receiptLineTotal": 5.81,
                "taxID": 1
              }
            ],
            "receiptTaxes": [
              {
                "taxID": 1,
                "taxAmount": 0,
                "salesAmountWithTax": 5.81
              }
            ],
            "receiptPayments": [
              {
                "moneyTypeCode": "Cash",
                "paymentAmount": 5.81
              }
            ],
            "receiptTotal": 5.81,
            "receiptPrintForm": "InvoiceA4",
            "receiptDeviceSignature": {
              "hash": "oDCrjJ5wjYdt+DjjqEJ6Z9zEtjttpb5OYLlYh9Avsic=",
              "signature": "rsMdb9briDnowH7cVyu67heYdZgVzImYQSCz+tLo4LWhS/+lkGQOoPIHUmsnv+y6PAjKR2HMP9hwKesViGQRf3xeqryzwM2+Yb6QtRh9ZfwRvj7qbM99pbd+111CStGimwrXuWRYhBRJpKbaSi0awD2rlOq4ZIAdM2tHVXb8Zvw+Xc6bZk8KmmY6Wa+RlzpGCP9m2rc3bep+sT5FHLf5CzOkCUtpNvJJBcjEowGSuU6nbe8peRMxX7gVifup7+pwmYnh6oShK4oyIlWvbzYVtdI9H50hlzomTy7EOs9eLoZH1iEXumHejCuI09mGqPjaLTTzpgX7CdVjvNwkJdf04w=="
            },
            "invoiceNo": "WGYM9GMJ639N"
          }
        },
        "server_response": {
          "receiptID": 5856878,
          "serverDate": "2025-05-06T12:40:37",
          "receiptServerSignature": {
            "certificateThumbprint": "F9B295CA65BA22B94F6D4B27E48D08BF6CD7F7C8",
            "hash": "n40uljhSBpFdAJ2RTDkh1QQ2hpoEQ/vN+pxVjLQQdTk=",
            "signature": "DHzjt+sNDnS86CTY7iCl0IapitZEmpFoNTaY1h/UfXsi95KXLyEHh3Aqu/v40Y5bld8OrCBRph7+Ro91ADe3iJcP1Hn6MeOKDPw9NWqWoSayBlMX/HAfjzKMgV/88W/CGFBGLrAoAU4XsOo2MNOODqtXMHHa0RpaCjgjoPW8gZT5GywQWhkQMwXVF+eNUpb+9uwUL+ZAxwQhXbjm+Wp3K2SEg3dMPmRZuSiYeIWoCmRmrxCj8DRe/UOo6/+kHWRclk4ej90q8kgq6dhxG6R8Y4R0jwB5D/KvB1Qn2RFzLprgW6qS86fuC0l4QDpQsvCpqfQz3mCUwAdf6tdZbb9iKQ=="
          },
          "validationErrors": [],
          "operationID": "0HNBSPOBISK2Q:00000001"
        },
        "validation_errors": [],
        "fiscal_day_no": 2,
        "updated_at": "2025-05-06T10:40:38.185Z",
        "created_at": "2025-05-06T10:40:38.170Z"
      },
      "customer": {
        "id": "cmaccp0vy0000zmksubook8hd",
        "name": "Corner Bakery",
        "contact_person": "John Smith",
        "phone": "0772000001",
        "email": "john@cornerbakery.com",
        "address": "123 Road Drive, City, Country",
        "fax": "02888881",
        "website": "https://example.com",
        "tax_reg_number": "",
        "company_reg_number": "",
        "tin_number": "",
        "vat_number": ""
      }
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Create a Credit Note

Now the we have created a ZIMRA Fiscal Invoice let now create a credit note. We do this by going to the Create Credit Note endpoint and use this payload (Pay close attention to the invoice_id):

{
  "data": [
    {
      "invoice_id": "cmacdp73c0005zmjpdime2h47",
      "products": [
        {
          "id": "cma5e7aca0000zm1x9aiabiil",
          "quantity": 1
        }
      ]
    }
  ],
  "zimra_fiscalize": true
}
Enter fullscreen mode Exit fullscreen mode

You should get the following response:

{
  "created": {
    "id": "cmace14zn0000zmktr4vcujs4",
    "number": "KXI20Y8G4TRV",
    "invoice_id": "cmacdp73c0005zmjpdime2h47",
    "created_by": null,
    "recipients": [],
    "currency": {
      "symbol": "$",
      "name": "US Dollar",
      "symbol_native": "$",
      "decimal_digits": 2,
      "rounding": 0,
      "code": "USD",
      "name_plural": "US dollars",
      "exchange_rate": 1
    },
    "products": [
      {
        "id": "cma5e7aca0000zm1x9aiabiil",
        "name": "Eggs",
        "description": "One dozen large eggs",
        "buying_price": 2.51,
        "sku": "",
        "hs_code": "0808.01.01",
        "is_inventory_item": true,
        "applicable_tax": {
          "id": "cmac8znbu0005zm0gdy8xxoi6",
          "name": "VAT Exempt",
          "percentage": null,
          "code": null,
          "zimra_tax_id": 1
        },
        "_selling_price": 5.81,
        "_credited_quantity": 1,
        "_total_excluding_tax": 5.81,
        "_tax": 0,
        "_total_including_tax": 5.81
      }
    ],
    "total": 5.81,
    "template_preference": {
      "template": 1,
      "color": "primary",
      "table_layout": "Plain"
    },
    "created_at": "2025-05-06T10:49:55.329Z",
    "zimra_receipt": {
      "id": "cmace7eng0000zmmu6uj06lxy",
      "device_id": 24455,
      "device_serial_number": "HQAUR8QVG29BBY33",
      "receipt_type": "CREDITNOTE",
      "receipt_currency": "USD",
      "receipt_counter": 2,
      "receipt_global_no": 5,
      "receipt_date": "2025-05-06T12:54:46",
      "receipt_total": -5.81,
      "receipt_taxes": [
        {
          "taxID": 1,
          "taxAmount": 0,
          "salesAmountWithTax": -5.81
        }
      ],
      "previous_receipt_hash": "oDCrjJ5wjYdt+DjjqEJ6Z9zEtjttpb5OYLlYh9Avsic=",
      "result_used_to_hash": "24455CREDITNOTEUSD82025-05-06T12:54:46-5810-581oDCrjJ5wjYdt+DjjqEJ6Z9zEtjttpb5OYLlYh9Avsic=",
      "receipt_hash": "F7ZV6q3zDkgKK2/d2970TkxtrwyyQwg9AUXeu6b1Pr8=",
      "signature": "f1GUv50l0ttvlunQ++qcRvHYOpKIaasEQxTC5UZRNVq3xdwB5lKkbdffn4NB6/9rwMvVHKJSQ2MhaSJ8U43JiU23NR1U/4vel0NTjfwsespeuuSStN2L4HEkYoEYrTXVM4xm/5GNhHefCX4q8uimoawZvqfAgSL05QvUS6gA2nDP/QUp78KUkOzz52yjAmc5rXHFvbLOLYsvqNgnuQibOaUlfTDfkF3Ywq1cYHawcp3vVgxFC+xR1zEXAvDK2cE/Bnsm8p8GVvmYZEQD/wuTgKvLznm/rDEZBSAwcTsTGHTF6+QMKah42vsZpbk2S4FoDDN9p73ZvsHec5kBdcu96g==",
      "qr_code_url": "https://fdmstest.zimra.co.zw/000002445506052025000000000862174C46EF1A3EB0",
      "verification_code": "6217-4C46-EF1A-3EB0",
      "receipt_data": {
        "receipt": {
          "receiptType": "CreditNote",
          "receiptCurrency": "USD",
          "receiptCounter": 2,
          "receiptGlobalNo": 5,
          "receiptDate": "2025-05-06T12:54:46",
          "receiptLinesTaxInclusive": false,
          "receiptLines": [
            {
              "receiptLineType": "Sale",
              "receiptLineNo": 1,
              "receiptLineHSCode": "08080101",
              "receiptLineName": "Eggs",
              "receiptLinePrice": -5.81,
              "receiptLineQuantity": 1,
              "receiptLineTotal": -5.81,
              "taxID": 1
            }
          ],
          "receiptTaxes": [
            {
              "taxID": 1,
              "taxAmount": 0,
              "salesAmountWithTax": -5.81
            }
          ],
          "receiptPayments": [
            {
              "moneyTypeCode": "Cash",
              "paymentAmount": -5.81
            }
          ],
          "receiptTotal": -5.81,
          "receiptPrintForm": "InvoiceA4",
          "receiptDeviceSignature": {
            "hash": "F7ZV6q3zDkgKK2/d2970TkxtrwyyQwg9AUXeu6b1Pr8=",
            "signature": "f1GUv50l0ttvlunQ++qcRvHYOpKIaasEQxTC5UZRNVq3xdwB5lKkbdffn4NB6/9rwMvVHKJSQ2MhaSJ8U43JiU23NR1U/4vel0NTjfwsespeuuSStN2L4HEkYoEYrTXVM4xm/5GNhHefCX4q8uimoawZvqfAgSL05QvUS6gA2nDP/QUp78KUkOzz52yjAmc5rXHFvbLOLYsvqNgnuQibOaUlfTDfkF3Ywq1cYHawcp3vVgxFC+xR1zEXAvDK2cE/Bnsm8p8GVvmYZEQD/wuTgKvLznm/rDEZBSAwcTsTGHTF6+QMKah42vsZpbk2S4FoDDN9p73ZvsHec5kBdcu96g=="
          },
          "invoiceNo": "MMKAJ3ZXM8LJ",
          "creditDebitNote": {
            "receiptID": 5856878,
            "deviceID": 24455,
            "receiptGlobalNo": 5,
            "fiscalDayNo": 2
          },
          "receiptNotes": "This is a Credit Note for Fiscal Invoice No. MMKAJ3ZXM8LJ"
        }
      },
      "server_response": {
        "receiptID": 5856906,
        "serverDate": "2025-05-06T12:54:47",
        "receiptServerSignature": {
          "certificateThumbprint": "F9B295CA65BA22B94F6D4B27E48D08BF6CD7F7C8",
          "hash": "PLOzmw3mkeODBlAd3GR8gUHMZmcfRTvz73ON5jZTpp4=",
          "signature": "YsI0+mo0mjSbZfVkiGkCJ2SDjXbiIqdSDk3+sYgxjshMledi3BZWiEk8SSm4d3iyH3cHoEP3gJIv39obh7x2SrGztWNHbFbCNQ34k46DI3niGBiuxyXkn9MhYJAWvY5UcMqBrOKIcLQ5x8LL/DjTJbmPAS5ts4cDuLRFjn7SvkEISzJ638GFCWhe2TyKfniS12JS3jYW8NpHojt4U5bgHrgaXhhp09NV+7Gvi9GISVFyMfLo6h43MDdQdnSx9SpzoUDjUfnXpYi7hs8VNkYrJbh+R4fnRYjh6syr3wl5GF8Qz/GbTHCzgPeTI6J3flUgZ7qK5sQxooHsUumrCFtGwg=="
        },
        "validationErrors": [],
        "operationID": "0HNBSPOBISO8M:00000001"
      },
      "validation_errors": [],
      "fiscal_day_no": 2,
      "updated_at": "2025-05-06T10:54:47.801Z",
      "created_at": "2025-05-06T10:54:47.788Z"
    },
    "customer": {
      "id": "cmaccp0vy0000zmksubook8hd",
      "name": "Corner Bakery",
      "contact_person": "John Smith",
      "phone": "0772000001",
      "email": "john@cornerbakery.com",
      "address": "123 Road Drive, City, Country",
      "fax": "02888881",
      "website": "https://example.com",
      "tax_reg_number": "",
      "company_reg_number": "",
      "tin_number": "",
      "vat_number": ""
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Create a Debit Note

To create a debit note we need to go to the Create Debit Note endpoint and use this payload:

{
  "data": [
    {
      "invoice_id": "cmacdp73c0005zmjpdime2h47",
      "products": [
        {
          "id": "cma5e7aca0000zm1x9aiabiil",
          "quantity": 1
        }
      ]
    }
  ],
  "zimra_fiscalize": true
}
Enter fullscreen mode Exit fullscreen mode

You should get the following response:

{
  "created": [
    {
      "id": "cmacels1a0001zmly40q7xwxn",
      "number": "VFPS372JJPWL",
      "invoice_id": "cmacdp73c0005zmjpdime2h47",
      "recipients": [],
      "currency": {
        "symbol": "$",
        "name": "US Dollar",
        "symbol_native": "$",
        "decimal_digits": 2,
        "rounding": 0,
        "code": "USD",
        "name_plural": "US dollars",
        "exchange_rate": 1
      },
      "products": [
        {
          "id": "cma5e7aca0000zm1x9aiabiil",
          "name": "Eggs",
          "description": "One dozen large eggs",
          "buying_price": 2.51,
          "sku": "",
          "hs_code": "0808.01.01",
          "is_inventory_item": true,
          "applicable_tax": {
            "id": "cmac8znbu0005zm0gdy8xxoi6",
            "name": "VAT Exempt",
            "percentage": null,
            "code": null,
            "zimra_tax_id": 1
          },
          "_selling_price": 5.81,
          "_debited_quantity": 1,
          "_total_excluding_tax": 5.81,
          "_tax": 0,
          "_total_including_tax": 5.81
        }
      ],
      "total": 5.81,
      "template_preference": {
        "template": 7,
        "color": "primary",
        "table_layout": "Plain"
      },
      "created_at": "2025-05-06T11:05:58.319Z",
      "zimra_receipt": {
        "id": "cmacels0s0000zmly29jdl0sb",
        "device_id": 24455,
        "device_serial_number": "HQAUR8QVG29BBY33",
        "receipt_type": "DEBITNOTE",
        "receipt_currency": "USD",
        "receipt_counter": 3,
        "receipt_global_no": 9,
        "receipt_date": "2025-05-06T13:05:57",
        "receipt_total": 5.81,
        "receipt_taxes": [
          {
            "taxID": 1,
            "taxAmount": 0,
            "salesAmountWithTax": 5.81
          }
        ],
        "previous_receipt_hash": "F7ZV6q3zDkgKK2/d2970TkxtrwyyQwg9AUXeu6b1Pr8=",
        "result_used_to_hash": "24455DEBITNOTEUSD92025-05-06T13:05:575810581F7ZV6q3zDkgKK2/d2970TkxtrwyyQwg9AUXeu6b1Pr8=",
        "receipt_hash": "IOAf+DHOzM7J0aXRdkz30YGImwmBBARWFbQhPJKZ/UY=",
        "signature": "NKR4qaZcvwB9D0so9zglc905UdWHR3yPbqWs5UYHNiwb0xKkVyoutMqT1vfx5DLzYl67BmegX7TQfoMz7p8b//x5abDRCP6+hcOuDQbHV6UMgPhMWlcMpLpNTgPhIH8/vOCIWy80IMw9Ae20DbejQ+ARhc2bFGFiwVxG7DFnBD7HUFxqcLlLkbnhMYWipOG/cf8TYjz6nEGWRpbGNyIuqs+ksOMye2jGIL3qezpAuf6MdXtbqiEhff1moEin79TpPWRvUO8ThL/yw2YqO6x6r0NahlycpY6xzVBGa7eXrI3tKWAh56HyjP2AY0pygVrFjqXsVinY3wArZViZKalc/g==",
        "qr_code_url": "https://fdmstest.zimra.co.zw/000002445506052025000000000954386E38A698E4DB",
        "verification_code": "5438-6E38-A698-E4DB",
        "receipt_data": {
          "receipt": {
            "receiptType": "DebitNote",
            "receiptCurrency": "USD",
            "receiptCounter": 3,
            "receiptGlobalNo": 9,
            "receiptDate": "2025-05-06T13:05:57",
            "receiptLinesTaxInclusive": false,
            "receiptLines": [
              {
                "receiptLineType": "Sale",
                "receiptLineNo": 1,
                "receiptLineHSCode": "08080101",
                "receiptLineName": "Eggs",
                "receiptLinePrice": 5.81,
                "receiptLineQuantity": 1,
                "receiptLineTotal": 5.81,
                "taxID": 1
              }
            ],
            "receiptTaxes": [
              {
                "taxID": 1,
                "taxAmount": 0,
                "salesAmountWithTax": 5.81
              }
            ],
            "receiptPayments": [
              {
                "moneyTypeCode": "Cash",
                "paymentAmount": 5.81
              }
            ],
            "receiptTotal": 5.81,
            "receiptPrintForm": "InvoiceA4",
            "receiptDeviceSignature": {
              "hash": "IOAf+DHOzM7J0aXRdkz30YGImwmBBARWFbQhPJKZ/UY=",
              "signature": "NKR4qaZcvwB9D0so9zglc905UdWHR3yPbqWs5UYHNiwb0xKkVyoutMqT1vfx5DLzYl67BmegX7TQfoMz7p8b//x5abDRCP6+hcOuDQbHV6UMgPhMWlcMpLpNTgPhIH8/vOCIWy80IMw9Ae20DbejQ+ARhc2bFGFiwVxG7DFnBD7HUFxqcLlLkbnhMYWipOG/cf8TYjz6nEGWRpbGNyIuqs+ksOMye2jGIL3qezpAuf6MdXtbqiEhff1moEin79TpPWRvUO8ThL/yw2YqO6x6r0NahlycpY6xzVBGa7eXrI3tKWAh56HyjP2AY0pygVrFjqXsVinY3wArZViZKalc/g=="
            },
            "invoiceNo": "VFPS372JJPWL",
            "creditDebitNote": {
              "receiptID": 5856878,
              "deviceID": 24455,
              "receiptGlobalNo": 8,
              "fiscalDayNo": 2
            },
            "receiptNotes": "This is a Debit Note for Fiscal Invoice No. VFPS372JJPWL"
          }
        },
        "server_response": {
          "receiptID": 5856938,
          "serverDate": "2025-05-06T13:05:58",
          "receiptServerSignature": {
            "certificateThumbprint": "F9B295CA65BA22B94F6D4B27E48D08BF6CD7F7C8",
            "hash": "3gHhVyHCPRBILq7JwGZd5rXFA8VQUunQBdqUvMxmZFA=",
            "signature": "cFCHQvgcVcTxamUTqING1q7MJgnqZdf4WbtRagCSB2ISG7Ezv3Gnd6hDb7RdzL+C5/6uAZgNjf+XnwStde4zZzlZ9PBvRyvPhCQp3qb84FriSGpn+LQanrh9KLuQybDwPDIlWj42GXEv+PN0IqVKZnEUkNkWJiVMeIV8pZd/SnLgyhd8FR5uXt0RT9ofE7HdfYdNPk9jpXRp+KNSgu1riEREneTuwyGEW1wokE8H6waiA0i63HEZ5Qkab+v5uB/gBt1WmNHZvSu0a6b8lWKysWNWNLPXMo/Jco61QKnoxwRTFSPL0ZTJvfq7HvqPmRKguYuWki3K0Cvdl0f2mLs+KQ=="
          },
          "validationErrors": [],
          "operationID": "0HNBSPOBISSDG:00000001"
        },
        "validation_errors": [],
        "fiscal_day_no": 2,
        "updated_at": "2025-05-06T11:05:58.319Z",
        "created_at": "2025-05-06T11:05:58.300Z"
      },
      "customer": {
        "id": "cmaccp0vy0000zmksubook8hd",
        "name": "Corner Bakery",
        "contact_person": "John Smith",
        "phone": "0772000001",
        "email": "john@cornerbakery.com",
        "address": "123 Road Drive, City, Country",
        "fax": "02888881",
        "website": "https://example.com",
        "tax_reg_number": "",
        "company_reg_number": "",
        "tin_number": "",
        "vat_number": ""
      }
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Fiscalizing an existing Invoice, Credit Note or Debit Note

Panier allows you to create an invoice, credit note or debit note then fiscalize it later. This can be done by using the Fiscalize endpoint.

Closing Remarks

This API is based on the official ZIMRA Fiscal Device Gateway API Specs v7.2 and so we recommend that you get acquainted with it in order to get the most out of this API.

If you have any questions. Feel free to ask us in the comments sections of this article or email us directly on support@panier.app.

Top comments (2)

Collapse
 
collins_kurai profile image
Collins Kurai

what parameters are used by zimra to check if your invoice signature is valid

Collapse
 
jeky1950 profile image
Anthony Jekanyika • Edited

Hi @collins_kurai. According to the ZIMRA FISCAL DEVICE GATEWAY SPECIFICATIONS v7.2, you need to create a valid invoice signature, that is, your device ID and Receipt Data must be valid. Most often than not the problem with an invalid invoice will lie with the Receipt Data to being in the correct format. However with our API, all of this is done for you.