mutation CaptureTransaction($input: CaptureTransactionInput!) {
    captureTransaction(input: $input) {
        transaction {
            id
            legacyId
            merchantAccountId
            status
            createdAt
            paymentMethodSnapshot {
                __typename
                ... on CreditCardTransactionDetails {
                    creditCard {
                        origin {
                            type
                        }
                    }
                }
                ... on CreditCardDetails {
                    origin {
                        type
                    }
                }
                ... on PayPalTransactionDetails {
                    captureId
                }
            }
            amount {
                value
                currencyCode
            }
            statusHistory {
                __typename
                status
                source
                ... on FailedEvent {
                    processorResponse {
                        message
                        legacyCode
                    }
                }
                ... on GatewayRejectedEvent {
                    processorResponse {
                        message
                        legacyCode
                    }
                }
                ... on ProcessorDeclinedEvent {
                    processorResponse {
                        message
                        legacyCode
                    }
                }
                ... on SettlementDeclinedEvent {
                    processorResponse {
                        message
                        legacyCode
                    }
                }
            }
        }
    }
}
