OrderTransactions
Create and query transactions.
Table-Specific Information
Select
The adapter uses the Shopify API to process search criteria that refer to the OrderId column. The adapter processes other filters client-side within the adapter.The Shopify APIs requires the search criteria to contain OrderId. For example, the following query is processed server-side.
SELECT * FROM OrderTransactions WHERE OrderId = '123'
When performing a query without a filter or a filter other then the OrderId column, the adapter will retrieve the entire list of transactions and perform the filters client-side.
The Shopify API requires that an OrderId be specified when retrieving transactions. Therefore to retrieve all the transactions, the adapter will first retrieve all the OrderIds
from the Orders table (essentially performing the query: SELECT Id FROM Orders). Once the OrderId values have been retrieved, the adapter will issue individual requests to the
Shopify API to retrieve all the transactions for each OrderId to build the result set.
SELECT * FROM OrderTransactions WHERE Kind = 'Capture'
Insert
You must specify the OrderId and Kind when inserting a transaction.
-
Capture a specified amount on a previously authorized order.
INSERT INTO OrderTransactions (OrderId, Amount, Kind) VALUES ('123', 10.25, 'Capture')
-
Capture a previously authorized order for the full amount.
INSERT INTO OrderTransactions (OrderId, Kind) VALUES ('123', 'Capture')
- Create an Authorization transaction :
INSERT INTO OrderTransactions (OrderId, Kind, Authorization) VALUES ('123', 'authorization', '7')
- Create a Capture transaction :
INSERT INTO OrderTransactions (OrderId, Kind) VALUES ('123', 'capture')
- Create a Sale transaction :
INSERT INTO OrderTransactions (OrderId, Kind) VALUES ('123', 'sale')
- Create a Void transaction:
INSERT INTO OrderTransactions (OrderId, Kind, TransactionItemParentId, Currency, Amount) VALUES ('123', 'void', '456', 'USD', '0.1')
- Create a Refund transaction:
INSERT INTO OrderTransactions (OrderId, Kind, TransactionItemParentId, Amount) VALUES ('123', 'refund', '456', '1440.00')
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
A unique numeric identifier for the transaction. | |
OrderId | Long | False |
Orders.Id |
A unique numeric identifier for the order. |
UserId | Long | True |
The unique identifier for the user. | |
LocationId | Long | True |
The ID of the physical location where the transaction was processed. | |
Amount | Decimal | False |
The amount of money that the transaction was for. | |
Authorization | String | False |
The authorization code associated with the transaction. | |
Currency | String | False |
The three letter code (ISO 4217) for the currency used for the payment. | |
DeviceId | String | True |
The unique identifier for the device. | |
Gateway | String | False |
The name of the gateway the transaction was issued through. | |
SourceName | String | True |
The origin of the transaction. | |
Kind | String | False |
The kind of transaction. Can be any of the following: Authorization, Capture, Sale, Void, Refund. | |
Message | String | True |
The message associated with this transaction. | |
ErrorCode | String | True |
A standardized error code, independent of the payment provider. | |
Status | String | False |
The status of the transaction. | |
Test | Bool | True |
The option to use the transaction for testing purposes. | |
AVSResultCode | String | True |
The Response code from the address verification system. | |
CreditCardBin | String | True |
The issuer identification number (IIN). | |
CVVResultCode | String | True |
The Response code from the credit card company. | |
CreditCardNumber | String | True |
The customer's credit card number, with most of the leading digits redacted with Xs. | |
CreditCardCompany | String | True |
The name of the company who issued the customer's credit card. | |
CreatedAt | Datetime | True |
The date and time when the customer was created. | |
PaymentsRefundsAttributesStatus | String | True |
The current status of the refund | |
PaymentsRefundsAttributesAcquirerReferenceNumber | String | True |
A unique number associated with the transaction that can be used to track the refund. | |
PaymentId | String | True |
The unique identifier for the payment. | |
ProcessedAt | Datetime | True |
The date and time when the transaction was processed. | |
CreditCardName | String | True |
The name on the customer's credit card. | |
CreditCardWallet | String | True |
The wallet of the customer's credit card. | |
CreditCardExpMonth | Long | True |
The expiration month of the customer's credit card. | |
CreditCardExpYear | Long | True |
The expiration year of the customer's credit card. | |
Receipt | String | True |
A JSON aggregate of the order receipt. | |
TotalUnsettledSetShopMoneyAmount | Decimal | True |
The amount of the shop money in the total unsettled set. | |
TotalUnsettledSetPresentmentMoneyAmount | Decimal | True |
The amount of the presentment money in the total unsettled set. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements, to offer a more granular control over the tuples that are returned from the data source, or as parameters in INSERT statements.
Name | Type | Description |
TransactionItemAmount | Decimal |
The amount of money that the transaction was for. Use this when inserting transactions into an order or refund. |
TransactionItemGateway | String |
The name of the gateway the transaction was issued through. Use this when inserting transactions into an order or refund. |
TransActionItemKind | String |
The kind of transaction. Can be any of the following: Authorization, Capture, Sale, Void, Refund. Use this when inserting transactions into an order or refund. |
TransactionItemStatus | String |
The status of the transaction. Use this when inserting transactions into an order or refund. |
TransactionItemParentId | String |
The parent id of the transaction. Use this when inserting transactions into a refund. |
TransactionItemSource | String |
The status of the transaction. |
UpdatedAt | Datetime |
The last time the order is updated. |