Search…
HeroJSON Specification

Merchant object

1
"merchant": {
2
"name": "Global Receipt Delicatesse",
3
"companyID": "123456-7",
4
"branch": {
5
"name": "Receipt Restaurant",
6
"subName":"FastFood",
7
"email": "[email protected]",
8
"phone": "040-5086462",
9
"address": {
10
"streetAddress": "Itsenäisyydenkatu 17 a 15",
11
"city": "Tampere",
12
"zipCode": "33500",
13
"country": "Finland"
14
}
15
}
Copied!
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
email
String
Email address to branch / company support
phone
String
Phone number to branch / company support
address
Object
Address values
streetAddress
String
Branch location street address
city
String
Branch location city
zipCode
String
Branch location zip code
country
String
Branch location country

Products array

Products array contains all product on receipt
1
"products": [
2
{
3
"name": "Ground Control",
4
"EANCode": "42222130165",
5
"quantity": "4",
6
"productId": "1234",
7
"quantityCode": "PCS",
8
"freeText": "Product instructions etc",
9
"unitPriceIncVAT": 5180,
10
"unitPriceIncVATDecimal": "51,80",
11
"totalAmountExcVAT": 18836,
12
"totalAmountIncVAT": 20720,
13
"vats": [
14
{
15
"VATRate": "24",
16
"VATAmount": 1884,
17
"totalAmountExcVAT": 18836,
18
"totalAmountIncVAT": 20720
19
}
20
],
21
"discounts": [
22
{
23
"amount": 0,
24
"percentage": "0.00",
25
"description": ""
26
}
27
],
28
"customAttributes": [
29
{ "Warranty": "2 years" },
30
{ "Valid until": "2020-11-26" }
31
]
32
}
33
],
Copied!
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
VATRate
String
VAT rate. Integer or Decimal
VATAmount
Integer
VAT amount in fractional unit
totalAmountExcVAT
Integer
Amount without VAT in fractional unit
totalAmountIncVAT
Integer
Amount with VAT in fractional unit
discounts
Array
Product level discount objects.
amount
Integer
Amount of discount in fractional unit
percentage
String
Discount percentage in decimal
description
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.
key
String
Free key name
value
String
Free value

Receipt VAT specification

1
2
"vats": [
3
{
4
"VATRate": "24",
5
"totalVATAmount": 1884,
6
"totalAmountExcVAT": 18836,
7
"totalAmountIncVAT": 20720,
8
"VATCode": "A"
9
}
10
],
Copied!
Key
Type
Description
Required
vats
Array
Receipt total VATs as array of objects per VAT rate
VATRate
String
VAT rate. Integer or Decimal
totalVATAmount
Integer
VAT amount in fractional unit
totalAmountExcVAT
Integer
Amount without VAT in fractional unit
totalAmountIncVAT
Integer
Amount with VAT in fractional unit
VATCode
String
VAT identifier

Payments

Card Payment

1
"payments": [
2
{
3
"type": "CARD",
4
"amount": 20720,
5
"attributes": {
6
"cardType": "PaymentCard",
7
"maskedPAN": "401288******1881",
8
"timeStamp": "2018-11-26T12:35:34.678Z",
9
"terminalId": "BS-4545F9",
10
"unixTimeStamp": 1543235735,
11
"referenceNumber": "12315352349",
12
"authorizationCode": "HIU456HDDF67FH",
13
"authorizationMethodType": "00948",
14
"transactionId": "123e4567-e89b-12d3-a456-426655440000"
15
},
16
"customAttributes": [
17
{ "key": "value" }
18
]
19
Copied!
Key
Type
Description
Required
type
String
Payment type CARD | CASH | LOYALTY
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
cardType
String
Card type description if available.
maskedPan
String
Cards masked PAN. At least 4 last digits
(POINT ECR API Card Number field 6)
timeStamp
String
Payment ISO 8601 datetime in UTC
(POINT ECR API Date and time of transaction field 13)
terminalId
String
Terminal ID from terminal.
(POINT ECR API Reader serial number, field 16)
unixTimeStamp
Integer
Payment unix timestamp
referenceNumber
String
Reference number / filingcode for transaction
(POINT ECR API Filing code, field 12)
authorizationCode
String
Payment authorization code
(POINT ECR API Transaction Certificate, field 8)
authorizationMethodType
String
Payment authorization method free text
transactionId
String
Transaction id
(POINT ECR API TransactionID, field 11)
customAttributes
Array
Key value pair for custom attributes on payment
These key value pair will be shown on receipt as table under payment.
key
String
Free text key name
value
String
Free text value

Cash Payment

1
{
2
"type": "CASH",
3
"amount": 34920,
4
"attributes": {
5
"handedAmount": 40000
6
}
Copied!
Key
Type
Description
Required
type
String
CASH
amount
Integer
Paid amount in fractional unit
attributes
Object
Cash payment attributes
handedAmount
Integer
Amount that is handed in cash in fractional unit

Loyalty Payment

1
{
2
"type": "LOYALTY",
3
"amount": 20720,
4
"attributes": {
5
"cardType": "Plussa",
6
"maskedPAN": "1881"
7
},
8
"customAttributes": [
9
{ "ExtraBonus": "234 points" },
10
]
11
},
Copied!
Key
Type
Description
Required
type
String
LOYALTY
amount
Integer
Paid amount in fractional unit
attributes
Object
Loyalty card details
cardType
String
Free text card type / name
maskedPAN
String
If loyalty card has number it can be placed here

Other Payment

1
{
2
"type": "OTHERPAYMENT",
3
"amount": 20720,
4
"attributes": {
5
"externalType": "Klarna",
6
}
7
},
Copied!
Key
Type
Description
Required
type
String
OTHERPAYMENT
amount
Integer
Paid amount in fractional unit
attributes
Object
Payment details
externaType
String
Free text card type / name

Payment custom attributes

All payment objects can have custom attributes.
1
"customAttributes": [
2
{ "ExtraBonus": "234 points" },
Copied!
Key
Type
Description
Required
customAttributes
Array
Key value pair list
Key
String
Free text key
Value
String
Free text value

General Receipt Data

1
"customAttributes": [
2
{ "key": "value" },
3
{ "key2": "value2" },
4
{ "key3": "value3" }
5
],
6
7
"freeText": "Custom greetings etc",
8
"receiptNumber": "89942344234",
9
"receiptTimeStamp": "2018-11-26T12:35:34.678Z",
10
"currencyISOCode": "EUR",
11
"totalVATAmount": 1884,
12
"totalPriceExcVAT": 18836,
13
"totalPriceIncVAT": 20720,
14
}
Copied!
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
currencyIOSCode
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
Key
String
Free text key
Value
String
Free text value
Last modified 1d ago