OrderTransactions
Create and query transactions.
Table-Specific Information
Select
The 本製品 uses the Shopify API to process search criteria that refer to the OrderId column. The 本製品 processes other filters client-side within the 本製品.
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 本製品 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 本製品 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 本製品 will issue individual requests to the
Shopify API to retrieve all the transactions for each OrderId to build the result set.
SELECT * FROM OrderTransactions
SELECT * FROM OrderTransactions WHERE Kind='Capture'
You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false. Other search criteria will be ignored and an unfiltered response will be returned.
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')
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 | True |
The authorization code associated with the transaction. | |
| Currency | String | True |
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. 使用できる値は次のとおりです。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 | Boolean | 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 使用できる値は次のとおりです。pending, faliure, success, error | |
| PaymentsRefundsAttributesAcquirerReferenceNumber | String | True |
A unique number associated with the transaction that can be used to track the refund. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
| 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. 使用できる値は次のとおりです。Authorization, Capture, Sale, Void, 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. |
| UpdatedAt | Datetime |
The last time the order is updated. |