OrderTransactionDTO Object

Overview

The REST API makes extensive use of the OrderTransactionDTO object whenever working with a single transaction for an order.  This article will help you to know the various members of this object.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of REST and API’s
  • Understanding of C# and/or JavaScript

Getting Started

There are no tasks needed to get started with understanding this object. 

OrderTransactionDTO

The OrderTransactionDTO object will contain all of the details of a single transaction for your Hotcakes Commerce store.

Members

The following table gives you details on the various members of the OrderTransactionDTO object.  The descriptions are based upon default functionality and the default Viewset included with Hotcakes.

Member Default Description
Action Unknown (0) Defines what kind of transaction this is. Possible values include:
  • Unknown = 0
  • CreditCardInfo = 1
  • CreditCardHold = 100
  • CreditCardCapture = 101
  • CreditCardCharge = 102
  • CreditCardRefund = 103
  • CreditCardVoid = 104
  • CheckReceived = 201
  • CheckReturned = 202
  • CashReceived = 301
  • CashReturned = 302
  • PurchaseOrderInfo = 401
  • PurchaseOrderAccepted = 402
  • CompanyAccountInfo = 450
  • CompanyAccountAccepted = 451
  • GiftCardInfo = 501
  • GiftCardHold = 502
  • GiftCardCapture = 503
  • GiftCardDecrease = 504
  • GiftCardIncrease = 505
  • GiftCardActivate = 506
  • GiftCardBalanceInquiry = 507
  • GiftCardUnHold = 508
  • GiftCardCreateNew = 509
  • RewardPointsInfo = 551
  • RewardPointsHold = 552
  • RewardPointsCapture = 553
  • RewardPointsDecrease = 554
  • RewardPointsIncrease = 555
  • RewardPointsBalanceInquiry = 557
  • RewardPointsUnHold = 558
  • PayPalHold = 601
  • PayPalCapture = 602
  • PayPalCharge = 603
  • PayPalRefund = 604
  • PayPalVoid = 605
  • PayPalExpressCheckoutInfo = 606
  • OfflinePaymentRequest = 9999
Amount 0 The total amount of the transaction.
CheckNumber (empty string) When the transaction is a check payment, the check number should be here.
CompanyAccountNumber (empty string) When the transaction uses company accounts for payment, the company's account number should be here.
CreditCard new OrderTransactionCardDataDTO Information to define the associated credit card, when necessary.
GiftCard new OrderTransaction GiftCardDataDTO Information to define the associated gift card, when necessary.
Id new GUID The unique ID of the transaction.
LinkedToTransaction (empty string) When necessary, the unique ID of another transaction that this one is linked to, such as a credit or gift card payment.
Messages (empty string) Useful information about the transaction, such as errors or warnings.
OrderId (empty string) The unique ID or bvin of the order that this transaction belongs to.
OrderNumber (empty string) The display number of the order that this transaction belongs to.
PurchaseOrderNumber (empty string) When the transaction is a purchase order payment, the PO number should be here.
RefNum1 (empty string) The primary reference number or token returned by the payment processor.
RefNum2 (empty string) The secondary reference number or token returned by the payment processor.
StoreId 0 This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
Success False Defines whether the transaction was successful or not.
TimeStampUtc UtcNow A date/time stamp used for auditing purposes to know when the transaction was created.
Voided False Notes that this transaction is a void for another transaction.

 

Example of OrderTransactionDTO

{
   "Errors":[

   ],
   "Content":{
      "Id":"5f02091b-a4a0-4ac5-b599-8e7757bc6909",
      "StoreId":1,
      "OrderId":"c0ee144f-045e-4928-8258-7ac7c7e84030",
      "OrderNumber":"5",
      "TimeStampUtc":"\/Date(1406752600136)\/",
      "Action":402,
      "Amount":59.87,
      "CreditCard":{
         "CardNumber":"",
         "CardIsEncrypted":false,
         "ExpirationMonth":1,
         "ExpirationYear":2000,
         "CardHolderName":""
      },
      "Success":true,
      "Voided":false,
      "RefNum1":"ACB123XYZ",
      "RefNum2":"",
      "LinkedToTransaction":"DF4BE34C-C56E-4269-9650-B691DB930575",
      "Messages":"Successfull accepted the PO for this transaction",
      "CheckNumber":"",
      "PurchaseOrderNumber":"12345",
      "GiftCardNumber":"",
      "CompanyAccountNumber":""
   }
}
Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.