Demo for a desktop application

Option 1 - Use Caspit. No change to your application

Use Caspit's Allocation Number page here.
Then instruct the user to copy the Allocation Number into a Remarks/Details field in your application.

You can populate the page via this API call:
https://app.caspit.biz/OpenApi/GetAllocationNumber?source=CaspitAccess&Invoice_ID=70&Invoice_Reference_Number=10043&Vat_Number=111111118&Invoice_Date=2023-10-15&Customer_Name=%D7%90%D7%9C%D7%99%D7%94%D7%95%20%D7%94%D7%9B%D7%94%D7%9F&Customer_VAT_Number=211111117&Amount_Before_Discount=4567&Discount=0.33&Payment_Amount=4566.67&VAT_Amount=776.33&Payment_Amount_Including_VAT=5343&Accounting_Software_Number=162405&Invoice_Type=305


Option 2 - Implementing some API calls in your application

The idea is this:
(1) The user gets the Authorization Code via a browser using this page.
(2) The user copies the Auth Code into the desktop application.
(3) The application performs the API calls to get the Token.
This means that you need to add the ability to perform Http communication into the application and parse the response.
If this is not feasible then the whole process will have to be implemented outside of the desktop application.
(4) The application stores the Token and the Refresh Token.
(5) The application uses the Token to get an Allocation Number.
(6) The application uses the Refresh Token to get a new Token and new Refresh Token. Goto step 4.
(7) Once the Refresh Token expires display a relevant message to the user and goto step 1.

Click here to get the Authorization Code

Once you have the Authorization Code copy it to My Desktop Application and close the browser.