# Welcome

These are ReceiptHero API Docs 💪


# Authentication

Merchant API is authenticated with RECEIPTHERO\_API\_KEY

```http
HTTP_AUTHORIZATION Token <RECEIPTHERO_API_KEY>
```


# Card linking Receipt API

This API is for Merchants that use ReceiptHero card linking with ReceiptHero supported PSPs.&#x20;

## POST Receipt

## **Request**

This endpoint creates new receipt to ReceiptHero. ReceiptHero uses receiptdata to match receipt to correct ReceiptHero user

```http
POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json


```

[ReceiptHero JSON](/filetypes/receipthero-json) as body

## Response

```http
HTTP 200 OK
Content-Type: application/json
```

## Errors

```http
HTTP 400 Bad Request
Content-Type: application/json

{"error":"errormessage","decription":"error description"}

Also multiple errors possible

[{"error":"errormessage","decription":"error description"},
{"error":"errormessage","decription":"error description"}]
```

##


# Token Receipt API

This API offers capabilities that extend beyond the standard Card Linking Receipt API, accommodating receipt delivery based on a variety of identifiers (tokens). It's essential to highlight that when using the Token Receipt API, receipts will consistently be delivered to users via the card linking solution when relevant. It is also possible to include several different tokens with a single request.

### **Examples**

#### Receipt Identifier

A Receipt Identifier Token facilitates the generation of uniquely identifiable receipts, using formats such as UUIDv4. These receipts can be distributed to end customers via methods like NFC, QR codes, or hyperlinks embedded in partner applications. Receipt identifiers must be unique within the scope of a single namespace.

```http
POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "RECEIPT_ID",
        "value": "269654a1-7189-4c46-a9e7-44a29a78b442",
        "namespace": "partner-namespace",
      }
    ]
  },
  "receipt": <HEROJSON>
}
```

#### Card

Card Token is for Partners that are able to deliver card related token with receipt data.

```http
POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "CARD",
        "value": "bmxpbmUgSldMjksImV4cCI6MTY0NzcwNTIyOSwiYXVkIjoid3d3",
        "id": "parter-token-xyz",
      }
    ]
  },
  "receipt": <HEROJSON>
}
```

#### Email

```http
POST /api/v1/receipts/ HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "EMAIL",
        "value": "john.smith@receipthero.io"
      }
    ]
  },
  "receipt": <HEROJSON>
}
```

#### User (OAuth2)

```http
POST /api/v1/receipts HTTP/1.1
Host: api.dev.receipthero.io
Authorization: Token <RECEIPTHERO_API_KEY>
Content-Type: application/json

{
  "attributes": {
    "tokens": [
      {
        "type": "USER",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJpYXQiOjE2MzI4MTMzNjJ9.RNW59YOlWD_CZy3dLomd2SMC6-cGfkW-IuYVgodwb5I"
      }
    ]
  },
  "receipt": <HEROJSON>
}
```

### Token object

<table><thead><tr><th width="150">Key</th><th width="150">Type</th><th width="163.7142857142857">Description</th><th>Required</th></tr></thead><tbody><tr><td>type</td><td>String</td><td>Token type: DYNAMIC_QR_CODE|CARD|EMAIL|USER</td><td>✅</td></tr><tr><td>value</td><td>String</td><td>Token value</td><td>✅</td></tr><tr><td>id</td><td>String</td><td>Token identifier (Defined by the Partner)</td><td>Required when Token type = CARD</td></tr><tr><td>namespace</td><td>String</td><td>Partner namespace (defined by ReceiptHero)</td><td>Required when token type = DYNAMIC_QR_CODE</td></tr></tbody></table>

[ReceiptHero JSON](/filetypes/receipthero-json) as \<HeroJSON>

### Response OK

```http
HTTP 200 OK
Content-Type: application/json
```


# Dynamic QR Code

For implementing Digital Receipts with Dynamic QR Codes, refer to [Receipt Link](/receipt-link)


# Receipt Link

**ReceiptHero enables seamless digital receipt delivery** through **Receipt Links**, supporting various delivery methods such as **NFC**, **QR codes**, and **hyperlinks embedded in partner applications**.

