Storebox Receipt Agent (1.0.0)

Download OpenAPI specification:Download

Introduction

The Storebox Receipt Agent can deliver receipt data to a range of different channels in various formats. Receipts can be delivered in a daily batch or in real-time when Storebox receives the data. Subscribing to Receipt Agent does not require that a subscriber create users or add cards to Storebox to receive data.

When a subscription is setup, its agreed with Storebox, from which merchants the subscription will receive data from. This can be from a single merchant or from multiple merchants and can be updated at any time. If needed, our receipt pipeline, has measures to handle and deliver receipts from a specific merchant without these receipts are processed in other Storebox systems.

By default all data will be delivered in Storebox JSON format. Various filtering and transformation of receipt data may be applied before data delivery, but this processing must be agreed per subscription.

Data Processing

Data can be processed either real-time or batched in regular intervals.

Real-Time

Receipt data is delivered to the subscriber right after data is received by Storebox.

Batch

Receipt data will be batched to a ZIP file and then delivered to the subscriber once every day. The batch can be scheduled to be delivered at anytime during the day.

Formats

The Receipt Agent supports different formats. Each format is descriped here

Storebox JSON

If data is batched, then this model is wrapped in an array.

required
Array of objects
object

Optional external receipt id

merchantId
required
string

Identifier of the merchant – value assigned by Storebox

required
object
orderDate
required
string <date-time>

Date and time of order including timezone information as defined by ISO8601. It is mandatory to include the offset from UTC time respecting daylight saving.

orderNumber
required
string <= 64 characters

Unique number for the receipt

salesEmployeeName
string

Name of the cashier

headerText
Array of strings[ items <= 512 characters ]

Header lines which can have random data. Will be displayed in the top of the receipt.

footerText
Array of strings[ items <= 512 characters ]

Footer lines which can have random data. Will be displayed in the bottom of the receipt.

terminalId
string <= 32 characters

Number identifying the terminal attached to the point of sale

sequenceNumber
string <= 32 characters

The receipt sequence number. This may be unique in itself or as a combination of storeId, terminalId and sequence number

object
object
required
Array of objects
required
object
required
Array of objects

List of payment methods used in the purchase

object
{
  • "userInfo": [
    ],
  • "receiptId": {
    },
  • "merchantId": "storebox",
  • "store": {
    },
  • "orderDate": "2019-08-24T14:15:22Z",
  • "orderNumber": "12345678",
  • "salesEmployeeName": "John Doe",
  • "headerText": [
    ],
  • "footerText": [
    ],
  • "terminalId": "17193CT26617792",
  • "sequenceNumber": "10",
  • "receiptImage": {
    },
  • "barcode": {
    },
  • "orderLines": [
    ],
  • "totalOrderPrice": {
    },
  • "payments": [
    ],
  • "loyalty": {
    }
}

ARTS POSLog

ARTS POSLog version 6.0 is supported.

Example:

