Child pages
  • Admin function - 'ExtractTransactions'
Skip to end of metadata
Go to start of metadata

The EPAS Admin request message is used for a range of out-of-protocol requests from the ECR to the payment application.  One of them is to extract a summary of recent transactions.  In this context, "transaction" means a financial transaction that was sent online or that was added to the Store & Forward queue for later online submission.  Administrative transactions are not recorded.

Note that the payment application does not store all transactions that are performed.  At time of writing only 30 days worth of transactions are kept in the database.

Request

The normal EPAS Admin request does not allow any additional parameters to be supplied, but it is useful to be able to specify a date range.  This is done by adding two attributes, 'StartDate' and 'EndDate' to the 'ServiceIdentification'  element.  The dates are formatted as yyyyMMddHHmmss.

Request example

<?xml version="1.0" encoding="UTF-8"?>
<SaleToPOIRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EpasSaleToPOIMessages.xsd">
  <MessageHeader MessageClass="Service" MessageCategory="Admin" MessageType="Request" ServiceID="2795" WorkstationID="" POIID="52400004" />
  <AdminRequest>
    <ServiceIdentification StartDate="20160403170641" EndDate="20160413180641">ExtractTransactions</ServiceIdentification>
  </AdminRequest>
</SaleToPOIRequest>

Response

The response to this request includes a non-standard addition, an element named 'AdditionalData'.  This, in turn, contains an element named 'Transactions'.  This contains a series of zero or more transaction summaries with the data included as attributes of each Transaction element.  If no transactions are stored for the requested period, or if the end date is earlier than the start date, then no records will be returned and the 'Transactions' element will be empty.

AttributeMeaning
transdateThe transaction date and time in yyyyMMddHHmmss format.
type

The transaction type, "Purchase", "Refund", "Cash advance" or "Other".  The "Other" should not normally be seen, but is included here for completeness.

If a transaction is a reversal of the previous transaction then the word "reversal" will be included, e.g. "Purchase reversal".

amountThe total transaction value in sub-units of the operating currency.  For example, a transaction for 320.00 SEK will have an amount of 32000.
extraExtra / tip amount in sub-units of the operating currency.  This amount is included in the 'amount' field.
cashbackCashback amount in sub-units of the operating currency.  This amount is included in the 'amount' field.
reference

The retrieval reference number for the transaction.  These are unique and can be used to identify the transaction to the clearing bank.

A reversal transaction has the same reference number as the original transaction that it reversed.

authcodeThe transaction authorisation code.  Codes that begin with the letter L are locally authorised, i.e. they were authorised in the terminal rather than going online to the authorisation host.
hostreponseThe authorisation host response.  This will be zero in the case of locally authorised transactions.
institutionThe card provider institution, taken from the payment application's configuration data.
batchThe transaction's batch number.  Reconciliation / batch closure transactions are not recorded in the database, but a change in the batch number will indicate when a batch is closed.
cardnameThe card name.  This is either taken from configuration data, based on looking up the card number in a table, or is supplied by the card itself in a chip transaction.

If the start and end dates are missing, or cannot be parsed correctly, an error response will be returned.  This will follow the standard EPAS implementation.

Example response

<?xml version="1.0" encoding="utf-8"?>
<SaleToPOIResponse>
  <MessageHeader ProtocolVersion="1.0" MessageClass="Service" MessageCategory="Admin" MessageType="Response" ServiceID="2791" WorkstationID="" POIID="52400004" />
  <AdminResponse>
    <Response Result="Success" />
    <AdditionalData>
      <Transactions>
        <Transaction transdate="20160407115756" type="Purchase" amount="12500" extra="0" cashback="0" reference="000000402012" authcode="832322 B" hostresponse="1" institution="SWE" batch="146" cardname="MAESTRO" />
        <Transaction transdate="20160408174406" type="Purchase" amount="12500" extra="0" cashback="0" reference="000000402013" authcode="244642 B" hostresponse="1" institution="SWE" batch="146" cardname="MAESTRO" />
        <Transaction transdate="20160413171904" type="Purchase" amount="12500" extra="0" cashback="0" reference="000000402014" authcode="931131 B" hostresponse="1" institution="SWE" batch="146" cardname="MAESTRO" />
        <Transaction transdate="20160413171921" type="Refund" amount="12500" extra="0" cashback="0" reference="000000402015" authcode="L00188  " hostresponse="0" institution="SWE" batch="146" cardname="MAESTRO" />
        <Transaction transdate="20160413171951" type="Purchase" amount="40000" extra="0" cashback="0" reference="000000402016" authcode="308825 B" hostresponse="1" institution="SWE" batch="146" cardname="VISA" />
        <Transaction transdate="20160413172001" type="Purchase reversal" amount="40000" extra="0" cashback="0" reference="000000402016" authcode="308825 B" hostresponse="" institution="SWE" batch="146" cardname="VISA" />
        <Transaction transdate="20160413172318" type="Purchase" amount="40000" extra="0" cashback="0" reference="000000402017" authcode="745320 B" hostresponse="1" institution="SWE" batch="146" cardname="VISA" />
        <Transaction transdate="20160413174149" type="Purchase" amount="99900" extra="11100" cashback="11100" reference="000000402018" authcode="117149 B" hostresponse="1" institution="SWE" batch="146" cardname="VISA" />
        <Transaction transdate="20160413174212" type="Purchase" amount="66600" extra="11100" cashback="22200" reference="000000402019" authcode="626301 B" hostresponse="1" institution="SWE" batch="146" cardname="VISA" />
        <Transaction transdate="20160413174846" type="Cash advance" amount="30000" extra="0" cashback="0" reference="000000402020" authcode="687173 B" hostresponse="1" institution="SWE" batch="146" cardname="VISA" />
      </Transactions>
    </AdditionalData>
  </AdminResponse>
</SaleToPOIResponse>
  • No labels