HeroJSON Specification
Merchant object
Key | Type | Description | Required |
name | String | Company name | ✅ |
companyID | String | Company's business id or VAT number | ✅ |
Branch object
Key | Type | Description | Required |
name | String | Branch name | ✅ |
subName | String | Freetext slogan etc, placed under branch name | |
String | Email address to branch / company support | ||
phone | String | Phone number to branch / company support | |
websiteURL | String | Website URL of branch / company | |
address | Object | Address values | ✅ |
String | Branch location street address | ✅ | |
String | Branch location city | ✅ | |
String | Branch location zip code | ✅ | |
String | Branch location country | ✅ |
Products array
Products array contains all product on receipt
Key | Type | Description | Required |
name | String | Product name | ✅ |
EANCode | String | Products EAN code | |
quantity | String | Quantity of product | ✅ |
productId | String | Merchants internal productID | |
quantityCode | String | Quantity code for product | ✅ |
freeText | String | Product related text field | |
unitPriceIncVAT | Integer | Unit price including VAT in fractional unit (Cents in Euros etc.) | ✅ |
unitPriceIncVATDecimal | String | Unit price including VAT in main currency unit. Mainly used by petrol receipts | |
totalAmountExcVAT | Integer | Total price for product row without VAT in fractional unit | ✅ |
totalAmountIncVAT | Integer | Total price for product row with VAT in fractional unit | ✅ |
vats | Array | Product level VAT specifications One object represents one VAT rate. If product has multiple taxrates -> multiple objects | ✅ |
String | VAT rate. Integer or Decimal | ✅ | |
Integer | VAT amount in fractional unit | ✅ | |
Integer | Amount without VAT in fractional unit | ✅ | |
Integer | Amount with VAT in fractional unit | ✅ | |
discounts | Array | Product level discount objects. | |
Integer | Amount of discount in fractional unit | ✅ | |
String | Discount percentage in decimal | ||
String | Discount reason in free text | ✅ | |
customAttributes | Array | Key value pair for custom attributes on product These key value pair will be shown on receipt as table under product. | |
String | Free key name | ✅ | |
String | Free value | ✅ |
Receipt VAT specification
Key | Type | Description | Required |
vats | Array | Receipt total VATs as array of objects per VAT rate | ✅ |
String | VAT rate. Integer or Decimal | ✅ | |
Integer | VAT amount in fractional unit | ✅ | |
Integer | Amount without VAT in fractional unit | ✅ | |
Integer | Amount with VAT in fractional unit | ✅ | |
VATCode | String | VAT identifier |
Payments
Card Payment
Key | Type | Description | Required |
type | String | Payment type CARD | CASH | LOYALTY | VOUCHER | ✅ |
amount | Integer | Paid amount in fractional unit (POINT ECR API Amount, field 14) | ✅ |
attributes | Object | Payment terminal attributes All these should be got from payment terminal | ✅ |
String | Card type description if available. | ||
String | Cards masked PAN. At least 4 last digits (POINT ECR API Card Number field 6) | ✅ | |
String | Payment ISO 8601 datetime in UTC (POINT ECR API Date and time of transaction field 13) | ✅ | |
String | Terminal ID from terminal. (POINT ECR API Reader serial number, field 16) | ✅ | |
String | Reference number / Filing code for transaction (POINT ECR API Filing code, field 12) | ✅ | |
String | Payment Authorization code (6 characters, alphanumeric) | ✅ | |
String | Payment authorization method free text | ||
String | Transaction id (POINT ECR API TransactionID, field 11) | ||
String | Type of Transaction PURCHASE | RETURN | ✅ | |
String | Raw Transaction Receipt data from the payment terminal (POINT ECR API Payer’s receipt texts, field 19) | ||
customAttributes | Array | Key value pair for custom attributes on payment These key value pair will be shown on receipt as table under payment. | |
String | Free text key name | ✅ | |
String | Free text value | ✅ |
Cash Payment
Key | Type | Description | Required |
type | String | CASH | ✅ |
amount | Integer | Paid amount in fractional unit | ✅ |
attributes | Object | Cash payment attributes | ✅ |
Integer | Amount that is handed in cash in fractional unit | ✅ |
Loyalty Payment
Key | Type | Description | Required |
type | String | LOYALTY | ✅ |
amount | Integer | Paid amount in fractional unit | ✅ |
attributes | Object | Loyalty card details | ✅ |
String | Free text card type / name | ✅ | |
String | If loyalty card has number it can be placed here | ✅ |
Other Payment
Key | Type | Description | Required |
type | String | OTHERPAYMENT | ✅ |
amount | Integer | Paid amount in fractional unit | ✅ |
attributes | Object | Payment details | ✅ |
String | Free text card type / name |
Voucher Payment
Key | Type | Description | Required |
type | String | VOUCHER | ✅ |
amount | Integer | Paid amount in fractional unit | ✅ |
attributes | Object | Payment details | ✅ |
String | Voucher reference number or id |
Payment custom attributes
All payment objects can have custom attributes.
Key | Type | Description | Required |
customAttributes | Array | Key value pair list | |
String | Free text key | ||
String | Free text value |
General Receipt Data
Key | Type | Description | Required |
freeText | String | Freetext field to be displayed on receipt | |
receiptNumber | String | Merchant's internal receiptnumber | ✅ |
receiptTimeStamp | String | ISO 8601 datetime in UTC , when purchase is made | ✅ |
currencyISOCode | String | Currency code | ✅ |
totalVATAmount | Integer | Total VAT amount in fractional unit | ✅ |
totalPriceExcVAT | Integer | Total price excluding VAT | ✅ |
totalPriceIncVAT | Integer | Total price including VAT | ✅ |
customAttributes | Array | Key value pair list, to be show on receipt | |
String | Free text key | ✅ | |
String | Free text value | ✅ |
Verifications array
Verification Object
Key | Type | Description | Required |
---|---|---|---|
type | String | Type of verification | ✅ |
version | String | Standard version | ✅ |
publicKey | String | Public key for verifying data | ✅ |
transactionId | String | Transaction identifier | ✅ |
currentType | String | Current type (AC|DC) | |
transactionBegin | Transaction Event Object | Transaction Begin event data | |
transactionEnd | Transaction Event Object | Transaction End event data | ✅ |
Transaction Event Object
Key | Type | Description | Required |
---|---|---|---|
signedData | String | Signed transaction event data for verification | ✅ |
Last updated