<?xml version="1.0" encoding="utf-8"?>
<POSLog xmlns="http://www.nrf-arts.org/IXRetail/namespace/" MajorVersion="6">
    <Transaction>
        <BusinessUnit>
            <UnitID>1</UnitID>
            <Address>
                <AddressLine>Fruebjergvej 3</AddressLine>
                <City>København Ø</City>
                <PostalCode>2100</PostalCode>
                <Country>Denmark</Country>
            </Address>
            <Telephone>
                <LocalNumber>08-50500606</LocalNumber>
            </Telephone>
        </BusinessUnit>
        <WorkstationID>6</WorkstationID>
        <SequenceNumber>1</SequenceNumber>
        <TransactionID>51ujtoezjk15v82d6wv0gomibko17vcy</TransactionID>
        <OperatorID OperatorName="Ivan Sandqvist">1</OperatorID>
        <CurrencyCode>DKK</CurrencyCode>
        <ReceiptDateTime>2016-08-13T12:02:40</ReceiptDateTime>
        <ReceiptImage>
            <Image TypeCode="PDF">AQID</Image>
        </ReceiptImage>
        <RetailTransaction>
            <LineItem>
                <Sale>
                    <POSIdentity>
                        <POSItemID>17228340</POSItemID>
                    </POSIdentity>
                    <Description>FRAKTA</Description>
                    <ActualSalesUnitPrice>5</ActualSalesUnitPrice>
                    <ExtendedAmount>5</ExtendedAmount>
                    <Quantity Units="1" UnitOfMeasureCode="EA">1</Quantity>
                    <Tax TaxType="VAT">
                        <Amount>1</Amount>
                        <Percent>25</Percent>
                    </Tax>
                </Sale>
                <SequenceNumber>1</SequenceNumber>
            </LineItem>
            <LineItem>
                <Tender TenderType="CreditDebit" TypeCode="Sale">
                    <Amount>560</Amount>
                    <CreditDebit CardType="Credit">
                        <IssuerIdentificationNumber>457104</IssuerIdentificationNumber>
                        <PrimaryAccountNumber>************1116</PrimaryAccountNumber>
                        <TransactionDetails>
                            <RetrievalReferenceNumber></RetrievalReferenceNumber>
                            <CardAcceptorTerminalID></CardAcceptorTerminalID>
                            <CardAcceptorIDCode></CardAcceptorIDCode>
                            <AcquiringInstitutionIDCode></AcquiringInstitutionIDCode>
                            <ApprovalCode></ApprovalCode>
                            <PaymentAccountReference></PaymentAccountReference>
                            <TransactionLifeCycleID></TransactionLifeCycleID>
                        </TransactionDetails>
                    </CreditDebit>
                </Tender>
                <SequenceNumber>2</SequenceNumber>
            </LineItem>
            <Total TotalType="TransactionNetAmount">448</Total>
            <Total TotalType="TransactionTaxAmount">112</Total>
            <Total TotalType="TransactionGrandAmount">560</Total>
        </RetailTransaction>
    </Transaction>
    <Transaction>
        <BusinessUnit>
            <UnitID>1</UnitID>
            <Address>
                <AddressLine>Fruebjergvej 3</AddressLine>
                <AddressLine></AddressLine>
                <City>København Ø</City>
                <PostalCode>2100</PostalCode>
                <Country>Denmark</Country>
            </Address>
            <Telephone>
                <LocalNumber>08-50500606</LocalNumber>
            </Telephone>
        </BusinessUnit>
        <Identity>
            <Card>
                <CardID>foo1</CardID>
                <UserID>bar1</UserID>
            </Card>
            <Card>
                <CardID>foo2</CardID>
                <UserID>bar2</UserID>
            </Card>
        </Identity>
        <WorkstationID>5</WorkstationID>
        <SequenceNumber>2</SequenceNumber>
        <TransactionID>foobar123</TransactionID>
        <OperatorID OperatorName="Jakob Hilarius">2</OperatorID>
        <CurrencyCode>DKK</CurrencyCode>
        <ReceiptDateTime>2016-08-13T12:04:12</ReceiptDateTime>
        <ReceiptImage>
            <Image TypeCode="PDF">AQID</Image>
        </ReceiptImage>
        <RetailTransaction>
            <LineItem>
                <Sale>
                    <POSIdentity POSIDType="EAN">
                        <POSItemID>17228340</POSItemID>
                    </POSIdentity>
                    <Description>FRAKTA</Description>
                    <UnitListPrice>5</UnitListPrice>
                    <RegularSalesUnitPrice>5</RegularSalesUnitPrice>
                    <ActualSalesUnitPrice>5</ActualSalesUnitPrice>
                    <ExtendedAmount>5</ExtendedAmount>
                    <Quantity Units="1" UnitOfMeasureCode="EA">1</Quantity>
                    <Tax TaxType="VAT">
                        <Amount>1</Amount>
                        <Percent>25</Percent>
                    </Tax>
                </Sale>
                <SequenceNumber>1</SequenceNumber>
            </LineItem>
            <LineItem>
                <Tender TenderType="CreditDebit">
                    <Amount>560</Amount>
                    <CreditDebit CardType="Credit">
                        <IssuerIdentificationNumber>457104</IssuerIdentificationNumber>
                        <PrimaryAccountNumber>************1116</PrimaryAccountNumber>
                        <TransactionDetails>
                            <RetrievalReferenceNumber></RetrievalReferenceNumber>
                            <CardAcceptorTerminalID></CardAcceptorTerminalID>
                            <CardAcceptorIDCode></CardAcceptorIDCode>
                            <AcquiringInstitutionIDCode></AcquiringInstitutionIDCode>
                            <ApprovalCode></ApprovalCode>
                            <PaymentAccountReference></PaymentAccountReference>
                            <TransactionLifeCycleID></TransactionLifeCycleID>
                        </TransactionDetails>
                    </CreditDebit>
                </Tender>
                <SequenceNumber>2</SequenceNumber>
            </LineItem>
            <Total TotalType="TransactionNetAmount">448</Total>
            <Total TotalType="TransactionTaxAmount">112</Total>
            <Total TotalType="TransactionGrandAmount">560</Total>

        </RetailTransaction>
    </Transaction>
