Transaction
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2019-10/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2019-10/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2019-10/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2019-10/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |
The authorization code associated with the transaction. |
created_at
read-only |
The date and time (ISO 8601 format) when the transaction was created. |
currency |
The three-letter code (ISO 4217 format) for the currency used for the payment. |
device_id
read-only |
The ID for the device. |
error_code
read-only |
A standardized error code, independent of the payment provider. Valid values:
|
gateway |
The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page. |
id
read-only |
The ID for the transaction. |
kind
required |
The transaction's type. Valid values:
|
location_id
read-only |
The ID of the physical location where the transaction was processed. |
message
read-only |
A string generated by the payment provider with additional information about why the transaction succeeded or failed. |
order_id |
The ID for the order that the transaction is associated with. |
payment_details
read-only |
Information about the credit card used for this transaction. It has the following properties:
|
parent_id |
The ID of an associated transaction.
|
processed_at |
The date and time (ISO 8601 format)
when a transaction was processed. This value is the date that's used in the analytic reports. By default,
it matches the |
receipt
read-only |
A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using. |
source_name
read-only |
The origin of the transaction. This is set by Shopify and can't be overridden. Example values: |
status |
The status of the transaction. Valid values: |
test |
Whether the transaction is a test transaction. |
user_id |
The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable. |
currency_exchange_adjustment |
An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. It has the following properties:
X-Shopify-Api-Features = include-currency-exchange-adjustments .
|
Endpoints
Retrieves a list of transactions.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
since_id
|
Retrieve only transactions after the specified ID. |
fields
|
Show only certain fields, specifed by a comma-separated list of fields names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve an order's transactions
GET /admin/api/2019-10/orders/450789469/transactions.json
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 179259969,
"order_id": 450789469,
"kind": "refund",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T12:59:12-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 801038806,
"processed_at": "2005-08-05T12:59:12-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "209.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969"
},
{
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
},
{
"id": 801038806,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T10:22:51-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2005-08-05T10:22:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "250.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806"
}
]
}
Retrieve an order's transactions after a specified ID
GET /admin/api/2019-10/orders/450789469/transactions.json?since_id=801038806
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 1072844665,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:34-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:34-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844665"
}
]
}
Count an order's transactions
GET /admin/api/2019-10/orders/450789469/transactions/count.json
View Response
HTTP/1.1 200 OK
{
"count": 3
}
Retrieves a specific transaction.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve a specific transaction for an order
GET /admin/api/2019-10/orders/450789469/transactions/389404469.json
View Response
HTTP/1.1 200 OK
{
"transaction": {
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa"
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
}
}
Creates a transaction for an order.
source
|
The origin of the transaction. Set to |
Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID
POST /admin/api/2019-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844666,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:50-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:50-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844666"
}
}
Void a transaction
POST /admin/api/2019-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "void",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844667,
"order_id": 450789469,
"kind": "void",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:56-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:56-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "0.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844667"
}
}
Create a test transaction
POST /admin/api/2019-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469,
"test": true
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844668,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:01-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:01-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844668"
}
}
Capture the full amount for an authorized order, and associate the capture with an authorization by including its authorization code
POST /admin/api/2019-10/orders/450789469/transactions.json
{
"transaction": {
"kind": "capture",
"authorization": "authorization-key"
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844669,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:04-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:04-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844669"
}
}
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-01/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2020-01/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2020-01/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2020-01/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |
The authorization code associated with the transaction. |
created_at
read-only |
The date and time (ISO 8601 format) when the transaction was created. |
currency |
The three-letter code (ISO 4217 format) for the currency used for the payment. |
device_id
read-only |
The ID for the device. |
error_code
read-only |
A standardized error code, independent of the payment provider. Valid values:
|
gateway |
The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page. |
id
read-only |
The ID for the transaction. |
kind
required |
The transaction's type. Valid values:
|
location_id
read-only |
The ID of the physical location where the transaction was processed. |
message
read-only |
A string generated by the payment provider with additional information about why the transaction succeeded or failed. |
order_id |
The ID for the order that the transaction is associated with. |
payment_details
read-only |
Information about the credit card used for this transaction. It has the following properties:
|
parent_id |
The ID of an associated transaction.
|
processed_at |
The date and time (ISO 8601 format)
when a transaction was processed. This value is the date that's used in the analytic reports. By default,
it matches the |
receipt
read-only |
A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using. |
source_name
read-only |
The origin of the transaction. This is set by Shopify and can't be overridden. Example values: |
status |
The status of the transaction. Valid values: |
test |
Whether the transaction is a test transaction. |
user_id |
The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable. |
currency_exchange_adjustment |
An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. It has the following properties:
X-Shopify-Api-Features = include-currency-exchange-adjustments .
|
Endpoints
Retrieves a list of transactions.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
since_id
|
Retrieve only transactions after the specified ID. |
fields
|
Show only certain fields, specifed by a comma-separated list of fields names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve an order's transactions
GET /admin/api/2020-01/orders/450789469/transactions.json
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 179259969,
"order_id": 450789469,
"kind": "refund",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T12:59:12-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 801038806,
"processed_at": "2005-08-05T12:59:12-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "209.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969"
},
{
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
},
{
"id": 801038806,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T10:22:51-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2005-08-05T10:22:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "250.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806"
}
]
}
Retrieve an order's transactions after a specified ID
GET /admin/api/2020-01/orders/450789469/transactions.json?since_id=801038806
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 1072844665,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:34-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:34-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844665"
}
]
}
Count an order's transactions
GET /admin/api/2020-01/orders/450789469/transactions/count.json
View Response
HTTP/1.1 200 OK
{
"count": 3
}
Retrieves a specific transaction.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve a specific transaction for an order
GET /admin/api/2020-01/orders/450789469/transactions/389404469.json
View Response
HTTP/1.1 200 OK
{
"transaction": {
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa"
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
}
}
Creates a transaction for an order.
source
|
The origin of the transaction. Set to |
Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID
POST /admin/api/2020-01/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844666,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:50-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:50-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844666"
}
}
Void a transaction
POST /admin/api/2020-01/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "void",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844667,
"order_id": 450789469,
"kind": "void",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:56-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:56-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "0.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844667"
}
}
Create a test transaction
POST /admin/api/2020-01/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469,
"test": true
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844668,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:01-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:01-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844668"
}
}
Capture the full amount for an authorized order, and associate the capture with an authorization by including its authorization code
POST /admin/api/2020-01/orders/450789469/transactions.json
{
"transaction": {
"kind": "capture",
"authorization": "authorization-key"
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844669,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:04-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:04-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844669"
}
}
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-04/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2020-04/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2020-04/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2020-04/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |
The authorization code associated with the transaction. |
created_at
read-only |
The date and time (ISO 8601 format) when the transaction was created. |
currency |
The three-letter code (ISO 4217 format) for the currency used for the payment. |
device_id
read-only |
The ID for the device. |
error_code
read-only |
A standardized error code, independent of the payment provider. Valid values:
|
gateway |
The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page. |
id
read-only |
The ID for the transaction. |
kind
required |
The transaction's type. Valid values:
|
location_id
read-only |
The ID of the physical location where the transaction was processed. |
message
read-only |
A string generated by the payment provider with additional information about why the transaction succeeded or failed. |
order_id |
The ID for the order that the transaction is associated with. |
payment_details
read-only |
Information about the credit card used for this transaction. It has the following properties:
|
parent_id |
The ID of an associated transaction.
|
processed_at |
The date and time (ISO 8601 format)
when a transaction was processed. This value is the date that's used in the analytic reports. By default,
it matches the |
receipt
read-only |
A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using. |
source_name
read-only |
The origin of the transaction. This is set by Shopify and can't be overridden. Example values: |
status |
The status of the transaction. Valid values: |
test |
Whether the transaction is a test transaction. |
user_id |
The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable. |
currency_exchange_adjustment |
An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. It has the following properties:
X-Shopify-Api-Features = include-currency-exchange-adjustments .
|
Endpoints
Retrieves a list of transactions.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
since_id
|
Retrieve only transactions after the specified ID. |
fields
|
Show only certain fields, specifed by a comma-separated list of fields names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve an order's transactions
GET /admin/api/2020-04/orders/450789469/transactions.json
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 179259969,
"order_id": 450789469,
"kind": "refund",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T12:59:12-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 801038806,
"processed_at": "2005-08-05T12:59:12-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "209.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969"
},
{
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
},
{
"id": 801038806,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T10:22:51-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2005-08-05T10:22:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "250.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806"
}
]
}
Retrieve an order's transactions after a specified ID
GET /admin/api/2020-04/orders/450789469/transactions.json?since_id=801038806
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 1072844665,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:34-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:34-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844665"
}
]
}
Count an order's transactions
GET /admin/api/2020-04/orders/450789469/transactions/count.json
View Response
HTTP/1.1 200 OK
{
"count": 3
}
Retrieves a specific transaction.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve a specific transaction for an order
GET /admin/api/2020-04/orders/450789469/transactions/389404469.json
View Response
HTTP/1.1 200 OK
{
"transaction": {
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa"
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
}
}
Creates a transaction for an order.
source
|
The origin of the transaction. Set to |
Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID
POST /admin/api/2020-04/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844666,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:50-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:50-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844666"
}
}
Void a transaction
POST /admin/api/2020-04/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "void",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844667,
"order_id": 450789469,
"kind": "void",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:56-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:56-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "0.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844667"
}
}
Create a test transaction
POST /admin/api/2020-04/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469,
"test": true
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844668,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:01-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:01-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844668"
}
}
Capture the full amount for an authorized order, and associate the capture with an authorization by including its authorization code
POST /admin/api/2020-04/orders/450789469/transactions.json
{
"transaction": {
"kind": "capture",
"authorization": "authorization-key"
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844669,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:04-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:04-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844669"
}
}
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-07/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2020-07/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2020-07/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2020-07/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |
The authorization code associated with the transaction. |
created_at
read-only |
The date and time (ISO 8601 format) when the transaction was created. |
currency |
The three-letter code (ISO 4217 format) for the currency used for the payment. |
device_id
read-only |
The ID for the device. |
error_code
read-only |
A standardized error code, independent of the payment provider. Valid values:
|
gateway |
The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page. |
id
read-only |
The ID for the transaction. |
kind
required |
The transaction's type. Valid values:
|
location_id
read-only |
The ID of the physical location where the transaction was processed. |
message
read-only |
A string generated by the payment provider with additional information about why the transaction succeeded or failed. |
order_id |
The ID for the order that the transaction is associated with. |
payment_details
read-only |
Information about the credit card used for this transaction. It has the following properties:
|
parent_id |
The ID of an associated transaction.
|
processed_at |
The date and time (ISO 8601 format)
when a transaction was processed. This value is the date that's used in the analytic reports. By default,
it matches the |
receipt
read-only |
A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using. |
source_name
read-only |
The origin of the transaction. This is set by Shopify and can't be overridden. Example values: |
status |
The status of the transaction. Valid values: |
test |
Whether the transaction is a test transaction. |
user_id |
The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable. |
currency_exchange_adjustment |
An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. It has the following properties:
X-Shopify-Api-Features = include-currency-exchange-adjustments .
|
Endpoints
Retrieves a list of transactions.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
since_id
|
Retrieve only transactions after the specified ID. |
fields
|
Show only certain fields, specifed by a comma-separated list of fields names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve an order's transactions
GET /admin/api/2020-07/orders/450789469/transactions.json
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 179259969,
"order_id": 450789469,
"kind": "refund",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T12:59:12-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 801038806,
"processed_at": "2005-08-05T12:59:12-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "209.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969"
},
{
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
},
{
"id": 801038806,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T10:22:51-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2005-08-05T10:22:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "250.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806"
}
]
}
Retrieve an order's transactions after a specified ID
GET /admin/api/2020-07/orders/450789469/transactions.json?since_id=801038806
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 1072844665,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:34-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:34-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844665"
}
]
}
Count an order's transactions
GET /admin/api/2020-07/orders/450789469/transactions/count.json
View Response
HTTP/1.1 200 OK
{
"count": 3
}
Retrieves a specific transaction.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve a specific transaction for an order
GET /admin/api/2020-07/orders/450789469/transactions/389404469.json
View Response
HTTP/1.1 200 OK
{
"transaction": {
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa"
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
}
}
Creates a transaction for an order.
source
|
The origin of the transaction. Set to |
Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID
POST /admin/api/2020-07/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844666,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:50-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:50-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844666"
}
}
Void a transaction
POST /admin/api/2020-07/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "void",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844667,
"order_id": 450789469,
"kind": "void",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:56-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:56-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "0.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844667"
}
}
Create a test transaction
POST /admin/api/2020-07/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469,
"test": true
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844668,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:01-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:01-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844668"
}
}
Capture the full amount for an authorized order, and associate the capture with an authorization by including its authorization code
POST /admin/api/2020-07/orders/450789469/transactions.json
{
"transaction": {
"kind": "capture",
"authorization": "authorization-key"
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844669,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:04-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:04-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844669"
}
}
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-10/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2020-10/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2020-10/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2020-10/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |
The authorization code associated with the transaction. |
created_at
read-only |
The date and time (ISO 8601 format) when the transaction was created. |
currency |
The three-letter code (ISO 4217 format) for the currency used for the payment. |
device_id
read-only |
The ID for the device. |
error_code
read-only |
A standardized error code, independent of the payment provider. Valid values:
|
gateway |
The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's payment gateways page. |
id
read-only |
The ID for the transaction. |
kind
required |
The transaction's type. Valid values:
|
location_id
read-only |
The ID of the physical location where the transaction was processed. |
message
read-only |
A string generated by the payment provider with additional information about why the transaction succeeded or failed. |
order_id |
The ID for the order that the transaction is associated with. |
payment_details
read-only |
Information about the credit card used for this transaction. It has the following properties:
|
parent_id |
The ID of an associated transaction.
|
processed_at |
The date and time (ISO 8601 format)
when a transaction was processed. This value is the date that's used in the analytic reports. By default,
it matches the |
receipt
read-only |
A transaction receipt attached to the transaction by the gateway. The value of this field depends on which gateway the shop is using. |
source_name
read-only |
The origin of the transaction. This is set by Shopify and can't be overridden. Example values: |
status |
The status of the transaction. Valid values: |
test |
Whether the transaction is a test transaction. |
user_id |
The ID for the user who was logged into the Shopify POS device when the order was processed, if applicable. |
currency_exchange_adjustment |
An adjustment on the transaction showing the amount lost or gained due to fluctuations in the currency exchange rate. It has the following properties:
X-Shopify-Api-Features = include-currency-exchange-adjustments .
|
Endpoints
Retrieves a list of transactions.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
since_id
|
Retrieve only transactions after the specified ID. |
fields
|
Show only certain fields, specifed by a comma-separated list of fields names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve an order's transactions
GET /admin/api/2020-10/orders/450789469/transactions.json
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 179259969,
"order_id": 450789469,
"kind": "refund",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T12:59:12-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 801038806,
"processed_at": "2005-08-05T12:59:12-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "209.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/179259969"
},
{
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa",
"credit_card_name": null,
"credit_card_wallet": null,
"credit_card_expiration_month": null,
"credit_card_expiration_year": null
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
},
{
"id": 801038806,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-05T10:22:51-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2005-08-05T10:22:51-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "250.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806"
}
]
}
Retrieve an order's transactions after a specified ID
GET /admin/api/2020-10/orders/450789469/transactions.json?since_id=801038806
View Response
HTTP/1.1 200 OK
{
"transactions": [
{
"id": 1072844665,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:34-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:34-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844665"
}
]
}
Count an order's transactions
GET /admin/api/2020-10/orders/450789469/transactions/count.json
View Response
HTTP/1.1 200 OK
{
"count": 3
}
Retrieves a specific transaction.
Transactions attached to multi-currency orders are in the presentment currency by default. To retrieve transactions in the shop currency, include the URL parameter in_shop_currency=true
.
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
in_shop_currency
|
Show amounts in the shop currency. (default:false )
|
Retrieve a specific transaction for an order
GET /admin/api/2020-10/orders/450789469/transactions/389404469.json
View Response
HTTP/1.1 200 OK
{
"transaction": {
"id": 389404469,
"order_id": 450789469,
"kind": "authorization",
"gateway": "bogus",
"status": "success",
"message": null,
"created_at": "2005-08-01T11:57:11-04:00",
"test": false,
"authorization": "authorization-key",
"location_id": null,
"user_id": null,
"parent_id": null,
"processed_at": "2005-08-01T11:57:11-04:00",
"device_id": null,
"error_code": null,
"source_name": "web",
"payment_details": {
"credit_card_bin": null,
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 4242",
"credit_card_company": "Visa"
},
"receipt": {
"testcase": true,
"authorization": "123456"
},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469"
}
}
Creates a transaction for an order.
source
|
The origin of the transaction. Set to |
Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID
POST /admin/api/2020-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844666,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:50-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:50-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844666"
}
}
Void a transaction
POST /admin/api/2020-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "void",
"parent_id": 389404469
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844667,
"order_id": 450789469,
"kind": "void",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:33:56-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:33:56-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "0.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844667"
}
}
Create a test transaction
POST /admin/api/2020-10/orders/450789469/transactions.json
{
"transaction": {
"currency": "USD",
"amount": "10.00",
"kind": "capture",
"parent_id": 389404469,
"test": true
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844668,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:01-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:01-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "10.00",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844668"
}
}
Capture the full amount for an authorized order, and associate the capture with an authorization by including its authorization code
POST /admin/api/2020-10/orders/450789469/transactions.json
{
"transaction": {
"kind": "capture",
"authorization": "authorization-key"
}
}
View Response
HTTP/1.1 201 Created
{
"transaction": {
"id": 1072844669,
"order_id": 450789469,
"kind": "capture",
"gateway": "bogus",
"status": "success",
"message": "Bogus Gateway: Forced success",
"created_at": "2021-04-01T14:34:04-04:00",
"test": true,
"authorization": null,
"location_id": null,
"user_id": null,
"parent_id": 389404469,
"processed_at": "2021-04-01T14:34:04-04:00",
"device_id": null,
"error_code": null,
"source_name": "755357713",
"receipt": {},
"currency_exchange_adjustment": null,
"amount": "598.94",
"currency": "USD",
"admin_graphql_api_id": "gid://shopify/OrderTransaction/1072844669"
}
}
Transactions are created for every order that results in an exchange of money.

There are five types of transactions:
- Authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
- Sale: An authorization and capture performed together in a single step.
- Capture: A transfer of the money that was reserved during the authorization stage.
- Void: A cancellation of a pending authorization or capture.
- Refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Refund transactions must be created by using the Refund resource.
Note
An order can have no more than 100 transactions associated with it.
What you can do with Transaction
The Shopify API lets you do the following with the Transaction resource. More detailed versions of these general actions may be available:
- GET /admin/api/2021-01/orders/{order_id}/transactions.json Retrieves a list of transactions
- GET /admin/api/2021-01/orders/{order_id}/transactions/count.json Retrieves a count of an order's transactions
- GET /admin/api/2021-01/orders/{order_id}/transactions/{transaction_id}.json Retrieves a specific transaction
- POST /admin/api/2021-01/orders/{order_id}/transactions.json Creates a transaction for an order
Transaction properties
amount |
The amount of money included in the transaction. If you don't provide a value for `amount`, then it defaults to the total cost of the order (even if a previous transaction has been made towards it). |
authorization |