**Here’s how it works:** When a receipt is sent to the [Token Receipt API](/merchant-api-group/token-receipt-api) according to the [Token Receipt API](/merchant-api-group/token-receipt-api#receipt-identifier) specification, it automatically becomes accessible via a **Receipt Link**, which points to an interactive web view of the receipt. The link URL is uniquely generated using two key identifiers: a **receipt identifier** assigned by the point-of-sale (POS) system, and a **partner namespace** provided by ReceiptHero. This URL can then be communicated to the customer through the chosen delivery method.

When a customer opens a receipt e.g. by tapping their phone on an NFC transmitter at checkout, they are directed to a web view of their receipt, enabling direct interaction without the need for registration. Customers have the option to view the receipt in a web browser, download it as a PDF, or import it into their user accounts for future reference.

{% hint style="info" %}
The **Receipt URL** should be generated using the following pattern:\
`https://dev.rece.to/ns/<namespace>/r/<receipt_id>`
{% endhint %}

<figure><img src="/files/gtjrgbeB2BVNtOrOuVEk" alt=""><figcaption><p>Receipt delivery via Receipt Link</p></figcaption></figure>


# Authentication

## Access Levels

ReceiptHero API has two access levels:

1. Partner Application general access
2. User specific resource access

## Partner App general access

To acces any endpoint partner app must include ReceiptHero API key in every request in custom HTTP header:

```
RECEIPTHERO_APIKEY <partner applications api key>
```

## User specific resource access

To access any resource that is owned by ReceiptHero user partner application must add OAuth access token to Http Authorization header:

```
HTTP_AUTHORIZATION Bearer <oauth bearer token>
```

! This access token is user specific so every user has different access token


# OAuth2 Flow

Overview of the flow OAuth2 Flow ReceiptHero

![](/files/-ManaSmdfYXAzlAQqxcf)

## Get an authorization code

Initiate the flow by redirecting the user to the ReceiptHero consent page.

**Redirect**

```
https://dev.receipthero.io/auth?response_type=code&client_id={CLIENT_ID_HERE}&redirect_uri=https%3A%2F%2Freceipthero.io%2Fcallback&scope=receipt%3Awrite&state=cmVjZWlwdGhlcm9yb2Nrcw==
```

If the user approves the request then the authorization server will redirect the user to the redirect URI defined in the request.

**Scopes**

<table><thead><tr><th width="197.75639713408395">Scope</th><th>Description</th></tr></thead><tbody><tr><td>receipt:write</td><td>Sending receipts to the ReceiptHero system</td></tr><tr><td>receipt:read</td><td>Reading receipts from the ReceiptHero system</td></tr></tbody></table>

**State**

| Parameter         | Type   | Description                                                                                                                                                               |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| message           | string | Custom message                                                                                                                                                            |
| partner\_metadata | object | Optional Partner defined key-value pairs for carrying relevant metadata (will be included in [webhook notification messages](/partner-app-api/notifications) if provided) |

To use the state parameters, the state is to be defined in JSON and encoded into Base64.

**Callback**

```
https://client-server.com/callback?code=1745ee387c3545b2b77bf37baaf3b3f5&state=cmVjZWlwdGhlcm9yb2Nrcw==
```

The client must make sure that the state matches the provided state value provided to the authorization endpoint. This protects against CSRF type of attacks. The code expires one minute after it has been created.

## Exchange the authorization code for an access token

The client sends the previously received authorization code to the token endpoint which then returns an access token.

**Request**

```
POST https://api.dev.receipthero.io/api/oauth/token

Content-Type: application/json

{
    "grant_type": "authorization_code",
    "code": "{CODE_HERE}",
    "client_id": "{CLIENT_ID_HERE}",
    "client_secret": "{CLIENT_SECRET_HERE}",
    "redirect_uri": "{REDIRECT_URI_HERE}"
}
```

The request can be made in either *application/json* or *application/x-www-form-urlencoded*.

**Response**

```
{
    "token_type": "Bearer",
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZWNlaXB0X2hlcm9faWQiOiI5Mjg5OTZmZC0yYTU3LTQ1NzctYjZlNy01ODNhZGM4ZGJlOGMiLCJpYXQiOjE2MjM3NDEwMDh9.gD17UFHxJoEmz_RrIHBQksjqgotyncoO8fDYurYPI2k"
}
```

The returned access token is a JSON Web Token.

In Token you get ID for this connection.&#x20;

**Claims**

| Claim           | Description       |
| --------------- | ----------------- |
| receipthero\_id | Unique identifier |

## Revoke Access Token

```
DELETE https://api.dev.receipthero.io/api/oauth/revoke
Host: api.dev.receipthero.io
Authorization: Bearer <USERS_OAUTH_TOKEN>
```

**Response OK**

```
HTTP 200 OK
Content-Type: application/json
```

**Response Not Found**

```
HTTP 404 Not Found
Content-Type: application/json
```

## **Update existing OAuth2 connection**

It is possible to update an existing OAuth2 connection by using this dedicated view.

```
https://dev.receipthero.io/membership?receipthero_id={receipthero_id}&redirect_uri={redirect_uri}
```

**Query Parameters**

<table><thead><tr><th width="208.13118706178528">Scope</th><th>Description</th></tr></thead><tbody><tr><td>receipthero_id</td><td>Unique connection identifier (contained in the JWT token)</td></tr><tr><td>redirect_uri</td><td>The URI where the user is redirected after taking actions on the connection update view</td></tr></tbody></table>

**Redirect**

The user is redirected back with the following query string parameters:

| Parameter       | Description                                                                          |
| --------------- | ------------------------------------------------------------------------------------ |
| status          | Describes the user action. Possible values are 'cancelled', 'modified' and 'removed' |
| receipthero\_id | Unique connection identifier                                                         |


# GET Receipt

Get full receipt by receipt id. Data formats are:

* Finvoice XML
* Finvoice PDF
* ReceiptHero JSON
* ReceiptHero PDF

### Request <a href="#request" id="request"></a>

#### Partner Receipt Retrieval

Retrieve a receipt after receiving a receipt notification through [Integration Flows](/partners/integration-flows#card-based-flow) or [Integration Flows](/partners/integration-flows#transaction-based-flow).

```http
GET /api/v1/receipts/<receipt_uuid>/<data_format>/
Host: api.dev.receipthero.io
Authorization: <PARTNER_API_KEY>
```

#### User-Authorized Receipt Retrieval

Retrieve a receipt on behalf of a user who has granted receipt read access via the OAuth2 authorization flow.

```http
GET /api/v1/receipts/<receipt_uuid>/<data_format>/
Host: api.dev.receipthero.io
RECEIPTHERO_APIKEY: <PARTNER_APP_API_KEY>
Authorization: Bearer <USERS_OAUTH_TOKEN>
```

| Parameter     | Value         | Explanationn                                        |
| ------------- | ------------- | --------------------------------------------------- |
| receipt\_uuid | uuid          | receipt UUID provided in receipts list endpoint     |
| data\_format  | finvoice\_xml | Receipt is returned in finvoice xml format          |
|               | finvoice\_pdf | Receipt is returned in rendered finvoice pdf format |
|               | hero\_json    | Receipt is returned in ReceiptHero JSON             |
|               | hero\_pdf     | Receipt is returned in rendered JSON pdf format     |

### Response <a href="#response" id="response"></a>

Response depends on requested data format


# Notifications

ReceiptHero delivers webhook notifications on receipt and payment transaction arrival, as well as connection revoke events.

## Types

Partner application can receive 3 types of notifications:

#### Transaction notification

This notification is delivered immediately when ReceiptHero receives information about the upcoming receipt. Name of the Merchant is included in the notification payload.

#### Receipt notification

This notification is delivered immediately when the receipt is ready for fetching. The notification includes a receipt id for the receipt to fetch.

![](/files/ooP2s4jev3bbC9cGEs2c)

#### Connection revoke notification

This notification is delivered when a connection revoke is initiated from the ReceiptHero system.

![](/files/HQiSHYl80F0tgUH0lFic)

### Webhook Request <a href="#webhook-payload" id="webhook-payload"></a>

```
POST <WEBHOOK_PATH> HTTP/1.1
Host: <WEBHOOK_HOST>
Authorization: Token <API_KEY>
Content-Type: application/json
```

### Webhook Payload <a href="#webhook-payload" id="webhook-payload"></a>

#### Examples

{% code title="Receipt notification" %}

```json
{
  "notification_type":"receipt_notification",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "receipt_id":"93d22d66-f4bd-11e8-8eb2-f2801f1b9fd1",
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

{% code title="Transaction notification" %}

```json
{
  "notification_type":"transaction_notification",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "receipt_id":"93d22d66-f4bd-11e8-8eb2-f2801f1b9fd1",
  "data": {
    "merchant_name": "ReceiptHero Oy"
  },
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

{% code title="Connection revoke" %}

```json
{
  "notification_type":"oauth_authorization_revoke",
  "receipthero_id":"7350515d-0f15-4663-8430-cf4d7f4057a1",
  "partner_metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}
```

{% endcode %}

#### Fields

| Parameter          | Value                                                                              | Explanation                                                                                                                                                              |
| ------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| notification\_type | receipt\_notification \| transaction\_notification \| oauth\_authorization\_revoke | Notification type                                                                                                                                                        |
| receipthero\_id    | uuid                                                                               | User uuid                                                                                                                                                                |
| receipt\_id        | uuid                                                                               | Receipt uuid                                                                                                                                                             |
| data               | object                                                                             | Additional data (Transaction notifications only)                                                                                                                         |
| partner\_metadata  | object                                                                             | Partner defined connection-specific key-value pairs. See also: [Get an authorization code](/partner-app-api/oauth-access#get-an-authorization-code) step in OAuth 2 flow |


# Integration Flows

## Transaction-Based Flow

<figure><img src="/files/HIZHVzfwPQuYN8EkzSbD" alt=""><figcaption></figcaption></figure>

## Card-Based Flow

<figure><img src="/files/uA9qxOvJHB1QLAjwkXp3" alt=""><figcaption></figcaption></figure>


# Bank Piloting

eReceipt platforms are newcomers and we want to make it as easy as possible for our partners to get hands on real data we offer this "quick and clean" piloting workflow for our banking partners.

## Pilot phase

The aim of this quick piloting is to be able to offer Banks a way to start experimenting with real production receipt data in the internal pilot.

### Why?

Enrolling cards by hand cuts off the "**long-taking-CHD-related-dev-burden**" and receipt data as notification enables the bank to start experimenting with data as soon as possible and might give more insights on the benefits of eReceipts

### Steps

1. Bank creates one endpoint to receive receipt data from us.&#x20;
2. Deliver URL to RH
3. The Banks pilot group (preferably employees) adds some cards to our platform by hand.

   -> <https://receipthero.io/register>
4. Bank delivers details on added cards to RH

   -> <saku@receipthero.io>
5. RH links those cards to the bank's pilot program
6. RH delivers ID for those cards to the bank to match receipts to cards&#x20;
7. The PIlot group makes purchases on **live** RH supported retailers
8. Receipts flow **realtime** to banks backend
   1. Includes receipt data as JSON
   2. URL for rendered receipt
9. Bank experiments with **live, production state, receipt data**&#x20;

### Full Receipt Notification

Webhook request includes following data&#x20;

```
{                
 "receipthero_id": "bef47630-98bf-41c6-84d1-298d6c85ec94",
 "notification_type": "full_receipt_notification",
 "receipt_id": "0439eb4d-9ad9-441b-aaaf-3a93d0153244",
 "receipt_json": "<HeroJSON>",
 "receipt_web_url":"url_to_receipt"
}
```


# Notifications

By implementing a webhook endpoints according to this specification, Card Issuers can receive notifications on Receipt and Card related events.

### Receipt

When a Receipt has been processed for a Card, a request is sent to the webhook implemented by a ReceiptHero partner. Receipt Identifier (*receipt\_id*) can then be used to fetch the Receipt in various data formats, as specified [here](/partner-app-api/get-receipt).

<pre class="language-http"><code class="lang-http"><strong>POST: &#x3C;PARTNER_URL_HERE>
</strong>Authorization: &#x3C;PARTNER_API_KEY_HERE>
Host: &#x3C;PARTNER_HOST_HERE>

{
  "notification_type":"receipt_notification",
  "partner_card_id":"58907e9a-af14-4127-bc72-7a2f867b6252",
  "receipthero_card_id":"2f253eeb-1fd8-4725-af8f-f5cd2223fac3",
  "data": {
    "receipt_id": "bdb8fe66-eced-416c-ace8-c81524f68ed4",
    "merchant_name": "Coffee Shop Developer Fuel Inc",
    "timestamp":"2021-08-09T10:00:48Z",
    "amount":"1230",
    "merchant_id":"1245357457",
    "reference_number":"y4MvVQva2XW1B8Qr",
    "authorization_code":"A145G6",
    "transaction_type":"auth"
  }
}
</code></pre>

<table><thead><tr><th>Field</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>notification_type</td><td>Notification type</td><td>true</td></tr><tr><td>partner_card_id</td><td>External card indentifier provided by the partner</td><td>true</td></tr><tr><td>receipthero_card_id</td><td>ReceiptHero card identifier</td><td>true</td></tr><tr><td>receipt_id</td><td>ReceiptHero Receipt identifier</td><td>true</td></tr><tr><td>merchant_name</td><td>Name of the merchant</td><td>true</td></tr><tr><td>timestamp</td><td>Timestamp of the Card payment associated with the Receipt</td><td>true</td></tr><tr><td>amount</td><td>Amount of the Card payment associated with the Receipt</td><td>true</td></tr><tr><td>merchant_id</td><td>Merchant identifier</td><td>true</td></tr><tr><td>reference_number</td><td>Reference number of the Card payment associated with the Receipt</td><td>false</td></tr><tr><td>authorization_code</td><td>Authorization code of the Card payment associated with the Receipt</td><td>false</td></tr><tr><td>transaction_type</td><td>Type of Transaction (auth|clearing)</td><td>true</td></tr></tbody></table>

### Card Added

This event is published once a new Card has been successfully processed by ReceiptHero.

```http
POST: <PARTNER_URL_HERE>
Authorization: <PARTNER_API_KEY_HERE>
Host: <PARTNER_HOST_HERE>

{
  "notification_type": "card_added",
  "partner_card_id": "58907e9a-af14-4127-bc72-7a2f867b6252",
  "receipthero_card_id": "2f253eeb-1fd8-4725-af8f-f5cd2223fac3",
  "data": {
    "name": "John Doe",
    "masked_pan": "411111******1111",
    "exp_date": "2024-01-31T00:00:00.000Z"
  }
}
```

<table><thead><tr><th>Field</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>notification_type</td><td>Notification type (card_added)</td><td>true</td></tr><tr><td>partner_card_id</td><td>External card indentifier provided by the partner</td><td>true</td></tr><tr><td>receipthero_card_id</td><td>ReceiptHero card identifier</td><td>true</td></tr><tr><td>name</td><td>Card holder name</td><td>false</td></tr><tr><td>masked_pan</td><td>Masked card number</td><td>true</td></tr><tr><td>exp_date</td><td>Card expiration date</td><td>true</td></tr></tbody></table>


# ReceiptHero JSON

{% hint style="info" %}
Please check [HeroJSON Specification](/filetypes/receipthero-json/herojson-specification) for implementation details!
{% endhint %}

```javascript
{
  "type": "PURCHASE",
  "merchant": {
    "name": "Global Receipt Delicatesse",
    "companyID": "123456-7",
    "branch": {
      "id": "45910",
      "name": "Receipt Restaurant",
      "subName": "FastFood",
      "posId": "003287",
      "email": "restaurant@example.com",
      "phone": "040-5086462",
      "websiteURL": "https://www.getreceipthero.com/",
      "address": {
        "streetAddress": "Finlaysoninkatu 7",
        "city": "Tampere",
        "zipCode": "733210",
        "country": "Finland"
      }
    }
  },
  "products": [
    {
      "name": "Ground Control",
      "EANCode": "42222130165",
      "quantity": "4",
      "productId": "1234",
      "quantityCode": "PCS",
      "unitPriceIncVAT": 5180,
      "unitPriceIncVATDecimal": "51,80",
      "totalAmountExcVAT": 18836,
      "totalAmountIncVAT": 20720,
      "vats": [
        {
          "VATRate": "24",
          "VATAmount": 1884,
          "totalAmountExcVAT": 18836,
          "totalAmountIncVAT": 20720
        }
      ],
      "discounts": [
        {
          "amount": 2027,
          "percentage": "10.00",
          "description": "Loyalty discount"
        }
      ],
      "freeText": "Product instructions etc",
      "customAttributes": [
        {
          "Warranty": "2 years"
        },
        {
          "Valid until": "2024-01-14"
        }
      ]
    }
  ],
  "freeText": "Custom greetings etc",
  "vats": [
    {
      "VATRate": "24",
      "totalVATAmount": 1884,
      "totalAmountExcVAT": 18836,
      "totalAmountIncVAT": 20720,
      "VATCode": "A"
    }
  ],
  "payments": [
    {
      "type": "CARD",
      "amount": 13243,
      "attributes": {
        "transactionType": "PURCHASE",
        "currencyISOCode": "EUR",
        "MID": "12346543",
        "timeStamp": "2022-09-01T12:35:34.678+02:00",
        "terminalId": "BS-4545F9",
        "referenceNumber": "220901015555",
        "authorizationCode": "HIU456",
        "transactionId": "05555",
        "receiptNumber": "12923",
        "maskedPAN": "525400******9876",
        "APP": "MASTERCARD DEBIT",
        "cardNetwork": "MASTERCARD",
        "cardType": "DEBIT",
        "cardProgram": "Nordic Tech Bank — MC Debit",
        "transactionRawText": "CARD TRANSACTION\n\nCard: Debit Mastercard\n **** **** **** 9876 LN\nApplication: A0000000041010\nTr.Nr/Auth: 05555/HIU456\nPayee/business: 0029432413000/0001\n\nReference: 220901015555\n\nCredit/Charge 207,20 EUR\nPayPass Contactless \n\n",
        "preAuthorizedAmount": 30000,
        "ENTRY": "Contactless ICC (07)",
        "ARC": "APPROVED (00)",
        "TVR": "8000008000",
        "TSI": "E800",
        "AID": "A0000000031010",
        "AC": "9F270180",
        "CID": "0x80",
        "cryptogramType": "ARQC",
        "CVM": "Online PIN"
      },
      "customAttributes": [
        {
          "key": "value"
        },
        {
          "key2": "value2"
        }
      ]
    },
    {
      "type": "LOYALTY",
      "amount": 18243,
      "attributes": {
        "cardType": "Plussa",
        "maskedPAN": "1881"
      },
      "customAttributes": [
        {
          "ExtraBonus": "234 points"
        },
        {
          "key2": "value2"
        },
        {
          "key3": "value3"
        }
      ]
    },
    {
      "type": "CASH",
      "amount": 5000,
      "attributes": {
        "handedAmount": 5000
      }
    }
  ],
  "customAttributes": [
    {
      "key": "value"
    },
    {
      "key2": "value2"
    }
  ],
  "receiptNumber": "89942344234",
  "receiptTimeStamp": "2022-09-01T06:02:20.715Z",
  "currencyISOCode": "EUR",
  "totalVATAmount": 1884,
  "totalPriceExcVAT": 16359,
  "totalPriceIncVAT": 18243,
  "attachments": [
    {
      "type": "QRCODE",
      "kind": "RETURN",
      "title": "Scan me at cash register",
      "description": "Show this code at cash register if you wish to return items from this purchase.",
      "data": "89942344234"
    }
  ]
}
```


# HeroJSON Specification

### Merchant object

```javascript
"merchant": {
    "name": "Global Receipt Delicatesse",
    "companyID": "123456-7",
    "branch": {
      "id": "340",
      "posId": "2",
      "name": "Receipt Restaurant",
      "subName":"FastFood",
      "email": "restaurant@example.com",
      "phone": "040-5086462",
      "websiteURL": "https://www.getreceipthero.com/",
      "address": {
        "streetAddress": "Itsenäisyydenkatu 17 a 15",
        "city": "Tampere",
        "zipCode": "33500",
        "country": "Finland"
      }
    }
```

| Key           | Type   | Description                         | Required |
| ------------- | ------ | ----------------------------------- | :------: |
| **name**      | String | Company name                        |     ✅    |
| **companyID** | String | Company's business id or VAT number |     ✅    |

#### Branch object

| Key                            | Type   | Description                                                                                                                | Required |
| ------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------- | :------: |
| **id**                         | String | Unique identifier for a branch (e.g., cost center number or another identifier used to distinguish branches of a Merchant) |     ✅    |
| **posId**                      | String | Logical cash register id                                                                                                   |     ✅    |
| **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                                                                                   |          |
| websiteURL                     | String | Website URL of branch / company                                                                                            |          |
| **address**                    | Object | Address values                                                                                                             |     ✅    |
| :wavy\_dash: **streetAddress** | String | Branch location street address                                                                                             |     ✅    |
| :wavy\_dash: **city**          | String | Branch location city                                                                                                       |     ✅    |
| :wavy\_dash: **zipCode**       | String | Branch location zip code                                                                                                   |     ✅    |
| :wavy\_dash: **country**       | String | Branch location country                                                                                                    |     ✅    |

### Products array

Products array contains all product on receipt

```javascript
 "products": [
    {
      "name": "Ground Control",
      "EANCode": "42222130165",
      "quantity": "4",
      "productId": "1234",
      "quantityCode": "PCS",
      "freeText": "Product instructions etc",
      "categorization": { "main": "12", "product": "122", "sub": "1224" },
      "unitPriceIncVAT": 5180,
      "unitPriceIncVATDecimal": "51,80",
      "totalAmountExcVAT": 18836,
      "totalAmountIncVAT": 20720,
      "vats": [
        {
          "VATRate": "24",
          "VATAmount": 1884,
          "totalAmountExcVAT": 18836,
          "totalAmountIncVAT": 20720
        }
      ],
      "discounts": [
        {
          "amount": 0,
          "percentage": "0.00",
          "description": ""
        }
      ],
      "customAttributes": [
        { "Warranty": "2 years" },
        { "Valid until": "2020-11-26" }
      ]
    }
  ],
```

| Key                                | Type    | Description                                                                                                                                  | Required |
| ---------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
| **name**                           | String  | Product name                                                                                                                                 |     ✅    |
| EANCode                            | String  | Product 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 | <p>Unit price including VAT in </p><p>fractional unit (Cents in Euros etc.)</p>                                                              |     ✅    |
| unitPriceIncVATDecimal             | String  | <p>Unit price including VAT in <br>main currency unit. Mainly used by petrol receipts</p>                                                    |          |
| **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   | <p>Product level VAT specifications</p><p>One object represents one VAT rate.</p><p>If product has multiple taxrates -> multiple objects</p> |     ✅    |
| :wavy\_dash: **VATRate**           | String  | VAT rate.  Integer or Decimal                                                                                                                |     ✅    |
| :wavy\_dash: **VATAmount**         | Integer | VAT amount in fractional unit                                                                                                                |     ✅    |
| :wavy\_dash: **totalAmountExcVAT** | Integer | Amount without VAT in fractional unit                                                                                                        |     ✅    |
| :wavy\_dash: **totalAmountIncVAT** | Integer | Amount with VAT in fractional unit                                                                                                           |     ✅    |
| discounts                          | Array   | Product level discount objects.                                                                                                              |          |
| :wavy\_dash: **amount**            | Integer | Amount of discount in fractional unit                                                                                                        |     ✅    |
| :wavy\_dash: percentage            | String  | Discount percentage in decimal                                                                                                               |          |
| :wavy\_dash: **description**       | String  | Discount reason in free text                                                                                                                 |     ✅    |
| customAttributes                   | Array   | <p>Key value pair for custom attributes on product</p><p>These key value pair will be shown on receipt as table under product.</p><p></p>    |          |
| :wavy\_dash: **key**               | String  | Free key name                                                                                                                                |     ✅    |
| :wavy\_dash: **value**             | String  | Free value                                                                                                                                   |     ✅    |

#### Product Categorization

```json
"categorization": 
  { 
    "main": "12",
    "product": "122",
    "sub": "1224",
    "tags": ["stampcard-identifier"]
  }
```

| Key         | Type         | Description                                                                                          | Required |
| ----------- | ------------ | ---------------------------------------------------------------------------------------------------- | :------: |
| main        | String       | Main category identifier                                                                             |          |
| **product** | String       | Product category identifier                                                                          |     ✅    |
| sub         | Integer      | Sub category identifier                                                                              |          |
| tags        | String Array | A list of custom tags, used for purposes such as marking a product's inclusion in a stamp card offer |          |

#### Product Journey

When dealing with travel-related products such as bus, train, taxi, or other transportation services, it is possible to include structured journey details alongside the product line item. The journey object allows specifying relevant metadata such as the type of transport, schedule, distance, emissions, and location data for both origin and destination.

```json
"journey": {
  "type": "TRAIN",
  "id": "IC924",
  "distance": 185000,
  "duration": 120,
  "CO2Emissions": 222,
  "origin": {
    "name": "Pasila",
    "city": "Helsinki",
    "country": "Finland",
    "latitude": "60.1988",
    "longitude": "24.9333",
    "datetime": "2025-04-02T10:00:00+02:00"
  },
  "destination": {
    "name": "Turku (City Centre, Logomo)",
    "city": "Helsinki",
    "country": "Finland",
    "latitude": "60.45694",
    "longitude": "22.25750",
    "datetime": "2025-04-02T12:00:00+02:00"
  }
}
```

#### Journey Object

<table><thead><tr><th width="199.84765625">Key</th><th>Type</th><th width="238.471435546875">Description</th><th align="center">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td><p>Type of Journey</p><pre data-title="Allowed values"><code>  TRAIN
  BUS
  TAXI
  FLIGHT
  FERRY
</code></pre></td><td align="center">✅</td></tr><tr><td>id</td><td>String</td><td>Journey identifier, such as train connection or flight number</td><td align="center"></td></tr><tr><td>distance</td><td>Number</td><td>Journey distance in meters</td><td align="center"></td></tr><tr><td>duration</td><td>Number</td><td>Journey duration in minutes</td><td align="center"></td></tr><tr><td>CO2Emissions</td><td>Integer</td><td>CO2 Emissions in grams</td><td align="center"></td></tr><tr><td><strong>origin</strong></td><td><a data-mention href="#journey-location-object">#journey-location-object</a></td><td>Journey origin</td><td align="center">✅</td></tr><tr><td><strong>destination</strong></td><td><a data-mention href="#journey-location-object">#journey-location-object</a></td><td>Journey destination</td><td align="center">✅</td></tr><tr><td>vehicle</td><td><a data-mention href="#journey-vehicle-object">#journey-vehicle-object</a></td><td>Journey vehicle, applicable for <code>type=TAXI</code></td><td align="center"></td></tr><tr><td>driver</td><td><a data-mention href="#journey-driver-object">#journey-driver-object</a></td><td>Driver details, applicable for <code>type=TAXI</code></td><td align="center"></td></tr><tr><td>pickupArrivedAt</td><td>String</td><td>Departure or Arrival time as ISO 8601 datetime with offset</td><td align="center"></td></tr></tbody></table>

#### Journey Location Object

<table><thead><tr><th width="199.84765625">Key</th><th>Type</th><th>Description</th><th align="center">Required</th></tr></thead><tbody><tr><td><strong>name</strong></td><td>String</td><td>Journey location name</td><td align="center">✅</td></tr><tr><td>city</td><td>String</td><td>Journey location city</td><td align="center"></td></tr><tr><td>country</td><td>String</td><td>Journey location country</td><td align="center"></td></tr><tr><td>latitude</td><td>String</td><td>Journey location latitude</td><td align="center"></td></tr><tr><td>longitude</td><td>String</td><td>Journey location longitude</td><td align="center"></td></tr><tr><td>datetime</td><td>String</td><td>Departure or Arrival time as ISO 8601 datetime with offset</td><td align="center"></td></tr></tbody></table>

#### Journey Vehicle Object

Optional vehicle details for the journey. Currently applicable only to `TAXI` journeys.

<table><thead><tr><th width="199.84765625">Key</th><th>Type</th><th>Description</th><th align="center">Required</th></tr></thead><tbody><tr><td><strong>id</strong></td><td>String</td><td>Vehicle identifier</td><td align="center">✅</td></tr><tr><td><strong>licensePlate</strong></td><td>String</td><td>Vehicle license plate number</td><td align="center">✅</td></tr><tr><td>make</td><td>String</td><td>Vehicle make</td><td align="center"></td></tr><tr><td>model</td><td>String</td><td>Vehicle model</td><td align="center"></td></tr><tr><td>category</td><td>String</td><td><p>Vehicle category</p><pre data-title="Allowed values"><code>  SEDAN
  HATCHBACK
  WAGON
  VAN
  MINIBUS
  SUV
  LUXURY
</code></pre></td><td align="center"></td></tr><tr><td>powertrain</td><td>String</td><td><p>Vehicle power train</p><pre data-title="Allowed values"><code>  PETROL
  DIESEL
  HYBRID
  PLUG_IN_HYBRID
  ELECTRIC
  HYDROGEN
</code></pre></td><td align="center"></td></tr><tr><td>phoneNumber</td><td>String</td><td>Vehicle phone number</td><td align="center"></td></tr></tbody></table>

#### Journey Driver Object

Optional vehicle details for the journey. Currently applicable only to `TAXI` journeys.

<table><thead><tr><th width="199.84765625">Key</th><th>Type</th><th>Description</th><th align="center">Required</th></tr></thead><tbody><tr><td><strong>id</strong></td><td>String</td><td>Driver identifier</td><td align="center">✅</td></tr></tbody></table>

### Receipt VAT specification

```javascript

 "vats": [
    {
      "VATRate": "24",
      "totalVATAmount": 1884,
      "totalAmountExcVAT": 18836,
      "totalAmountIncVAT": 20720,
      "VATCode": "A"
    }
  ],
```

| Key                                | Type    | Description                                         | Required |
| ---------------------------------- | ------- | --------------------------------------------------- | :------: |
| **vats**                           | Array   | Receipt total VATs as array of objects per VAT rate |     ✅    |
| :wavy\_dash: **VATRate**           | String  | VAT rate.  Integer or Decimal                       |     ✅    |
| :wavy\_dash: **totalVATAmount**    | Integer | VAT amount in fractional unit                       |     ✅    |
| :wavy\_dash: **totalAmountExcVAT** | Integer | Amount without VAT in fractional unit               |     ✅    |
| :wavy\_dash: t**otalAmountIncVAT** | Integer | Amount with VAT in fractional unit                  |     ✅    |
| VATCode                            | String  | VAT identifier                                      |          |

### Payments&#x20;

HeroJSON supports a variety of payment types including card, cash, gift card, and online payments — see the full list of [Payment Types](/filetypes/receipthero-json/herojson-specification/payment-types) for details. Payments are mapped as an array of Payment Objects as shown in the example below.

#### Payments Example

```json
  "payments": [
    {
      "type": "CARD",
      "amount": 20720,
      "attributes": {
        "transactionType": "PURCHASE",
        "currencyISOCode": "EUR",
        "MID": "12346543",
        "timeStamp": "2022-09-01T12:35:34.678+02:00",
        "terminalId": "BS-4545F9",
        "referenceNumber": "220901015555",
        "authorizationCode": "HIU456",
        "transactionId": "05555",
        "receiptNumber": "12923",
        "maskedPAN": "525400******9876",
        "APP": "MASTERCARD DEBIT",
        "cardType": "DEBIT",
        "cardProgram": "Nordic Tech Bank — MC Debit",
        "transactionRawText": "CARD TRANSACTION\n\nCard: Debit Mastercard\n **** **** **** 9876 LN\nApplication: A0000000041010\nTr.Nr/Auth: 05555/HIU456\nPayee/business: 0029432413000/0001\n\nReference: 220901015555\n\nCredit/Charge 207,20 EUR\nPayPass Contactless \n\n",
        "preAuthorizedAmount": 30000,
        "ENTRY": "Contactless ICC (07)",
        "ARC": "APPROVED (00)",
        "TVR": "8000008000",
        "TSI": "E800",
        "AID": "A0000000031010",
        "AC": "9F270180",
        "CID": "0x80",
        "cryptogramType": "ARQC",
        "CVM": "Online PIN"
      }
    },
    {
      "type": "CASH",
      "amount": 34920,
      "attributes": {
        "handedAmount": 40000
      }
    }
  ]
```

### General Receipt Data

```javascript
 "type": "PURCHASE",
 "customAttributes": [
    { "key": "value" },
    { "key2": "value2" },
    { "key3": "value3" }
  ],
  "freeText": "Custom greetings etc",
  "receiptNumber": "89942344234",
  "receiptTimeStamp": "2018-11-26T12:35:34.678+02:00",
  "currencyISOCode": "EUR",
  "totalVATAmount": 1884,
  "totalPriceExcVAT": 18836,
  "totalPriceIncVAT": 20720,
}
```

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th align="center">Required</th></tr></thead><tbody><tr><td>type</td><td>String</td><td><p></p><p>Type of Receipt</p><pre data-title="Allowed values"><code>PURCHASE
RETURN
PURCHASE_AND_RETURN
</code></pre></td><td align="center"></td></tr><tr><td>freeText</td><td>String</td><td>Freetext field to be displayed on receipt</td><td align="center"></td></tr><tr><td><strong>receiptNumber</strong></td><td>String</td><td>Merchant's internal receiptnumber</td><td align="center">✅</td></tr><tr><td><strong>receiptTimeStamp</strong></td><td>String</td><td>ISO 8601 datetime with offset</td><td align="center">✅</td></tr><tr><td><strong>currencyISOCode</strong></td><td>String</td><td>Currency code</td><td align="center">✅</td></tr><tr><td><strong>totalVATAmount</strong></td><td>Integer</td><td>Total VAT amount in fractional unit</td><td align="center">✅</td></tr><tr><td><strong>totalPriceExcVAT</strong></td><td>Integer</td><td>Total price excluding VAT</td><td align="center">✅</td></tr><tr><td><strong>totalPriceIncVAT</strong></td><td>Integer</td><td>Total price including VAT</td><td align="center">✅</td></tr><tr><td>customAttributes</td><td>Array</td><td>Key value pair list, to be show on receipt</td><td align="center"></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>Key</strong></td><td>String</td><td>Free text key</td><td align="center">✅</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>Value</strong></td><td>String</td><td>Free text value</td><td align="center">✅</td></tr></tbody></table>

### Verifications array

```json
"verifications": [
  {
    "type": "OCMF",
    "version": "1.0",
    "publicKey": "MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEqHEykfqZhspgok6zCQh/329B38xine8ujzT8p5Nh7lek47cYeZj507aN6E4/QirF1b7Q57ln4VGfK6h0d0GOQA==",
    "transactionId": "848182519",
    "currentType": "AC",
    "transactionBegin": {
      "signedData": "OCMF|{\"FV\" : \"1.0\",\"GI\" : \"Nano CH-10311C\",\"GS\" : \"060643\",\"GV\" : \"v017\",\"PG\" : \"T198\",\"MV\" : \"DZG\",\"MM\" : \"DVH4013\",\"MS\" : \"1DZG0033016824\",\"IS\" : true,\"IL\" : \"VERIFIED\",\"IF\" : [\"RFID_NONE\",\"OCPP_NONE\",\"ISO15118_NONE\",\"PLMN_NONE\"],\"IT\" : \"EMAID\",\"ID\" : \"04ab076a345b85\",\"CT\" : \"CBIDC\",\"CI\" : \"CI\",\"RD\" : [{\"TM\" : \"2021-10-26T10:20:52,000+0200 I\",\"TX\" : \"B\",\"RV\" : \"       9.038\",\"RI\" : \"01-00:01.08.00.FF\",\"RU\" : \"kWh\",\"RT\" : \"AC\",\"EF\" : \"\",\"ST\" : \"G\"}]}|{\"SA\" : \"ECDSA-secp256k1-SHA256\",\"SD\" : \"3046022100A4C188533ECA1793336520F7F99E010E62DEC32ABD344A562B00D396F65DFFE9022100CB0FB3782E406525641D689F4326D2118365A722EE75AAAB976C14B090BE49DA\"}"
    },
    "transactionEnd": {
      "signedData": "OCMF|{\"FV\" : \"1.0\",\"GI\" : \"Nano CH-10311C\",\"GS\" : \"060643\",\"GV\" : \"v017\",\"PG\" : \"T199\",\"MV\" : \"DZG\",\"MM\" : \"DVH4013\",\"MS\" : \"1DZG0033016824\",\"IS\" : true,\"IL\" : \"VERIFIED\",\"IF\" : [\"RFID_NONE\",\"OCPP_NONE\",\"ISO15118_NONE\",\"PLMN_NONE\"],\"IT\" : \"EMAID\",\"ID\" : \"04ab076a345b85\",\"CT\" : \"CBIDC\",\"CI\" : \"CI\",\"RD\" : [{\"TM\" : \"2021-10-26T10:21:22,000+0200 I\",\"TX\" : \"E\",\"RV\" : \"       9.038\",\"RI\" : \"01-00:01.08.00.FF\",\"RU\" : \"kWh\",\"RT\" : \"AC\",\"EF\" : \"\",\"ST\" : \"G\"},{\"TM\" : \"2021-10-26T10:21:22,000+0200 I\",\"TX\" : \"E\",\"RV\" : \"      30\",\"RI\" : \"01-00:00.08.06.FF\",\"RU\" : \"sec\",\"RT\" : \"AC\",\"EF\" : \"\",\"ST\" : \"G\"}]}|{\"SA\" : \"ECDSA-secp256k1-SHA256\",\"SD\" : \"3045022016FD6DF51EE338CC56F6035670172653C93A77F263B7B24DD5DC84EF7C4A98AB022100ADE8D7D9EC4EFFE2B3C0781C108B9DF2688776F81AE94D9230C92ED570C9693C\"}"
    }
  }
]
```

#### Verification Object

<table><thead><tr><th width="203">Key</th><th width="250">Type</th><th width="187.867919921875">Description</th><th>Required</th></tr></thead><tbody><tr><td>type</td><td>String</td><td>Type of verification</td><td>✅</td></tr><tr><td>version</td><td>String</td><td>Standard version</td><td>✅</td></tr><tr><td>publicKey</td><td>String</td><td>Public key for verifying data</td><td>✅</td></tr><tr><td>transactionId</td><td>String</td><td>Transaction identifier</td><td>✅</td></tr><tr><td>currentType</td><td>String</td><td><p>Current type</p><pre data-title="Allowed values"><code>  AC
  DC
</code></pre></td><td>✅</td></tr><tr><td>transactionBegin</td><td>Transaction Event Object</td><td>Transaction Begin event data</td><td>✅ <strong>*</strong></td></tr><tr><td>transactionEnd</td><td>Transaction Event Object</td><td>Transaction End event data</td><td>✅</td></tr></tbody></table>

{% hint style="info" %}
&#x20;**\*** `transactionBegin` is mandatory when `type=AC`
{% endhint %}

#### Transaction Event Object

<table><thead><tr><th width="235">Key</th><th>Type</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>signedData</td><td>String</td><td>Signed transaction event data for verification</td><td>✅</td></tr></tbody></table>

### Attachments

Attachments such as entrance tickets and gift cards can be included.&#x20;

{% hint style="warning" %}
This is a premium feature. To enable this option, please reach out to the ReceiptHero sales team.
{% endhint %}

```json
"attachments": [
    {
        "type": "QRCODE",
        "kind": "TICKET",
        "title": "Here is your ticket!",
        "description": "Present this code at the entrance to maintain your access.",
        "data": "89942344234",
        "validUntil": "2024-09-10T00:00:00.000+02:00"
    }
]
```

<table><thead><tr><th width="203">Key</th><th width="250">Type</th><th width="196.396728515625">Description</th><th>Required</th></tr></thead><tbody><tr><td>type</td><td>String</td><td><p>Type of attachment</p><pre data-title="Allowed values"><code>BARCODE
QRCODE
</code></pre></td><td>✅</td></tr><tr><td>kind</td><td>String</td><td><p>Kind represents the purpose of the attachment</p><pre data-title="Allowed values"><code>TICKET
RETURN
VOUCHER
</code></pre></td><td>✅</td></tr><tr><td>title</td><td>String</td><td>Title shown on top of the attachment</td><td>✅</td></tr><tr><td>data</td><td>String</td><td>Data encoded to the attachment according to the provided type</td><td>✅</td></tr><tr><td>description</td><td>String</td><td>Description providing more details on how this attachment is used</td><td></td></tr><tr><td>validUntil</td><td>String</td><td>ISO 8601 string with offset, representing the last moment the attachment is valid for use</td><td></td></tr></tbody></table>

<br>


# Payment Types

This page lists supported HeroJSON payment types with their structure and key attributes for integration.

## Card Payment

Represents a payment made using a physical payment card via a payment terminal.

{% hint style="info" %}
For the ReceiptHero Card Linking feature, it’s important to accurately map values for all required fields.
{% endhint %}

### Card Payment Example

```json
{
  "type": "CARD",
  "amount": 20720,
    "attributes": {
      "transactionType": "PURCHASE",
      "MID": "12346543",
      "timeStamp": "2022-09-01T12:35:34.678+02:00",
      "terminalId": "BS-4545F9",
      "referenceNumber": "220901015555",
      "authorizationCode": "HIU456",
      "transactionId": "05555",
      "receiptNumber": "12923",
      "maskedPAN": "525400******9876",
      "APP": "MASTERCARD DEBIT",
      "cardNetwork": "MASTERCARD",
      "cardType": "DEBIT",
      "cardProgram": "Nordic Tech Bank — MC Debit",
      "transactionRawText": "CARD TRANSACTION\n\nCard: Debit Mastercard\n **** **** **** 9876 LN\nApplication: A0000000041010\nTr.Nr/Auth: 05555/HIU456\nPayee/business: 0029432413000/0001\n\nReference: 220901015555\n\nCredit/Charge 207,20 EUR\nPayPass Contactless \n\n",
      "ENTRY": "Contactless ICC (07)",
      "ARC": "APPROVED (00)",
      "TVR": "8000008000",
      "TSI": "E800",
      "AID": "A0000000031010",
      "AC": "9F270180",
      "CID": "0x80",
      "cryptogramType": "ARQC",
      "CVM": "Online PIN"
    }
}
```

### Card Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th width="317.7257080078125">Description</th><th data-type="checkbox">Required</th><th>ISO 8583 Field</th><th>EMV Tag</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>Payment type (CARD)</td><td>true</td><td></td><td></td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td><td></td><td></td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Card Payment attributes</td><td>true</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span><strong>transactionType</strong></td><td>String</td><td><p>Type of Transaction</p><pre data-title="Allowed values"><code>PURCHASE
REFUND
REVERSAL
RETURN (deprecated)
</code></pre></td><td>true</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> MID</td><td>String</td><td>Merchant Identification Number (sometimes referred to as Card Acceptor ID)</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>timeStamp</strong></td><td>String</td><td>Payment ISO 8601 datetime with offset</td><td>true</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span><strong>terminalId</strong></td><td>String</td><td>Card Acceptor Terminal Identifier</td><td>true</td><td>DE 41</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>referenceNumber</strong></td><td>String</td><td>Retrieval Reference Number, RRN</td><td>true</td><td>DE 37</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>authorizationCode</strong></td><td>String</td><td>Authorization Code (6 characters, alphanumeric)</td><td>true</td><td>DE 38</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> transactionId</td><td>String</td><td>Transaction ID</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> receiptNumber</td><td>String</td><td>Card Holder Receipt Number</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>maskedPAN</strong></td><td>String</td><td>Payment Card Masked PAN. At least 4 last digits.</td><td>true</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> APP</td><td>String</td><td>Application Label (e.g. VISA CREDIT)</td><td>false</td><td></td><td>50</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> cardNetwork</td><td>String</td><td><p></p><p>Card Network</p><pre data-title="Allowed values"><code>AMERICAN_EXPRESS
BANCONTACT
CARTES_BANCAIRES
DANKORT
DINERS_CLUB
DISCOVER
EFTPOS
ELO
GIROCARD
HIPERCARD
HIPER
INTERAC
JCB
MAESTRO
MASTERCARD
MIR
RUPAY
UNIONPAY
VISA
VERVE
</code></pre></td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> cardType</td><td>String</td><td>Card type (e.g. DEBIT, CREDIT or PREPAID)</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> cardProgram</td><td>String</td><td>Card Program free text (e.g. Chase Sapphire Preferred)</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> transactionRawText</td><td>String</td><td>Card holder receipt copy as raw text (including newlines as <code>\n)</code></td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> preAuthorizedAmount</td><td>Number</td><td>Amount of the related pre-authorization</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> ENTRY</td><td>String</td><td>Point Of Service (POS) Entry Mode</td><td>false</td><td>DE 22</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> ARC</td><td>String</td><td>Authorization Response Code</td><td>false</td><td>DE 39</td><td>8A</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> TVR</td><td>String</td><td>Terminal Verification Results</td><td>false</td><td></td><td>95</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> TSI</td><td>String</td><td>Transaction Status Information</td><td>false</td><td></td><td>9B</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> AID</td><td>String</td><td>Application Identifier</td><td>false</td><td></td><td>9F06</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> AC</td><td>String</td><td>Application Cryptogram</td><td>false</td><td></td><td>9F26</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> CID</td><td>String</td><td>Cryptogram Information Data</td><td>false</td><td></td><td>9F27</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> cryptogramType</td><td>String</td><td><p></p><pre data-title="Allowed values" data-full-width="true"><code>  AAC
  TC
  ARQC
</code></pre></td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> CVM</td><td>String</td><td><p>Cardholder Verification Method Results</p><pre data-title="Examples" data-full-width="true"><code>  ONLINE PIN  
  SIGNATURE VERIFIED  
  NO CVM REQUIRED
</code></pre></td><td>false</td><td></td><td>9F34</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <del>authorizationMethodType</del></td><td>String</td><td>Deprecated (<code>CVM</code>  should be used instead)</td><td>false</td><td></td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> currency</td><td><a data-mention href="#currency-object">#currency-object</a></td><td>Foreign currency information</td><td>false</td><td></td><td></td></tr></tbody></table>

## Cash Payment

Represents a payment made in cash, including the amount handed over by the customer for calculating change.

### Cash Payment Example

```json
{
  "type": "CASH",
  "amount": 39998,
  "attributes": {
    "handedAmount": 40000,
    "roundingAmount": 2
  }
}
```

### Cash Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox"></th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>CASH</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Cash payment attributes</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>handedAmount</strong></td><td>Integer</td><td>Amount that is handed in cash in fractional unit</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>roundingAmount</strong></td><td>Integer</td><td>Amount rounded</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> currency</td><td><a data-mention href="#currency-object">#currency-object</a></td><td>Foreign currency information</td><td>false</td></tr></tbody></table>

## Online Payment

Represents a payment processed through an online payment service provider (PSP), such as Paytrail, Stripe, or Klarna.

### Online Payment Example

```json
{
  "amount": 4590,
  "type": "ONLINE_PAYMENT",
  "attributes": {
    "provider": "PAYTRAIL",
    "paymentMethod": "APPLE_PAY",
    "transactionType": "PURCHASE",
    "timeStamp": "2025-04-03T15:30:00+02:00",
    "cardType": "VISA DEBIT",
    "maskedPAN": "411111******1111",
    "authorizationCode": "A1B2C3",
    "referenceNumber": "250403123456",
    "filingCode": "1A2B3C4D5E6F7G8H9I0J1K2L3M4N5O6P",
    "orderReference": "4940046476",
    "transactionId": "7d781f54-ebbb-450e-852b-7ff133caa6c6",
  }
}
```

### Online Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>ONLINE_PAYMENT</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Online Payment details</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>provider</strong></td><td>String</td><td>Online Payment provider (see <a data-mention href="#online-payment-providers">#online-payment-providers</a>)</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>paymentMethod</strong></td><td>String</td><td>Underlying Payment method (see<a data-mention href="#online-payment-methods">#online-payment-methods</a>)</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>transactionType</strong></td><td>String</td><td><p>Type of Transaction</p><pre data-title="Allowed values"><code>  PURCHASE
  RETURN
</code></pre></td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> timeStamp</td><td>String</td><td>Transaction timestamp as ISO 8601 datetime with offset</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> cardType</td><td>String</td><td>Card type description if available. (e.g. Debit Mastercard)</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> maskedPAN</td><td>String</td><td>Payment Card Masked PAN. At least 4 last digits.</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> authorizationCode</td><td>String</td><td>Payment Authorization code (6 characters, alphanumeric)</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> referenceNumber</td><td>String</td><td>Payment Retrieval Reference Number</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> filingCode</td><td>String</td><td>Bank Transfer filing code (relevant mostly for bank transfers in Finland)</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> orderReference</td><td>String</td><td>Reference number of online order / purchase</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> transactionId</td><td>String</td><td>Transaction identifier</td><td>false</td></tr></tbody></table>

#### Online Payment Providers

{% hint style="info" %}
Supported `provider` values are listed below. This list is subject to change, and new providers can be introduced upon request.
{% endhint %}

<pre data-line-numbers><code><strong>  ADYEN
</strong>  AUTHORIZE_NET
<strong>  KLARNA
</strong>  NETS
<strong>  PAYPAL
</strong>  PAYTRAIL
<strong>  STRIPE
</strong>  TRUSTLY
<strong>  VISMA_PAY
</strong>  VIVA
</code></pre>

#### Online Payment Methods

{% hint style="info" %}
Supported `paymentMethod` values are listed below. This list is subject to change, and new methods can be introduced upon request.
{% endhint %}

<pre data-line-numbers><code><strong>  CARD
</strong>  BANK_TRANSFER
<strong>  APPLE_PAY
</strong>  GOOGLE_PAY
<strong>  MOBILEPAY
</strong>  PAYPAL
<strong>  SIIRTO
</strong>  SWISH
<strong>  INVOICE
</strong></code></pre>

## Gift Card Payment

Represents a payment made using a prepaid or store-issued gift card, optionally including issuer, balance, and reference details.

### Gift Card Payment Example

```json
{
  "amount": 2500,
  "type": "GIFT_CARD",
  "attributes": {
    "id": "GC-987654321",
    "issuer": "StoreBrand",
    "name": "Holiday Gift Card",
    "referenceNumber": "REF1234567890",
    "expirationDate": "2025-12-31T23:59:59+02:00",
    "balanceBefore": 5000,
    "balanceAfter": 2500
  }
}
```

### Gift Card Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>GIFT_CARD</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Gift Card details</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>id</strong></td><td>String</td><td>Gift Card ID</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> issuer</td><td>String</td><td>Gift Card issuer name</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> name</td><td>String</td><td>Gift Card title or name</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> referenceNumber</td><td>String</td><td>Purchase or Order reference number</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> expirationDate</td><td>String</td><td>Gift Card expiration date as ISO 8601 datetime with offset</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> balanceBefore</td><td>Number</td><td>Gift Card balance before purchase in fractional unit</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> balanceAfter</td><td>Number</td><td>Gift Card balance after purchase in fractional unit</td><td>false</td></tr></tbody></table>

## Voucher Payment

Represents a payment made using a voucher or coupon, identified by a reference number or id.

### Voucher Payment Example

```json
{
  "type": "VOUCHER",
  "amount": 20720,
  "attributes": {
    "referenceNumber": "1234567890"
  }
}
```

### Voucher Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>VOUCHER</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td>attributes</td><td>Object</td><td>Payment details</td><td>false</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> referenceNumber</td><td>String</td><td>Voucher reference number or id</td><td>false</td></tr></tbody></table>

## Loyalty Payment

Represents a payment or partial payment made using a loyalty or bonus program, such as a store-issued loyalty card.

### Loyalty Payment Example

```json
{
  "type": "LOYALTY",
  "amount": 20720,
  "attributes": {
    "cardType": "Plussa",
    "maskedPAN": "1881"
  },
  "customAttributes": [{ "Earned Bonus": "234 points" }]
}
```

### Loyalty Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>LOYALTY</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Loyalty card details</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>cardType</strong></td><td>String</td><td>Free text card type / name</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> <strong>maskedPAN</strong></td><td>String</td><td>Masked Loyalty Card number</td><td>true</td></tr></tbody></table>

## Other Payment

Represents a non-standard payment method not covered by predefined types, including an external type identifier for classification.

### Other Payment Example

```json
{
  "type": "OTHERPAYMENT",
  "amount": 20720,
  "attributes": {
    "externalType": "Mobile Carrier Billing"
  }
}
```

### Other Payment Fields

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>type</strong></td><td>String</td><td>OTHERPAYMENT</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Paid amount in fractional unit</td><td>true</td></tr><tr><td><strong>attributes</strong></td><td>Object</td><td>Payment details</td><td>true</td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="3030">〰️</span> externalType</td><td>String</td><td>Payment type free text</td><td>false</td></tr></tbody></table>

## Payment Custom Attributes

All payment objects support custom attributes to allow including data that is not covered by the core specification.

```json
"customAttributes": [
   { "Earned Bonus": "234 points" }
]
```

| Key                    | Type   | Description         | Required |
| ---------------------- | ------ | ------------------- | :------: |
| customAttributes       | Array  | Key value pair list |          |
| :wavy\_dash: **Key**   | String | Free text key       |          |
| :wavy\_dash: **Value** | String | Free text value     |          |

## Foreign Currency Mapping

Foreign currency mapping is used when a customer pays with cash or a card in a currency different from the merchant’s local currency, requiring the payment amount to be converted using an exchange rate.

Foreign currency details are mapped as a `currency` object within the payment attributes; see the *Currency Object* section for full documentation.

```json
{
  "type": "CARD|CASH",
  "amount": 1100,
  "attributes": {
    ...
    "currency": {
      "currencyISOCode": "DKK",
      "amount": 8216,
      "exchangeRate": "0.13389"
    }
  }
}
```

### Currency Object

<table><thead><tr><th>Key</th><th>Type</th><th>Description</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td><strong>currencyISOCode</strong></td><td>String</td><td>ISO 4217 Currency Code</td><td>true</td></tr><tr><td><strong>amount</strong></td><td>Integer</td><td>Foreign currency amount in fractional unit</td><td>true</td></tr><tr><td><strong>exchangeRate</strong></td><td>String</td><td>Rate used to convert the foreign currency amount into the merchant’s local currency.</td><td>true</td></tr></tbody></table>


# Finvoice XML eReceipt

```markup
<?xml version="1.0" encoding="ISO-8859-15"?>
<?xml-stylesheet href="Finvoice.xsl" type="text/xsl"?>
<Finvoice Version="2.01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Finvoice2.01.xsd">
  <MessageTransmissionDetails>
    <MessageSenderDetails>
      <FromIdentifier>FI12345678</FromIdentifier>
      <FromIntermediator>NONE</FromIntermediator>
    </MessageSenderDetails>
    <MessageReceiverDetails>
      <ToIdentifier>ReceiptHero</ToIdentifier>
      <ToIntermediator>NONE</ToIntermediator>
    </MessageReceiverDetails>
     <MessageDetails>
      <MessageIdentifier>ElectronicReceipt</MessageIdentifier>
      <MessageTimeStamp>151222101817</MessageTimeStamp>
    <ImplementationCode>ECR1</ImplementationCode>
    </MessageDetails>
     </MessageTransmissionDetails>
  <SellerPartyDetails>
    <SellerPartyIdentifier>1234567-8</SellerPartyIdentifier>
    <SellerOrganisationName>Kauppa Oy</SellerOrganisationName>
    <SellerOrganisationTaxCode>FI12345678</SellerOrganisationTaxCode>
    <SellerPostalAddressDetails>
      <SellerStreetName>Hämeenkatu 1</SellerStreetName>
      <SellerTownName>TAMPERE</SellerTownName>
      <SellerPostCodeIdentifier>33100</SellerPostCodeIdentifier>
    </SellerPostalAddressDetails>
  </SellerPartyDetails>
  <SellerOrganisationUnitNumber>123456789</SellerOrganisationUnitNumber>
  <BuyerPartyDetails>
    <BuyerOrganisationName>Tunnistamaton asiakas</BuyerOrganisationName>
    <BuyerOrganisationName>524342xxxxxx1401</BuyerOrganisationName>
  </BuyerPartyDetails>
   <AnyPartyDetails>
    <AnyPartyText AnyPartyCode="Site">Ketju1</AnyPartyText>
    <AnyPartyOrganisationName>Liike 1</AnyPartyOrganisationName>
    <AnyPartyCommunicationDetails>
      <AnyPartyPhoneNumberIdentifier>03-1234 123</AnyPartyPhoneNumberIdentifier>
    </AnyPartyCommunicationDetails>
    <AnyPartyPostalAddressDetails>
      <AnyPartyStreetName>Hämeenkatu 12</AnyPartyStreetName>
      <AnyPartyTownName>Tampere</AnyPartyTownName>
      <AnyPartyPostCodeIdentifier>33100</AnyPartyPostCodeIdentifier>
    </AnyPartyPostalAddressDetails>
  </AnyPartyDetails>
  <InvoiceDetails>
    <InvoiceTypeCode>INF09</InvoiceTypeCode>
    <InvoiceTypeText>Sähköinen kuitti</InvoiceTypeText>
    <OriginCode>Original</OriginCode>
    <InvoiceNumber>12</InvoiceNumber>
    <InvoiceDate Format="CCYYMMDD">20161120</InvoiceDate>
    <SellerReferenceIdentifier>12345678</SellerReferenceIdentifier>
    <InvoiceTotalVatExcludedAmount AmountCurrencyIdentifier="EUR">153,08</InvoiceTotalVatExcludedAmount>
    <InvoiceTotalVatAmount AmountCurrencyIdentifier="EUR">36,73</InvoiceTotalVatAmount>
    <InvoiceTotalVatIncludedAmount AmountCurrencyIdentifier="EUR">189,81</InvoiceTotalVatIncludedAmount>
    <VatSpecificationDetails>
      <VatBaseAmount AmountCurrencyIdentifier="EUR">153,08</VatBaseAmount>
      <VatRatePercent>24,00</VatRatePercent>
      <VatCode>S</VatCode>
      <VatRateAmount AmountCurrencyIdentifier="EUR">36,73</VatRateAmount>
    </VatSpecificationDetails>
  </InvoiceDetails>
  <PaymentStatusDetails>
    <PaymentStatusCode>PAID</PaymentStatusCode>
  </PaymentStatusDetails>
  <InvoiceRow>
    <ArticleIdentifier>H8624</ArticleIdentifier>
    <ArticleName>Hanwag WaterProofing </ArticleName>
    <InvoicedQuantity QuantityUnitCode="M2">1.0000</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">10,71</UnitPriceAmount>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">2,07</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">8,64</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">10,71</RowAmount>
  </InvoiceRow>
  <InvoiceRow>
    <ArticleIdentifier>2001168</ArticleIdentifier>
    <ArticleName>Men's 6Inch Premium WP Boots</ArticleName>
    <EanCode>346373734733</EanCode>
    <InvoicedQuantity QuantityUnitCode="KPL">1.0000</InvoicedQuantity>
    <UnitPriceAmount AmountCurrencyIdentifier="EUR">179,10</UnitPriceAmount>
    <RowVatRatePercent>24,00</RowVatRatePercent>
    <RowVatCode>S</RowVatCode>
    <RowVatAmount AmountCurrencyIdentifier="EUR">34,66</RowVatAmount>
    <RowVatExcludedAmount AmountCurrencyIdentifier="EUR">144,44</RowVatExcludedAmount>
    <RowAmount AmountCurrencyIdentifier="EUR">179,10</RowAmount>
  </InvoiceRow>

  <InvoiceRow>
    <SubInvoiceRow>
        <SubIdentifier>PAYMENT</SubIdentifier>
        <SubArticleIdentifier>Kortti</SubArticleIdentifier>
        <SubArticleName>MAKSUTAPA</SubArticleName>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00000">CardMaskedNumber</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>524342xxxxxx1401</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00001">ReferenceNumber</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>151222010038</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00002">TimeStamp</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>151222100715</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00003">RequestedAmount</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>189,81</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00004">AuthorizationCode</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue></SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00005">MerchantNumber</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue></SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00006">AuthorizingTermID</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue></SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00007">VerifiedByPINFlag</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue></SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00008">TenderAuthorizationMethodType</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>ChipPin</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowDefinitionDetails>
          <SubRowDefinitionHeaderText DefinitionCode="CARD00009">CreditCardCompanyCode</SubRowDefinitionHeaderText>
          <SubRowDefinitionValue>L5</SubRowDefinitionValue>
        </SubRowDefinitionDetails>
        <SubRowAmount AmountCurrencyIdentifier="EUR">189,81</SubRowAmount>
    </SubInvoiceRow>
  </InvoiceRow>
  <SpecificationDetails>
    <SpecificationFreeText>KORTTITAPAHTUMA</SpecificationFreeText>
    <SpecificationFreeText></SpecificationFreeText>
    <SpecificationFreeText>Kortti:                        MC Debit</SpecificationFreeText>
    <SpecificationFreeText>**** **** **** 1401 CP</SpecificationFreeText>
    <SpecificationFreeText>Sovellus:              A000000004101001</SpecificationFreeText>
    <SpecificationFreeText>Tap.nro/Varmennus:         00038/179143</SpecificationFreeText>
    <SpecificationFreeText>Yritys/Ala:           111111111111/5399</SpecificationFreeText>
    <SpecificationFreeText></SpecificationFreeText>
    <SpecificationFreeText>Autentisointi:         03072B69B36642F7</SpecificationFreeText>
    <SpecificationFreeText>Viite:                     151222010038</SpecificationFreeText>
    <SpecificationFreeText></SpecificationFreeText>
    <SpecificationFreeText>Debit/Veloitus               189,81 EUR</SpecificationFreeText>
    <SpecificationFreeText></SpecificationFreeText>
  </SpecificationDetails>
  <EpiDetails>
    <EpiIdentificationDetails>
      <EpiDate Format="CCYYMMDD">20161120</EpiDate>
      <EpiReference></EpiReference>
    </EpiIdentificationDetails>
    <EpiPartyDetails>
      <EpiBfiPartyDetails>
        <EpiBfiIdentifier IdentificationSchemeName="BIC">BANKFIHH</EpiBfiIdentifier>
        <EpiBfiName>NORDEA</EpiBfiName>
      </EpiBfiPartyDetails>
      <EpiBeneficiaryPartyDetails>
        <EpiAccountID IdentificationSchemeName="IBAN">FI04904840131313</EpiAccountID>
      </EpiBeneficiaryPartyDetails>
    </EpiPartyDetails>
    <EpiPaymentInstructionDetails>
      <EpiInstructedAmount AmountCurrencyIdentifier="EUR">189,81</EpiInstructedAmount>
      <EpiCharge ChargeOption="SLEV">SLEV</EpiCharge>
      <EpiDateOptionDate Format="CCYYMMDD">20161120</EpiDateOptionDate>
    </EpiPaymentInstructionDetails>
  </EpiDetails>
</Finvoice>
```


# Slack channel

If you are developing ReceiptHero integration and want to get in touch, we can set up shared Slack channel between our organizations.

Send contact details to **<saku@receipthero.io>** to get this going


