Transaction Receipt

Transaction receipt is the digital transposition of the classic fiscal receipt that is issued for every in-store sale. In the case that the sale is issued through a digital channel (e.g. e-commerce applications) the transaction receipt is the same as the order that get confirmed by the user at checkout.

The Domec API platform defines a data structure which reproduce the fiscal receipt in the form of a json data structure.

A transaction receipt is made by the following fields:

  • Issuer data: Summarizes the issuer data
  • Receipt Date: Defines the date and time when the receipt was prepared
  • Product list: This array contains every product that compose the basket
  • Economics: Fields which contains financial data related to the receipt
  • Payment method list: This list contains one or more Payment method that have been used to pay the receipt
  • Origin of the transaction (Terminal, Type, Number, Operator): This field contains some data useful to track the origin of the request. This include terminal number and actual operator.
  • User data field: this field is useful if the client system wants to attach some domain specific informations to the receipt

Issuer Data

This field represent a data structure containing issuer data attributes. These information includes:

  • Name. Full name of the issuer
  • Address: Address of the issuer
  • Telephone: Phone number of the issuer company
  • EMail: email address of the issuer
  • VATNumber: VAT number of the issuer

Receipt Date

This list represents a one-dimensional vector consisting of a single date type item, containing the date and time when the receipt was generated. Each element of the vector includes the following attributes:

IssueDate: the date and time when the receipt was prepared.

The following sample shows a is generic product list formatted in JSON language.

Product List

The product list represents a one-dimensional vector containing elements of the same type which are, in fact, the items included in the customer’s expense and will be shown in the receipt. Each element of the vector includes the following attributes:

  • Code: Purchased product code
  • Name: Purchased product name
  • Quantity: Total number of purchased products
  • Price: Purchased product unit price

In case of charging operation, the product list must include a record for each card that needs to be recharged. Therefore the recharge card is handled as a product that the store sells to the customer. Multiple cards can be recharged by specifying the individual cards to be recharged into a product structure. The following is an example formatted in JSON of a generic product list which includes a recharge card.

Economics

Economic data are represented through a data structure that can include various fields. Each field identifies a match within the receipt. The structure can contain the following attributes:

  • Subtotal: Indicates the subtotal of the receipt
  • Total: Indicates the total of the receipt
  • Change: Indicates the change to be provided to the customer based on the supported expense and the amount paid

The total field is the only mandatory field. The following sample shows a list of payment methods formatted in JSON language.

Payment Method list

This list is a one-dimensional vector of items of the same type which represent the payment methods chosen by the customer at the time of purchase. Each element of the vector includes the following attributes (in brackets the corresponding value):

Method indicates the chosen payment type and can assume the following values: PrepaidCard (0), Visa (1), VisaElectron (2), Mastercard (3), Amex (4), Bancomat (5), Cheque (6), WireTransfer (7), Cash (8).

  • CardCode: Indicates the payment card code used
  • Amount: Indicates the value associated with chosen type of payment

The following sample shows a list of payment methods formatted in JSON language.

For privacy reasons, the CardCode field can contain an empty string in case of payment by credit card and/or other methods not related to the management of the Stored Value card system of Domec Spa.

Origin of the transaction

Following a request from the customer’s store, the generated data are hosted in this structure and is also represented by a unique cash and store number as well as other data. Each element of the vector includes the following attributes:

  • Shop: The point of sale code used to identify the point of sale on merchant systems
  • Terminal: The terminal code used to identify the terminal number on one of the merchant’s points of sale
  • Type: The type of terminal
  • Number: The drawer code used by the cashier
  • CashDrawer: The operator code used to identify the operator on merchant systems
  • Operator: The operator description used to describe the operator on merchant systems

The following sample shows a list of payment methods formatted in JSON language.

User data field

Field used to deliver information solely for costumer system use. It is an alphanumeric field which can contain anything. For example, the field can contain a string representing the order number “123456” or a more structured information by serializing the JSON itself. Assuming to save both the order number and date, and do not save a magic string like “12345 29/06/2015” you can create a JSON.