mutation ReverseTransaction($input: ReverseTransactionInput!) {
    reverseTransaction(input: $input) {
        reversal {
            ... on Transaction {
                id
                legacyId
                status
                statusHistory {
                    __typename
                    status
                    source
                    ... on FailedEvent {
                        processorResponse {
                            legacyCode
                            message
                        }
                    }
                    ... on GatewayRejectedEvent {
                        processorResponse {
                            legacyCode
                            message
                        }
                    }
                    ... on ProcessorDeclinedEvent {
                        processorResponse {
                            legacyCode
                            message
                        }
                    }
                    ... on SettlementDeclinedEvent {
                        processorResponse {
                            legacyCode
                            message
                        }
                    }
                }
                createdAt
                paymentMethodSnapshot {
                    __typename
                    ... on CreditCardTransactionDetails {
                        creditCard {
                            origin {
                                type
                            }
                        }
                    }
                    ... on CreditCardDetails {
                        origin {
                            type
                        }
                    }
                }
                amount {
                    value
                    currencyCode
                }
            }
            ... on Refund {
                id
                amount {
                    value
                }
                orderId
                status
                statusHistory {
                    __typename
                    status
                    source
                    ... on FailedEvent {
                        processorResponse {
                            message
                            legacyCode
                        }
                    }
                    ... on GatewayRejectedEvent {
                        processorResponse {
                            message
                            legacyCode
                        }
                    }
                    ... on ProcessorDeclinedEvent {
                        processorResponse {
                            message
                            legacyCode
                        }
                    }
                    ... on SettlementDeclinedEvent {
                        processorResponse {
                            message
                            legacyCode
                        }
                    }
                }
                refundedTransaction {
                    id
                    amount {
                        value
                    }
                    orderId
                    status
                }
            }
        }
    }
}
