Capture Payments in Shopify GraphQL

Following is the GraphQL mutation to capture order payment in Shopify.

mutation CaptureOrderPayment($input: OrderCaptureInput!) {
  orderCapture(input: $input) {
    transaction {
      id
      kind
      status
      amountSet {
        presentmentMoney {
          amount
          currencyCode
        }
      }
      order {
        id
        totalCapturable
        capturable
      }
    }
    userErrors {
      field
      message
    }
  }
}

 {
    "input": {
        "id": "gid://shopify/Order/1234567890",
        "parentTransactionId": "gid://shopify/OrderTransaction/76448738437498923847",
        "amount": "149.80"
    }
 }


Leave a comment

Your email address will not be published. Required fields are marked *