TransactionDeleted

Smile emits this message when it deletes a transaction, removing the transaction value from the account balance and the transaction from the account history. However, Smile records the delete action in the logs to maintain an audit trail of the event.

You cannot delete a transaction if the deletion affects the integrity of other Smile data.

Message header

The following table lists the parameters in the TransactionDeleted message header.

Table 1. TransactionDeleted header parameters
Parameter Type Values
version string "2.0"
usn string The unique subscription number for the account that the transaction applies to
company integer The company ID this account belongs to
currency string The ISO 4217 currency code of this account and transaction
amount decimal The value of this transaction
accountType integer The ID of the account type, as defined in Smile
transactionNumber string The transaction number that Smile generates to identify the transaction
transactionType string "CreditNote", "CreditTransferCredit", "CreditTransferDebit", "DebitNote", "Invoice", "InvoiceReversal", "ItemisedCredit", "ItemisedCreditReversal", "ItemisedDebit", "ItemisedDebitReversal", "Receipt", "ReceiptReversal", "RecipientCreatedTaxInvoice", "RecipientCreatedTaxInvoiceReversal", "Surcharge", "SurchargeReversal", "TransferredCredit" or "TransferredDebit"
smileMessageType string "TransactionDeleted"
eventType string "TransactionDeleted"

Message body

The message body contains the <TransactionEvent> element and has the following format:
{http://xml.inomial.com/smile/2.xsd}TransactionEvent

Example: The <TransactionEvent> element

This example shows a TransactionEvent XML document that contains the <TransactionEvent> element.

<TransactionEvent xmlns="http://xml.inomial.com/smile/2.xsd">
  <transactionEventType>TransactionDeleted</transactionEventType>
  <transaction>
    <version>2.0</version>
    <transactionType>Receipt</transactionType>
    <company>1</company>
    <usn>1000000008</usn>
    <transactionNumber>RCPT1000261</transactionNumber>
    <currency>AUD</currency>
    <amount>-108.90</amount>
    <accountType>1</accountType>
    <gstAmount>0.00</gstAmount>
    <entryTimestamp>2012-08-09T12:38:58.383+10:00</entryTimestamp>
    <salesReportCategory>receipt</salesReportCategory>
    <formattedAmount currency="AUD" formatted="$(108.90)">108.90</formattedAmount>
    <formattedGstAmount currency="AUD" formatted="$0.00">0.00</formattedGstAmount>            
  </transaction>
</TransactionEvent>