--- title: orderCapture - GraphQL Admin description: |- Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously reserved by an authorization transaction. The `orderCapture` mutation can be used in the following scenarios: - To capture the full amount of an authorized transaction - To capture a partial payment by specifying an amount less than the total order amount - To perform multiple captures on the same order, as long as the order transaction is [multi-capturable](https://shopify.dev/docs/api/admin-graphql/latest/objects/ordertransaction#field-OrderTransaction.fields.multiCapturable) > Note: > Multi-capture functionality is only available to stores on a [Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan). For multi-currency orders, the [`currency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.currency) field is required and should match the presentment currency from the order. After capturing a payment, you can: - View the transaction details including status, amount, and processing information. - Track the captured amount in both shop and presentment currencies. - Monitor the transaction's settlement status. Learn more about [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction). api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/orderCapture md: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/orderCapture.md --- # order​Capture mutation Requires `write_orders` access scope or `write_marketplace_orders` access scope. Also: The user must have capture\_payments\_for\_orders permission. Captures payment for an authorized transaction on an order. Use this mutation to claim the money that was previously reserved by an authorization transaction. The `orderCapture` mutation can be used in the following scenarios: * To capture the full amount of an authorized transaction * To capture a partial payment by specifying an amount less than the total order amount * To perform multiple captures on the same order, as long as the order transaction is [multi-capturable](https://shopify.dev/docs/api/admin-graphql/latest/objects/ordertransaction#field-OrderTransaction.fields.multiCapturable) *** Note Multi-capture functionality is only available to stores on a [Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan). For multi-currency orders, the [`currency`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.currency) field is required and should match the presentment currency from the order. *** After capturing a payment, you can: * View the transaction details including status, amount, and processing information. * Track the captured amount in both shop and presentment currencies. * Monitor the transaction's settlement status. Learn more about [order transactions](https://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction). ## Arguments * input [Order​Capture​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/OrderCaptureInput) required The input for the mutation. *** ## Order​Capture​Payload returns * transaction [Order​Transaction](https://shopify.dev/docs/api/admin-graphql/unstable/objects/OrderTransaction) The created capture transaction. * user​Errors [\[User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/UserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### Capture a partial payment amount #### Description Capture a partial amount from an authorized payment for split shipments or partial order fulfillment. This example captures $50 from a larger authorized amount, enabling incremental payment collection as you ship different parts of an order. #### Query ```graphql mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } } ``` #### Variables ```json { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } }", "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } }`, { variables: { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } } QUERY variables = { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } }`, "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } }, }, }); ``` #### Response ```json { "orderCapture": { "transaction": { "id": "gid://shopify/OrderTransaction/1068278474", "kind": "CAPTURE", "status": "SUCCESS", "amountSet": { "presentmentMoney": { "amount": "50.0", "currencyCode": "USD" } }, "order": { "id": "gid://shopify/Order/431501862", "totalCapturable": "950.00", "capturable": true } }, "userErrors": [] } } ``` * ### Capture final payment for multi-part orders #### Description Create a multi-capture sequence using the \[\`finalCapture\`]\(https\://shopify.dev/docs/api/admin-graphql/latest/mutations/orderCapture#arguments-input.fields.finalCapture) input to close the authorization. This example captures the remaining authorized amount and prevents future captures on the same authorization, ensuring the payment authorization is completed. #### Query ```graphql mutation orderCaptureFinal($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } multiCapturable order { id capturable totalCapturable } } userErrors { field message } } } ``` #### Variables ```json { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00", "finalCapture": true } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation orderCaptureFinal($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } multiCapturable order { id capturable totalCapturable } } userErrors { field message } } }", "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00", "finalCapture": true } } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation orderCaptureFinal($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } multiCapturable order { id capturable totalCapturable } } userErrors { field message } } }`, { variables: { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00", "finalCapture": true } }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation orderCaptureFinal($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } multiCapturable order { id capturable totalCapturable } } userErrors { field message } } } QUERY variables = { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00", "finalCapture": true } } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation orderCaptureFinal($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } multiCapturable order { id capturable totalCapturable } } userErrors { field message } } }`, "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00", "finalCapture": true } }, }, }); ``` #### Response ```json { "orderCapture": { "transaction": { "id": "gid://shopify/OrderTransaction/1068278473", "kind": "CAPTURE", "status": "SUCCESS", "amountSet": { "presentmentMoney": { "amount": "1000.0", "currencyCode": "USD" } }, "multiCapturable": true, "order": { "id": "gid://shopify/Order/431501862", "capturable": false, "totalCapturable": "0.00" } }, "userErrors": [] } } ``` * ### Capture payment for an authorized order #### Description Capture the full authorized amount for an order after products are ready to ship and inventory is confirmed. This example demonstrates the standard payment capture process where merchants collect payment from customers after order fulfillment conditions are met, transitioning from payment authorization to final collection. The response includes comprehensive \[\`transaction\`]\(https\://shopify.dev/docs/api/admin-graphql/latest/objects/OrderTransaction) details with payment status and amount. #### Query ```graphql mutation orderCapture($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { amountSet { presentmentMoney { amount currencyCode } } authorizationCode authorizationExpiresAt createdAt errorCode fees { amount { amount currencyCode } } id kind manuallyCapturable maximumRefundableV2 { amount currencyCode } multiCapturable order { id } parentTransaction { id } paymentDetails { ... on CardPaymentDetails { paymentMethodName } ... on ShopPayInstallmentsPaymentDetails { paymentMethodName } } paymentIcon { url } paymentId processedAt receiptJson settlementCurrency shopifyPaymentsSet { refundSet { acquirerReferenceNumber } } status test totalUnsettledSet { presentmentMoney { amount currencyCode } shopMoney { amount currencyCode } } user { id } } userErrors { field message } } } ``` #### Variables ```json { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00" } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation orderCapture($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { amountSet { presentmentMoney { amount currencyCode } } authorizationCode authorizationExpiresAt createdAt errorCode fees { amount { amount currencyCode } } id kind manuallyCapturable maximumRefundableV2 { amount currencyCode } multiCapturable order { id } parentTransaction { id } paymentDetails { ... on CardPaymentDetails { paymentMethodName } ... on ShopPayInstallmentsPaymentDetails { paymentMethodName } } paymentIcon { url } paymentId processedAt receiptJson settlementCurrency shopifyPaymentsSet { refundSet { acquirerReferenceNumber } } status test totalUnsettledSet { presentmentMoney { amount currencyCode } shopMoney { amount currencyCode } } user { id } } userErrors { field message } } }", "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00" } } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation orderCapture($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { amountSet { presentmentMoney { amount currencyCode } } authorizationCode authorizationExpiresAt createdAt errorCode fees { amount { amount currencyCode } } id kind manuallyCapturable maximumRefundableV2 { amount currencyCode } multiCapturable order { id } parentTransaction { id } paymentDetails { ... on CardPaymentDetails { paymentMethodName } ... on ShopPayInstallmentsPaymentDetails { paymentMethodName } } paymentIcon { url } paymentId processedAt receiptJson settlementCurrency shopifyPaymentsSet { refundSet { acquirerReferenceNumber } } status test totalUnsettledSet { presentmentMoney { amount currencyCode } shopMoney { amount currencyCode } } user { id } } userErrors { field message } } }`, { variables: { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00" } }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation orderCapture($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { amountSet { presentmentMoney { amount currencyCode } } authorizationCode authorizationExpiresAt createdAt errorCode fees { amount { amount currencyCode } } id kind manuallyCapturable maximumRefundableV2 { amount currencyCode } multiCapturable order { id } parentTransaction { id } paymentDetails { ... on CardPaymentDetails { paymentMethodName } ... on ShopPayInstallmentsPaymentDetails { paymentMethodName } } paymentIcon { url } paymentId processedAt receiptJson settlementCurrency shopifyPaymentsSet { refundSet { acquirerReferenceNumber } } status test totalUnsettledSet { presentmentMoney { amount currencyCode } shopMoney { amount currencyCode } } user { id } } userErrors { field message } } } QUERY variables = { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00" } } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation orderCapture($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { amountSet { presentmentMoney { amount currencyCode } } authorizationCode authorizationExpiresAt createdAt errorCode fees { amount { amount currencyCode } } id kind manuallyCapturable maximumRefundableV2 { amount currencyCode } multiCapturable order { id } parentTransaction { id } paymentDetails { ... on CardPaymentDetails { paymentMethodName } ... on ShopPayInstallmentsPaymentDetails { paymentMethodName } } paymentIcon { url } paymentId processedAt receiptJson settlementCurrency shopifyPaymentsSet { refundSet { acquirerReferenceNumber } } status test totalUnsettledSet { presentmentMoney { amount currencyCode } shopMoney { amount currencyCode } } user { id } } userErrors { field message } } }`, "variables": { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "1000.00" } }, }, }); ``` #### Response ```json { "orderCapture": { "transaction": { "amountSet": { "presentmentMoney": { "amount": "1000.0", "currencyCode": "USD" } }, "authorizationCode": null, "authorizationExpiresAt": null, "createdAt": "2025-06-26T19:23:48Z", "errorCode": null, "fees": [], "id": "gid://shopify/OrderTransaction/1068278475", "kind": "CAPTURE", "manuallyCapturable": false, "maximumRefundableV2": null, "multiCapturable": true, "order": { "id": "gid://shopify/Order/431501862" }, "parentTransaction": { "id": "gid://shopify/OrderTransaction/336526656" }, "paymentDetails": null, "paymentIcon": null, "paymentId": "#1014.3", "processedAt": "2025-06-26T19:23:48Z", "receiptJson": "{}", "settlementCurrency": null, "shopifyPaymentsSet": null, "status": "SUCCESS", "test": true, "totalUnsettledSet": { "presentmentMoney": { "amount": "0.0", "currencyCode": "USD" }, "shopMoney": { "amount": "0.0", "currencyCode": "USD" } }, "user": null }, "userErrors": [] } } ``` * ### orderCapture reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20orderCapturePartial\(%24input%3A%20OrderCaptureInput!\)%20%7B%0A%20%20orderCapture\(input%3A%20%24input\)%20%7B%0A%20%20%20%20transaction%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20kind%0A%20%20%20%20%20%20status%0A%20%20%20%20%20%20amountSet%20%7B%0A%20%20%20%20%20%20%20%20presentmentMoney%20%7B%0A%20%20%20%20%20%20%20%20%20%20amount%0A%20%20%20%20%20%20%20%20%20%20currencyCode%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20order%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20totalCapturable%0A%20%20%20%20%20%20%20%20capturable%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20userErrors%20%7B%0A%20%20%20%20%20%20field%0A%20%20%20%20%20%20message%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22input%22%3A%20%7B%0A%20%20%20%20%22id%22%3A%20%22gid%3A%2F%2Fshopify%2FOrder%2F431501862%22%2C%0A%20%20%20%20%22parentTransactionId%22%3A%20%22gid%3A%2F%2Fshopify%2FOrderTransaction%2F336526656%22%2C%0A%20%20%20%20%22amount%22%3A%20%2250.00%22%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation orderCapturePartial($input: OrderCaptureInput!) { orderCapture(input: $input) { transaction { id kind status amountSet { presentmentMoney { amount currencyCode } } order { id totalCapturable capturable } } userErrors { field message } } }`, { variables: { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } }, }, ); const json = await response.json(); return json.data; } ``` ## Input variables JSON ```json { "input": { "id": "gid://shopify/Order/431501862", "parentTransactionId": "gid://shopify/OrderTransaction/336526656", "amount": "50.00" } } ``` ## Response JSON ```json { "orderCapture": { "transaction": { "id": "gid://shopify/OrderTransaction/1068278474", "kind": "CAPTURE", "status": "SUCCESS", "amountSet": { "presentmentMoney": { "amount": "50.0", "currencyCode": "USD" } }, "order": { "id": "gid://shopify/Order/431501862", "totalCapturable": "950.00", "capturable": true } }, "userErrors": [] } } ```