</POSLog>

CSV

A receipt can be converted to a CSV format. It could be one row per receipt or multiple lines for each orderline of the receipt. The specific format to be used is handled per subscription and must be agreed with Storebox upon setup.

Example:

date;receiptId;totalOrderPriceValue;itemNumber;name;count;itemPriceValue
2021-11-17 10:03:27;e45gww7u4cecptbc7zg3cif5hq0ojv1z;300.0;5760725202237;LEGETØJ;1;300.0;

PDF

A receipt can be converted to a PDF. If the receipt data already has an embedded PDF, provided by the merchant, that will used otherwise Storebox will generate the PDF.

Delivery Channels

The receipts data can be delivered through different delivery channels.

SFTP

SFTP should preferably be used when batching data. Batch files can be fetched from a Storebox SFTP server or be delivered to an external SFTP provided by the subscriber.

The Storebox SFTP server only supports public key authentication, but if delivered to an external SFTP then both public key and username/password authentication are supported.

S3 Bucket

Data can be delivered to an AWS S3 Bucket.

Custom API

For integration to a custom API contact Storebox.

Webhook Webhook

Webhook notification about a new receipt.

Request Body schema: application/json
required
Array of objects
object

Optional external receipt id

merchantId
required
string

Identifier of the merchant – value assigned by Storebox

required
object
orderDate
required
string <date-time>

Date and time of order including timezone information as defined by ISO8601. It is mandatory to include the offset from UTC time respecting daylight saving.

orderNumber
required
string <= 64 characters

Unique number for the receipt

salesEmployeeName
string

Name of the cashier

headerText
Array of strings[ items <= 512 characters ]

Header lines which can have random data. Will be displayed in the top of the receipt.

footerText
Array of strings[ items <= 512 characters ]

Footer lines which can have random data. Will be displayed in the bottom of the receipt.

terminalId
string <= 32 characters

Number identifying the terminal attached to the point of sale

sequenceNumber
string <= 32 characters

The receipt sequence number. This may be unique in itself or as a combination of storeId, terminalId and sequence number

object
object
required
Array of objects
required
object
required
Array of objects

List of payment methods used in the purchase

object

Responses

Request samples

Content type
application/json
{
  • "userInfo": [
    ],
  • "receiptId": {
    },
  • "merchantId": "storebox",
  • "store": {
    },
  • "orderDate": "2019-08-24T14:15:22Z",
  • "orderNumber": "12345678",
  • "salesEmployeeName": "John Doe",
  • "headerText": [
    ],
  • "footerText": [
    ],
  • "terminalId": "17193CT26617792",
  • "sequenceNumber": "10",
  • "receiptImage": {
    },
  • "barcode": {
    },
  • "orderLines": [
    ],
  • "totalOrderPrice": {
    },
  • "payments": [
    ],
  • "loyalty": {
    }
}