Any questions

We are happy to help!

Question about Gecko Booking?

If you are unsure whether Gecko Booking is right for you, or if you have other questions, we would love to hear from you!

All good!
Please enter your name.
All good!
Please enter your email.
All good!
All good!
Please enter your question.

Fields marked with an * are required


Guides

Trin for trin-vejledninger til opsætning og brug af systemet.

Guides - Cash register: Completed sale

Cash register: Completed sale

This webhook can be used to send data when a purchase is completed in the cash register system.

The webhook runs when:

  • a receipt is completed in the cash register
  • a receipt is refunded, so that a new receipt is created

If "Customers who have said yes to newsletters" is selected on the webhook, it is only sent for receipts with a customer who has said yes to the newsletter.

The webhook is added to a queue that is processed every 5 minutes. It can therefore take up to about 5 minutes before the webhook is sent.

Example of JSON that can be sent:


		{
"cashRegisterId": [cashRegisterId],
"cashRegisterName": "[cashRegisterName]",
"tellerId": "[tellerId]",
"tellerName": "[tellerName]",
"tellerNo": "[tellerNo]",
"receiptId": [receiptId],
"receiptDate": "[receiptDate]",
"receiptTid": "[receiptTid]",
"receiptDateTime": "[receiptDateTime]",
"receiptTotal": "[receiptTotal]",
"receiptWithoutVat": "[receiptWithoutVat]",
"receiptVatTotal": "[receiptVatTotal]",
"itemLines": [
[receiptLine_begin]
{
"lineId": [lineId],
"itemNo": "[itemNo]",
"itemName": "[itemName]",
"itemCount": "[itemCount]",
"itemPrice": "[itemPrice]",
"itemPriceTotal": "[itemPriceTotal]",
"itemPriceExVat": "[itemPriceExVat]",
"itemPriceTotalExVat": "[itemPriceTotalExVat]",
"employeeId": "[employeeId]",
"employeeName": "[employeeName]",
"employeeNo": "[employeeNo]"
}[lineBreak]
[receiptLine_end]
]
}

Information about the customer (replacement codes from the Customer category) is only filled in if the receipt has a customer attached. Without a customer the codes are not replaced and remain as text in the data that is sent. Therefore use customer codes in quotation marks in the JSON example.


The replacement codes in the example above will be replaced with the following data when the specific webhook runs:

  • [cashRegisterId] is replaced with the unique Id of the cash register in which the sale was completed.
  • [cashRegisterName] is replaced with the name of the cash register in which the sale was completed.
  • [tellerId] is replaced with the unique Id of the employee who was selected as teller for the sale.
  • [tellerName] is replaced with the name of the employee who was selected as teller for the sale.
  • [tellerNo] is replaced with the number, if one is set, of the employee who was selected as teller for the sale.
  • [receiptId] is replaced with the unique Id of the sale, the receipt Id.
  • [receiptDate] is replaced with the date of the sale in the format DD/MM-YYYY. Also available as [receiptDate_YYYY-MM-DD] in the format YYYY-MM-DD.
  • [receiptTid] is replaced with the time of the sale in the format HH:MM:SS.
  • [receiptDateTime] is replaced with the date and time of the sale in the format DD/MM-YYYY HH:MM:SS.
  • [receiptTotal] is replaced with the total value of the sale including VAT.
  • [receiptWithoutVat] is replaced with the total value of the sale excluding VAT.
  • [receiptVatTotal] is replaced with the total value of the VAT on the sale.
  • [receiptTotalProducts] is replaced with the total value of the items from item groups marked 'Product'.
  • [receiptTotalServices] is replaced with the total value of the items from item groups marked 'Service'.
  • [receiptLine_begin] [lineBreak] [receiptLine_end] is used to repeat data for each order line, where the replacement codes below can be used. [lineBreak] gives a comma between the lines:
    • [lineId] is replaced with the unique Id of the line.
    • [itemNo] is replaced with the item number of the line's selected item.
    • [itemName] is replaced with the name of the line's selected item.
    • [itemCount] is replaced with the quantity on the line.
    • [itemPrice] is replaced with the line's unit price.
    • [itemPriceTotal] is replaced with the line's total price including VAT.
    • [itemPriceExVat] is replaced with the line's unit price excluding VAT.
    • [itemPriceTotalExVat] is replaced with the line's total price excluding VAT.
    • [itemCategory] is replaced with 'Service' or 'Product', depending on how the line's item group is marked.
    • [employeeId] is replaced with the unique Id of the employee selected on the line.
    • [employeeName] is replaced with the name of the employee selected on the line.
    • [employeeNo] is replaced with the number, if one is set, of the employee selected on the line.
    If a line has the quantity 0, the quantity is set to 1 and the prices are set to 0, except the unit price [itemPrice], which is empty.

In addition to the above, the following replacement codes from the receipt or invoice can also be used. They are only filled in if the receipt has the information in question (for example a debtor), otherwise they are empty. Texts from customer and debtor are HTML-escaped, so for example & becomes &.

  • [receiptName], [receiptAddress], [receiptPostalCode], [receiptCity], [receiptEmail], [receiptPhone] and [receiptMobile] are replaced with the name, address, postal code, city, email, telephone and mobile that appear on the receipt.
  • [invoiceNo] is replaced with the invoice number. Empty if the receipt has none.
  • [invoiceDate], [invoiceTime] and [invoiceDateTime] are replaced with the receipt's date in the format DD/MM-YYYY, the time in the format HH:MM:SS and both in the format DD/MM-YYYY HH:MM:SS.
  • [debtorId], [debtorName], [debtorCompanyName], [debtorCompanyVat], [debtorDepartmentName], [debtorAddress], [debtorPostalCode], [debtorCity], [debtorPhone], [debtorEmail], [debtorEan] and [debtorEanAtt] are replaced with the debtor's information on the receipt.
  • [paymentCondition] and [paymentConditionLong] are replaced with the name and the long text of the invoice's payment condition. [dueDate] is replaced with the due date in the format DD/MM-YYYY. If there is no payment condition, they are empty.
  • [paymentCondition_start] [paymentCondition_end] surrounds text that is only kept if the invoice has a payment condition.
  • [fik] is replaced with the invoice's FIK line. [fik_start] [fik_end] surrounds text that is only kept if the invoice has a FIK line.
  • [invoiceExtraText] is replaced with the invoice's extra text. The text is not escaped and can contain quotation marks and HTML, which can break the JSON.
  • [faktura_kreditnota] is replaced with the receipt's type as text (invoice or credit note).
  • [each_booking_begin] [each_booking_end] is repeated for each booking on the receipt's lines. Replacement codes for booking can be used in between.

In addition to the above, you can also use replacement codes from the following category to build your own:


 


Try a Free and Non-Binding Demo of Gecko Booking & Administration

Fill out the form, and you will receive a demo as soon as possible.

All good!
Please enter the company name.
All good!
Please enter your phone number.
All good!
Please enter your name.

Fields marked with an * are required