Skip to content

Transaction

A transaction consists of two or more operations that need to be executed together. If one of them fails, the complete transaction is being rejected. Therefore it is not possible to include operations in a transaction that require more than <RC> in the response.

Operationcode: TR

TR

Direction

IF Partner → SIHOT

Message

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-Document>
  <TN>4835</TN>
  <OC>TR</OC>
  <HN>4711</HN>
  <TRANSACTION>
   <OPERATION>
    <OPNID>1</OPNID>
    <OC>PS</OC>
    <RN>904</RN>
    <PT>0</PT>
    <TXT>Use of the sauna</TXT>
    <BD>2005-08-31T13:20:00</BD>
    <PPU>10.00</PPU>
   </OPERATION>
   <OPERATION>
    <OPNID>2</OPNID>
    <OC>PE</OC>
    <RN>904</RN>
    <SID>MA</SID>
    <TXT>Massage</TXT>
    <BD>2005-08-31T13:20:00</BD>
   </OPERATION>
   <OPERATION>
    <OPNID>3</OPNID>
    <OC>PP</OC>
    <RN>904</RN>
    <TXT>Payment</TXT>
    <BD>2005-08-31T13:20:01</BD>
    <SID>BA</SID>
    <PPU>30.00</PPU>
    <UN>1</UN>
    </OPERATION>
  </TRANSACTION>
</SIHOT-Document>

Attributes Message

Attribute Denotation Type
OC Action Type:
TR = Transaction
String
TRANSACTION Tag that clasps all operations
OPERATION Tag that clasps a single operation
OPNID Operation identifier (within the <OPERATION> tags) This tag is optional and used only for the response. String

Response

Everything was charged correctly:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-Document>
  <TN>4835</TN>
  <OC>ACK</OC>
  <RC>0</RC>
</SIHOT-Document>

Or: There was a problem with the operation with the OPNID 2:

<?xml version="1.0" encoding="ISO-8859-1"?>
<SIHOT-Document>
  <TN>4835</TN>
  <OC>ACK</OC>
  <OPNID>2</OPNID>
  <RC>1</RC>
  <MSG>Room not occupied</MSG>
</SIHOT-Document>

Attributes Response

See for more information

We send an RC different from 0 as soon as the first operation fails. So it might be that the operation with the OPNID 3 would also have failed but this was not checked any more.

Important: If the RC is different from 0, none of the operations was executed.