--- title: Transaction description: Create and retrieve transactions for an order. Transactions are created for every order that results in an exchange of money. api_version: 2025-10 api_name: admin-rest api_type: rest source_url: html: https://shopify.dev/docs/api/admin-rest/latest/resources/transaction md: https://shopify.dev/docs/api/admin-rest/latest/resources/transaction.md --- ![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg) The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql). For details and migration steps, visit our [migration guide](https://shopify.dev/docs/apps/build/graphql/migrate). # Transaction Requires ANY of the following access scopes: `orders`, `marketplace_orders`. Transactions are created for every order that results in an exchange of money. ![](https://shopify.dev/assets/api/reference/transaction.png) 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](https://shopify.dev/docs/admin-api/rest/reference/orders/refund). Note An order can have more than one authorization transaction associated with it. This might happen when an order is edited or when a post-purchase upsell is added to the order. To be notified when an order is edited subscribe to the OrderEdit webhook. If your app captures payments, you should make a `GET` request to the `/admin/api/{version}/orders/{order_id}/transactions.json` endpoint to retrieve the authorization transactions associated with an order. Then, to complete the full order payment capture, you should use the `authorization` or `parent_id` properties in separate capture `POST` requests to the same endpoint for each authorization transaction. Note An order can have no more than 100 transactions associated with it. \# ## Endpoints * [post](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#post-orders-order-id-transactions) [/admin/api/latest/orders/{order\_​id}/transactions.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#post-orders-order-id-transactions) Creates a transaction for an order [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture) [orderCapture](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions) [/admin/api/latest/orders/{order\_​id}/transactions.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions) Retrieves a list of transactions [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) [order](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions-transaction-id) [/admin/api/latest/orders/{order\_​id}/transactions/{transaction\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions-transaction-id) Retrieves a specific transaction [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/node) [node](https://shopify.dev/docs/api/admin-graphql/latest/queries/node) * [get](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions-count) [/admin/api/latest/orders/{order\_​id}/transactions/count.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/transaction#get-orders-order-id-transactions-count) Retrieves a count of an order's transactions [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) [order](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) *** ## The Transaction resource ### Properties *** amount -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) [amountSet](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) 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). *** amount\_rounding read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) [amountSet](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) The rounding adjustment for cash payments, to be applied on the amount to get a rounded amount. *** authorization -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.authorizationCode) [authorizationCode](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.authorizationCode) The authorization code associated with the transaction. *** authorization\_expires\_at -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.authorizationExpiresAt) [authorizationExpiresAt](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.authorizationExpiresAt) The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the Shopify Payments authorization expires. *** created\_at read-only The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the transaction was created. *** currency -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) [amountSet](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.amountSet) The three-letter code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format) for the currency used for the payment. *** device\_id read-only The ID for the device. *** error\_code read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.errorCode) [errorCode](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.errorCode) A standardized error code, independent of the payment provider. Valid values: Show error\_code properties * **incorrect\_number** * **invalid\_number** * **invalid\_expiry\_date** * **invalid\_cvc** * **expired\_card** * **incorrect\_cvc** * **incorrect\_zip** * **incorrect\_address** * **card\_declined** * **processing\_error** * **call\_issuer** * **pick\_up\_card** *** extended\_authorization\_attributes The attributes associated with a Shopify Payments extended authorization period. It has the following attributes: Show extended\_authorization\_attributes properties * **standard\_authorization\_expires\_at**: The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the standard authorization period expires. After expiry, an extended authorization fee is applied upon capturing the payment. * **extended\_authorization\_expires\_at**: The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the extended authorization period expires. After expiry, the merchant can't capture the payment. `extended_authorization_attributes` are available on the **Retrieve a specific transaction for an order** endpoint only if the following criteria applies: * The store is on a [Shopify Plus](https://www.shopify.com/plus) plan. * The store uses Shopify Payments. * The transaction being retrieved is an extended authorization, which is determined by the `capture_before` date in the charge. If the criteria isn't met, then an empty JSON is returned for `extended_authorization_attributes`. To learn more about extended authorization periods, refer to [Payment authorization](https://help.shopify.com/en/manual/payments/payment-authorization). *** gateway -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.gateway) [gateway](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.gateway) The name of the gateway the transaction was issued through. A list of gateways can be found on Shopify's [payment gateways page](https://www.shopify.com/payment-gateways). *** id read-only -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.id) [id](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.id) The ID for the transaction. *** kind -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.kind) [kind](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction#field-OrderTransaction.fields.kind) The transaction's type. Valid values: Show kind properties * **authorization**: Money that the customer has agreed to pay. The authorization period can be between 7 and 30 days (depending on your payment service) while a store waits for a payment to be captured. * **capture**: A transfer of money that was reserved during the authorization of a shop. * **sale**: The authorization and capture of a payment performed in one single step. * **void**: The cancellation of a pending authorization or capture. * **refund**: The partial or full return of captured money to the customer. *** {} ## The Transaction resource ```json { "amount": "10.00", "amount_rounding": "0.02", "authorization": "ch_1AtJu6CktlpKSclI4zjeQb2t", "authorization_expires_at": "2021-03-13T16:09:54-04:00", "created_at": "2012-03-13T16:09:54-04:00", "currency": "USD", "device_id": 1, "error_code": "invalid_cvc", "extended_authorization_attributes": { "standard_authorization_expires_at": "2020-10-08T00:00:00-04:00", "extended_authorization_expires_at": "2020-10-30T00:00:00-04:00" }, "gateway": "shopify_payments", "id": 999225661, "kind": "capture", "location_id": { "id": 49202758 }, "message": "Marked the Stripe payment as received", "order_id": 450789469, "payment_details": { "credit_card_bin": "123456", "avs_result_code": "Y", "cvv_result_code": "M", "credit_card_number": "•••• •••• •••• 4242", "credit_card_company": "Visa", "credit_card_name": "John Smith", "credit_card_wallet": "shopify_pay", "credit_card_expiration_month": 10, "credit_card_expiration_year": 2028, "buyer_action_info": { "multibanco": { "Entity": "12345", "Reference": "999999999" } }, "payment_method_name": "multibanco" }, "parent_id": 584698724408, "payments_refund_attributes": { "status": "success", "acquirer_reference_number": "123456789012345678901234" }, "processed_at": "2018-01-10T11:00:00-05:00", "receipt": {}, "source_name": "web", "status": "success", "total_unsettled_set": { "presentment_money": { "amount": "171.8", "currency": "USD" }, "shop_money": { "amount": "171.8", "currency": "USD" } }, "test": true, "user_id": 106045196, "currency_exchange_adjustment": { "id": 1, "adjustment": "-0.01", "original_amount": "-53.62", "final_amount": "-53.63", "currency": "CAD" }, "manual_payment_gateway": false } ``` *** ## postCreates a transaction for an order [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture) [orderCapture](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture) Caution For multi-currency orders, the `currency` property is required when creating refund and capture transactions. The value should be the presentment currency from the order. For more information, refer to the [*Transaction resource*](https://shopify.dev/api/admin-rest/latest/resources/transaction). Creates a transaction for an order. ### Parameters *** api\_version string required *** order\_id string required *** source An optional origin of the transaction. Set to `external` to import a cash transaction for the associated order. *** ### Examples Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID Path parameters order\_​id=​450789469 string required Request body transaction​ Transaction resource Show transaction properties transaction.currency:​"USD" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) [currency](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) The three-letter code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format) for the currency used for the payment. transaction.amount:​"10.00" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-amount) [amount](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-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). transaction.kind:​"capture" The transaction's type. Valid values: Show kind properties * **authorization**: Money that the customer has agreed to pay. The authorization period can be between 7 and 30 days (depending on your payment service) while a store waits for a payment to be captured. * **capture**: A transfer of money that was reserved during the authorization of a shop. * **sale**: The authorization and capture of a payment performed in one single step. * **void**: The cancellation of a pending authorization or capture. * **refund**: The partial or full return of captured money to the customer. transaction.parent\_​id:​389404469 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) [parentTransactionId](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) The ID of an associated transaction. Show parent\_id properties * For `capture` transactions, the parent needs to be an `authorization` transaction. * For `void` transactions, the parent needs to be an `authorization` transaction. * For `refund` transactions, the parent needs to be a `capture` or `sale` transaction. Capture the full amount for one authorization on an order, and associate the capture with an authorization by including its authorization code Path parameters order\_​id=​450789469 string required Request body transaction​ Transaction resource Show transaction properties transaction.kind:​"capture" The transaction's type. Valid values: Show kind properties * **authorization**: Money that the customer has agreed to pay. The authorization period can be between 7 and 30 days (depending on your payment service) while a store waits for a payment to be captured. * **capture**: A transfer of money that was reserved during the authorization of a shop. * **sale**: The authorization and capture of a payment performed in one single step. * **void**: The cancellation of a pending authorization or capture. * **refund**: The partial or full return of captured money to the customer. transaction.authorization:​"authorization-key" The authorization code associated with the transaction. Create a test transaction Path parameters order\_​id=​450789469 string required Request body transaction​ Transaction resource Show transaction properties transaction.currency:​"USD" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) [currency](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) The three-letter code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format) for the currency used for the payment. transaction.amount:​"10.00" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-amount) [amount](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-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). transaction.kind:​"capture" The transaction's type. Valid values: Show kind properties * **authorization**: Money that the customer has agreed to pay. The authorization period can be between 7 and 30 days (depending on your payment service) while a store waits for a payment to be captured. * **capture**: A transfer of money that was reserved during the authorization of a shop. * **sale**: The authorization and capture of a payment performed in one single step. * **void**: The cancellation of a pending authorization or capture. * **refund**: The partial or full return of captured money to the customer. transaction.parent\_​id:​389404469 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) [parentTransactionId](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) The ID of an associated transaction. Show parent\_id properties * For `capture` transactions, the parent needs to be an `authorization` transaction. * For `void` transactions, the parent needs to be an `authorization` transaction. * For `refund` transactions, the parent needs to be a `capture` or `sale` transaction. transaction.test:​true Whether the transaction is a test transaction. Void a transaction Path parameters order\_​id=​450789469 string required Request body transaction​ Transaction resource Show transaction properties transaction.currency:​"USD" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) [currency](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-currency) The three-letter code ([ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format) for the currency used for the payment. transaction.amount:​"10.00" -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-amount) [amount](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-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). transaction.kind:​"void" The transaction's type. Valid values: Show kind properties * **authorization**: Money that the customer has agreed to pay. The authorization period can be between 7 and 30 days (depending on your payment service) while a store waits for a payment to be captured. * **capture**: A transfer of money that was reserved during the authorization of a shop. * **sale**: The authorization and capture of a payment performed in one single step. * **void**: The cancellation of a pending authorization or capture. * **refund**: The partial or full return of captured money to the customer. transaction.parent\_​id:​389404469 -> [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) [parentTransactionId](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderCaptureInput#fields-parentTransactionId) The ID of an associated transaction. Show parent\_id properties * For `capture` transactions, the parent needs to be an `authorization` transaction. * For `void` transactions, the parent needs to be an `authorization` transaction. * For `refund` transactions, the parent needs to be a `capture` or `sale` transaction. post ## /admin/api/2025-10/orders/450789469/transactions.​json ```bash curl -d '{"transaction":{"currency":"USD","amount":"10.00","kind":"capture","parent_id":389404469}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` {} ## Response JSON ```json HTTP/1.1 201 Created { "transaction": { "id": 1068278517, "order_id": 450789469, "kind": "capture", "gateway": "bogus", "status": "success", "message": "Bogus Gateway: Forced success", "created_at": "2025-10-01T15:11:05-04:00", "test": true, "authorization": null, "location_id": null, "user_id": null, "parent_id": 389404469, "processed_at": "2025-10-01T15:11:05-04:00", "device_id": null, "error_code": null, "source_name": "755357713", "payment_details": { "credit_card_bin": null, "avs_result_code": null, "cvv_result_code": null, "credit_card_number": "•••• •••• •••• 4242", "credit_card_company": "Visa", "buyer_action_info": null, "credit_card_name": null, "credit_card_wallet": null, "credit_card_expiration_month": null, "credit_card_expiration_year": null, "payment_method_name": "visa" }, "receipt": {}, "currency_exchange_adjustment": null, "amount": "10.00", "currency": "USD", "payment_id": "c901414060.1", "total_unsettled_set": { "presentment_money": { "amount": "588.94", "currency": "USD" }, "shop_money": { "amount": "588.94", "currency": "USD" } }, "manual_payment_gateway": false, "amount_rounding": null, "admin_graphql_api_id": "gid://shopify/OrderTransaction/1068278517" } } ``` ### examples * #### Capture a specified amount on an authorized order, and associate the capture with an authorization by including its ID ##### ```curl curl -d '{"transaction":{"currency":"USD","amount":"10.00","kind":"capture","parent_id":389404469}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const transaction = new admin.rest.resources.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "capture"; transaction.parent_id = 389404469; await transaction.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session transaction = ShopifyAPI::Transaction.new(session: test_session) transaction.order_id = 450789469 transaction.currency = "USD" transaction.amount = "10.00" transaction.kind = "capture" transaction.parent_id = 389404469 transaction.save! ``` ##### ```node // Session is built by the OAuth process const transaction = new shopify.rest.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "capture"; transaction.parent_id = 389404469; await transaction.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"transaction":{"id":1068278517,"order_id":450789469,"kind":"capture","gateway":"bogus","status":"success","message":"Bogus Gateway: Forced success","created_at":"2025-10-01T15:11:05-04:00","test":true,"authorization":null,"location_id":null,"user_id":null,"parent_id":389404469,"processed_at":"2025-10-01T15:11:05-04:00","device_id":null,"error_code":null,"source_name":"755357713","payment_details":{"credit_card_bin":null,"avs_result_code":null,"cvv_result_code":null,"credit_card_number":"•••• •••• •••• 4242","credit_card_company":"Visa","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{},"currency_exchange_adjustment":null,"amount":"10.00","currency":"USD","payment_id":"c901414060.1","total_unsettled_set":{"presentment_money":{"amount":"588.94","currency":"USD"},"shop_money":{"amount":"588.94","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/1068278517"}} ``` * #### Capture the full amount for one authorization on an order, and associate the capture with an authorization by including its authorization code ##### ```curl curl -d '{"transaction":{"kind":"capture","authorization":"authorization-key"}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const transaction = new admin.rest.resources.Transaction({session: session}); transaction.order_id = 450789469; transaction.kind = "capture"; transaction.authorization = "authorization-key"; await transaction.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session transaction = ShopifyAPI::Transaction.new(session: test_session) transaction.order_id = 450789469 transaction.kind = "capture" transaction.authorization = "authorization-key" transaction.save! ``` ##### ```node // Session is built by the OAuth process const transaction = new shopify.rest.Transaction({session: session}); transaction.order_id = 450789469; transaction.kind = "capture"; transaction.authorization = "authorization-key"; await transaction.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"transaction":{"id":1068278525,"order_id":450789469,"kind":"capture","gateway":"bogus","status":"success","message":"Bogus Gateway: Forced success","created_at":"2025-10-01T15:11:16-04:00","test":true,"authorization":null,"location_id":null,"user_id":null,"parent_id":389404469,"processed_at":"2025-10-01T15:11:16-04:00","device_id":null,"error_code":null,"source_name":"755357713","payment_details":{"credit_card_bin":null,"avs_result_code":null,"cvv_result_code":null,"credit_card_number":"•••• •••• •••• 4242","credit_card_company":"Visa","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{},"currency_exchange_adjustment":null,"amount":"598.94","currency":"USD","payment_id":"c901414060.1","total_unsettled_set":{"presentment_money":{"amount":"0.0","currency":"USD"},"shop_money":{"amount":"0.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/1068278525"}} ``` * #### Create a test transaction ##### ```curl curl -d '{"transaction":{"currency":"USD","amount":"10.00","kind":"capture","parent_id":389404469,"test":true}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const transaction = new admin.rest.resources.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "capture"; transaction.parent_id = 389404469; transaction.test = true; await transaction.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session transaction = ShopifyAPI::Transaction.new(session: test_session) transaction.order_id = 450789469 transaction.currency = "USD" transaction.amount = "10.00" transaction.kind = "capture" transaction.parent_id = 389404469 transaction.test = true transaction.save! ``` ##### ```node // Session is built by the OAuth process const transaction = new shopify.rest.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "capture"; transaction.parent_id = 389404469; transaction.test = true; await transaction.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"transaction":{"id":1068278503,"order_id":450789469,"kind":"capture","gateway":"bogus","status":"success","message":"Bogus Gateway: Forced success","created_at":"2025-10-01T15:10:42-04:00","test":true,"authorization":null,"location_id":null,"user_id":null,"parent_id":389404469,"processed_at":"2025-10-01T15:10:42-04:00","device_id":null,"error_code":null,"source_name":"755357713","payment_details":{"credit_card_bin":null,"avs_result_code":null,"cvv_result_code":null,"credit_card_number":"•••• •••• •••• 4242","credit_card_company":"Visa","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{},"currency_exchange_adjustment":null,"amount":"10.00","currency":"USD","payment_id":"c901414060.1","total_unsettled_set":{"presentment_money":{"amount":"588.94","currency":"USD"},"shop_money":{"amount":"588.94","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/1068278503"}} ``` * #### Void a transaction ##### ```curl curl -d '{"transaction":{"currency":"USD","amount":"10.00","kind":"void","parent_id":389404469}}' \ -X POST "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" \ -H "Content-Type: application/json" ``` ##### ```remix const { admin, session } = await authenticate.admin(request); const transaction = new admin.rest.resources.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "void"; transaction.parent_id = 389404469; await transaction.save({ update: true, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session transaction = ShopifyAPI::Transaction.new(session: test_session) transaction.order_id = 450789469 transaction.currency = "USD" transaction.amount = "10.00" transaction.kind = "void" transaction.parent_id = 389404469 transaction.save! ``` ##### ```node // Session is built by the OAuth process const transaction = new shopify.rest.Transaction({session: session}); transaction.order_id = 450789469; transaction.currency = "USD"; transaction.amount = "10.00"; transaction.kind = "void"; transaction.parent_id = 389404469; await transaction.save({ update: true, }); ``` #### response ```json HTTP/1.1 201 Created{"transaction":{"id":1068278510,"order_id":450789469,"kind":"void","gateway":"bogus","status":"success","message":"Bogus Gateway: Forced success","created_at":"2025-10-01T15:10:54-04:00","test":true,"authorization":null,"location_id":null,"user_id":null,"parent_id":389404469,"processed_at":"2025-10-01T15:10:55-04:00","device_id":null,"error_code":null,"source_name":"755357713","payment_details":{"credit_card_bin":null,"avs_result_code":null,"cvv_result_code":null,"credit_card_number":"•••• •••• •••• 4242","credit_card_company":"Visa","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{},"currency_exchange_adjustment":null,"amount":"0.00","currency":"USD","payment_id":"c901414060.1","total_unsettled_set":{"presentment_money":{"amount":"0.0","currency":"USD"},"shop_money":{"amount":"0.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/1068278510"}} ``` *** ## getRetrieves a list of transactions [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) [order](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) 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`. ### Parameters *** api\_version string required *** order\_id string required *** fields Show only certain fields, specifed by a comma-separated list of fields names. *** in\_shop\_currency default false Show amounts in the shop currency. *** since\_id Retrieve only transactions after the specified ID. *** ### Examples Retrieve an order's transactions Path parameters order\_​id=​450789469 string required Retrieve an order's transactions after a specified ID Path parameters order\_​id=​450789469 string required Query parameters since\_​id=​801038806 Retrieve only transactions after the specified ID. get ## /admin/api/2025-10/orders/450789469/transactions.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json 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", "payment_id": "#1001.3", "total_unsettled_set": { "presentment_money": { "amount": "348.0", "currency": "USD" }, "shop_money": { "amount": "348.0", "currency": "USD" } }, "manual_payment_gateway": false, "amount_rounding": null, "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", "buyer_action_info": null, "credit_card_name": null, "credit_card_wallet": null, "credit_card_expiration_month": null, "credit_card_expiration_year": null, "payment_method_name": "visa" }, "receipt": { "testcase": true, "authorization": "123456" }, "currency_exchange_adjustment": null, "amount": "598.94", "currency": "USD", "payment_id": "#1001.1", "total_unsettled_set": { "presentment_money": { "amount": "348.0", "currency": "USD" }, "shop_money": { "amount": "348.0", "currency": "USD" } }, "manual_payment_gateway": false, "amount_rounding": null, "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", "payment_id": "#1001.2", "total_unsettled_set": { "presentment_money": { "amount": "348.0", "currency": "USD" }, "shop_money": { "amount": "348.0", "currency": "USD" } }, "manual_payment_gateway": false, "amount_rounding": null, "admin_graphql_api_id": "gid://shopify/OrderTransaction/801038806" } ] } ``` ### examples * #### Retrieve an order's transactions ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Transaction.all({ session: session, order_id: 450789469, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Transaction.all( session: test_session, order_id: 450789469, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Transaction.all({ session: session, order_id: 450789469, }); ``` #### response ```json 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","payment_id":"#1001.3","total_unsettled_set":{"presentment_money":{"amount":"348.0","currency":"USD"},"shop_money":{"amount":"348.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"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","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{"testcase":true,"authorization":"123456"},"currency_exchange_adjustment":null,"amount":"598.94","currency":"USD","payment_id":"#1001.1","total_unsettled_set":{"presentment_money":{"amount":"348.0","currency":"USD"},"shop_money":{"amount":"348.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"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","payment_id":"#1001.2","total_unsettled_set":{"presentment_money":{"amount":"348.0","currency":"USD"},"shop_money":{"amount":"348.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/801038806"}]} ``` * #### Retrieve an order's transactions after a specified ID ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions.json?since_id=801038806" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Transaction.all({ session: session, order_id: 450789469, since_id: "801038806", }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Transaction.all( session: test_session, order_id: 450789469, since_id: "801038806", ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Transaction.all({ session: session, order_id: 450789469, since_id: "801038806", }); ``` #### response ```json HTTP/1.1 200 OK{"transactions":[{"id":1068278524,"order_id":450789469,"kind":"capture","gateway":"bogus","status":"success","message":"Bogus Gateway: Forced success","created_at":"2025-10-01T15:11:15-04:00","test":true,"authorization":null,"location_id":null,"user_id":null,"parent_id":389404469,"processed_at":"2025-10-01T15:11:15-04:00","device_id":null,"error_code":null,"source_name":"755357713","payment_details":{"credit_card_bin":null,"avs_result_code":null,"cvv_result_code":null,"credit_card_number":"•••• •••• •••• 4242","credit_card_company":"Visa","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{},"currency_exchange_adjustment":null,"amount":"10.00","currency":"USD","payment_id":"c901414060.1","total_unsettled_set":{"presentment_money":{"amount":"338.0","currency":"USD"},"shop_money":{"amount":"338.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/1068278524"}]} ``` *** ## getRetrieves a specific transaction [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/node) [node](https://shopify.dev/docs/api/admin-graphql/latest/queries/node) 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`. `extended_authorization_attributes` are available on this endpoint only to stores on the [Shopify Plus](https://www.shopify.com/plus) plan that use Shopify Payments. To learn more about extended authorization periods, refer to [Payment authorization](https://help.shopify.com/en/manual/payments/payment-authorization). ### Parameters *** api\_version string required *** order\_id string required *** transaction\_id string required *** fields Show only certain fields, specified by a comma-separated list of field names. *** in\_shop\_currency default false Show amounts in the shop currency. *** ### Examples Retrieve a specific transaction for an order get ## /admin/api/2025-10/orders/450789469/transactions/389404469.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions/389404469.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json 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", "buyer_action_info": null, "credit_card_name": null, "credit_card_wallet": null, "credit_card_expiration_month": null, "credit_card_expiration_year": null, "payment_method_name": "visa" }, "receipt": { "testcase": true, "authorization": "123456" }, "currency_exchange_adjustment": null, "amount": "598.94", "currency": "USD", "authorization_expires_at": null, "extended_authorization_attributes": {}, "payment_id": "#1001.1", "total_unsettled_set": { "presentment_money": { "amount": "348.0", "currency": "USD" }, "shop_money": { "amount": "348.0", "currency": "USD" } }, "manual_payment_gateway": false, "amount_rounding": null, "admin_graphql_api_id": "gid://shopify/OrderTransaction/389404469" } } ``` ### examples * #### Retrieve a specific transaction for an order ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions/389404469.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Transaction.find({ session: session, order_id: 450789469, id: 389404469, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Transaction.find( session: test_session, order_id: 450789469, id: 389404469, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Transaction.find({ session: session, order_id: 450789469, id: 389404469, }); ``` #### response ```json 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","buyer_action_info":null,"credit_card_name":null,"credit_card_wallet":null,"credit_card_expiration_month":null,"credit_card_expiration_year":null,"payment_method_name":"visa"},"receipt":{"testcase":true,"authorization":"123456"},"currency_exchange_adjustment":null,"amount":"598.94","currency":"USD","authorization_expires_at":null,"extended_authorization_attributes":{},"payment_id":"#1001.1","total_unsettled_set":{"presentment_money":{"amount":"348.0","currency":"USD"},"shop_money":{"amount":"348.0","currency":"USD"}},"manual_payment_gateway":false,"amount_rounding":null,"admin_graphql_api_id":"gid://shopify/OrderTransaction/389404469"}} ``` *** ## getRetrieves a count of an order's transactions [![](https://shopify.dev/images/logos/GraphQL.svg)![](https://shopify.dev/images/logos/GraphQL-dark.svg)](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) [order](https://shopify.dev/docs/api/admin-graphql/latest/queries/order) Retrieves a count of an order's transactions. ### Parameters *** api\_version string required *** order\_id string required *** ### Examples Count an order's transactions Path parameters order\_​id=​450789469 string required get ## /admin/api/2025-10/orders/450789469/transactions/count.​json ```bash curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` {} ## Response JSON ```json HTTP/1.1 200 OK { "count": 3 } ``` ### examples * #### Count an order's transactions ##### ```curl curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-10/orders/450789469/transactions/count.json" \ -H "X-Shopify-Access-Token: {access_token}" ``` ##### ```remix await admin.rest.resources.Transaction.count({ session: session, order_id: 450789469, }); ``` ##### ```ruby # Session is activated via Authentication test_session = ShopifyAPI::Context.active_session ShopifyAPI::Transaction.count( session: test_session, order_id: 450789469, ) ``` ##### ```node // Session is built by the OAuth process await shopify.rest.Transaction.count({ session: session, order_id: 450789469, }); ``` #### response ```json HTTP/1.1 200 OK{"count":3} ```