mutation RefundPreviousPayment($refundPreviousPaymentInput: RefundPreviousPaymentInput!) {
refundPreviousPayment(refundPreviousPaymentInput: $refundPreviousPaymentInput) {
errors {
... on InternalServiceError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
... on RuleInViolationError {
advice
dateTimeUtc
errorDateTime
explanationOfRule
message
}
... on SyntaxOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on TimeoutOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on ValidationFailureError {
dateTimeUtc
errorDateTime
fieldName
fieldPath
message
}
... on PriorPaymentNotFoundError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
}
refundPreviousPaymentResponse {
activityDate
cardDetails {
last4
paymentBrand
}
duration
isDuplicateRequest
networkResponseDetails {
networkResponseCode
processorResponseCode
}
paymentId
paymentMethodResponse {
}
sanitizedFields {
fieldName
fieldPath
originalValue
reason
sanitizedValue
}
timestampUtc
tokenDetails {
token
tokenizedPan
}
transactionId
}
}
}
{
"data": {
"refundPreviousPayment": {
"errors": [
{
"__typename": "InternalServiceError",
"dateTimeUtc": "2026-01-15T14:30:00Z",
"errorDateTime": "2026-01-15T14:30:00Z",
"message": "example",
"processorResponseCode": "A0000",
"transactionId": "c9a1e2d3-4b5f-6789-0abc-def123456789"
}
],
"refundPreviousPaymentResponse": {
"activityDate": "2026-01-15",
"cardDetails": {
"last4": "1234",
"paymentBrand": "VISA"
},
"duration": 0,
"isDuplicateRequest": true,
"networkResponseDetails": {
"networkResponseCode": "example",
"processorResponseCode": "A0000"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"paymentMethodResponse": {
"bankPaymentMethodDetails": "example",
"cardPaymentMethodDetails": "example"
},
"sanitizedFields": [
{
"fieldName": "example",
"fieldPath": "example",
"originalValue": "example",
"reason": "example",
"sanitizedValue": "example"
}
],
"timestampUtc": "2026-01-15T14:30:00Z",
"tokenDetails": {
"token": "example",
"tokenizedPan": "example"
},
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123"
}
}
}
}
Refund a previously authorized payment using its payment ID and return a payload that includes details of the resulting transaction.
mutation RefundPreviousPayment($refundPreviousPaymentInput: RefundPreviousPaymentInput!) {
refundPreviousPayment(refundPreviousPaymentInput: $refundPreviousPaymentInput) {
errors {
... on InternalServiceError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
... on RuleInViolationError {
advice
dateTimeUtc
errorDateTime
explanationOfRule
message
}
... on SyntaxOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on TimeoutOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on ValidationFailureError {
dateTimeUtc
errorDateTime
fieldName
fieldPath
message
}
... on PriorPaymentNotFoundError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
}
refundPreviousPaymentResponse {
activityDate
cardDetails {
last4
paymentBrand
}
duration
isDuplicateRequest
networkResponseDetails {
networkResponseCode
processorResponseCode
}
paymentId
paymentMethodResponse {
}
sanitizedFields {
fieldName
fieldPath
originalValue
reason
sanitizedValue
}
timestampUtc
tokenDetails {
token
tokenizedPan
}
transactionId
}
}
}
{
"data": {
"refundPreviousPayment": {
"errors": [
{
"__typename": "InternalServiceError",
"dateTimeUtc": "2026-01-15T14:30:00Z",
"errorDateTime": "2026-01-15T14:30:00Z",
"message": "example",
"processorResponseCode": "A0000",
"transactionId": "c9a1e2d3-4b5f-6789-0abc-def123456789"
}
],
"refundPreviousPaymentResponse": {
"activityDate": "2026-01-15",
"cardDetails": {
"last4": "1234",
"paymentBrand": "VISA"
},
"duration": 0,
"isDuplicateRequest": true,
"networkResponseDetails": {
"networkResponseCode": "example",
"processorResponseCode": "A0000"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"paymentMethodResponse": {
"bankPaymentMethodDetails": "example",
"cardPaymentMethodDetails": "example"
},
"sanitizedFields": [
{
"fieldName": "example",
"fieldPath": "example",
"originalValue": "example",
"reason": "example",
"sanitizedValue": "example"
}
],
"timestampUtc": "2026-01-15T14:30:00Z",
"tokenDetails": {
"token": "example",
"tokenizedPan": "example"
},
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123"
}
}
}
}
Mutation
Show child attributes
Show child attributes
RefundPreviousPaymentPayload!
Show Possible types
Show InternalServiceError
Show RuleInViolationError
Show SyntaxOnNetworkResponseError
Show TimeoutOnNetworkResponseError
Show ValidationFailureError
Show PriorPaymentNotFoundError
Show child attributes
Show child attributes
Show child attributes
Show child attributes
mutation RefundPreviousPayment($refundPreviousPaymentInput: RefundPreviousPaymentInput!) {
refundPreviousPayment(refundPreviousPaymentInput: $refundPreviousPaymentInput) {
errors {
... on InternalServiceError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
... on RuleInViolationError {
advice
dateTimeUtc
errorDateTime
explanationOfRule
message
}
... on SyntaxOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on TimeoutOnNetworkResponseError {
attemptedNetwork
dateTimeUtc
errorDateTime
message
processorResponseCode
}
... on ValidationFailureError {
dateTimeUtc
errorDateTime
fieldName
fieldPath
message
}
... on PriorPaymentNotFoundError {
dateTimeUtc
errorDateTime
message
processorResponseCode
transactionId
}
}
refundPreviousPaymentResponse {
activityDate
cardDetails {
last4
paymentBrand
}
duration
isDuplicateRequest
networkResponseDetails {
networkResponseCode
processorResponseCode
}
paymentId
paymentMethodResponse {
}
sanitizedFields {
fieldName
fieldPath
originalValue
reason
sanitizedValue
}
timestampUtc
tokenDetails {
token
tokenizedPan
}
transactionId
}
}
}
{
"data": {
"refundPreviousPayment": {
"errors": [
{
"__typename": "InternalServiceError",
"dateTimeUtc": "2026-01-15T14:30:00Z",
"errorDateTime": "2026-01-15T14:30:00Z",
"message": "example",
"processorResponseCode": "A0000",
"transactionId": "c9a1e2d3-4b5f-6789-0abc-def123456789"
}
],
"refundPreviousPaymentResponse": {
"activityDate": "2026-01-15",
"cardDetails": {
"last4": "1234",
"paymentBrand": "VISA"
},
"duration": 0,
"isDuplicateRequest": true,
"networkResponseDetails": {
"networkResponseCode": "example",
"processorResponseCode": "A0000"
},
"paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
"paymentMethodResponse": {
"bankPaymentMethodDetails": "example",
"cardPaymentMethodDetails": "example"
},
"sanitizedFields": [
{
"fieldName": "example",
"fieldPath": "example",
"originalValue": "example",
"reason": "example",
"sanitizedValue": "example"
}
],
"timestampUtc": "2026-01-15T14:30:00Z",
"tokenDetails": {
"token": "example",
"tokenizedPan": "example"
},
"transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123"
}
}
}
}
Was this page helpful?