---
updatedAt: 2025-09-17T23:32:49.000Z
agentTools:
  projectIndex: https://docs.nexiopay.com/llms.txt
---

# Refund a transaction

Allows you to refund all or part of a previous credit card, debit card, or echeck transaction using the Nexio Payment ID. In order to refund a transaction, it must have already settled.

The entire process for refunding a transaction is as follows: 
1. Run a transaction using the [Run card transaction](ref:runcardtransaction) or [Run echeck transaction](ref:runechecktransaction) endpoint.
2. Retrieve the `id` from the response. This is the Nexio Payment ID.
3. Use the dashboard from the gateway connection that processed the transaction to manually settle the transaction if that is possible (or wait for the transaction to settle). Note that you can use the [Nexio mock gateway](doc:nexio-mock-gateway-integration-guide) and the `paymentOptionTag` of `nexioAuto` to immediately make a transaction settle. 
4. Include the payment `id` in the body of your request for this endpoint, along with an `amount` that is less than or equal to the original transaction amount. Note that some gateway connections allow multiple refunds per transaction. In this situation, you should ensure that the total of all refunds does not exceed the amount charged in the original transaction.

If you do not know the `paymentId` or the maximum `amount` to refund, you can get an array of possible transactions that have settled with the [View transactions](ref:viewtransactions) endpoint and at least the following query filters:<br/>`transactionStatus=20`<br/>`plugin=`

<!-- theme: warning -->
> ⚠️ Try It
> 
> To use the Try It feature for this endpoint, you can use the credentials for your [Sandbox API user](doc:sandbox-environments).<br/><br/>You can also use the following test account. Copy the value and paste it into the appropriate space in the Try It section to the right.
> username: `docs@nexiopay.com`
> password: `JZdzoXpdDeH6VA`<br/><br/>Include the ID and a refund amount, as indicated above. You may also include a description of why you are issuing the refund.

<div style="display:none;">

## Request parameters
- id
- data
- data.amount
- refundReason

## Response parameters
- id
- merchantId
- transactionDate
- authCode
- transactionStatus
- transactionType
- currency
- amount
- message
- data
- data.currency
- data.settlementCurrency
- data.amount
- gatewayResponse
- gatewayResponse.gatewayName
- gatewayResponse.refNumber
- recurringData
- recurringData.recurringId
- recurringData.recurringIdType

</div>

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payments API Reference",
    "version": "3.0.0",
    "description": "Payments are how you interact with customers for all kinds of payment methods and types. \n\nUse the `pay` endpoints to generate one-time-use tokens and to accept web-based payments from cards and echecks (ACH) as well as retail payments from terminals or online forms. For more information about these workflows, see the [Getting started with ecommerce](doc:getting-started-with-ecommerce) and [Getting started with retail](doc:getting-started-with-retail) topics in Guides.\n\nAccess the `auth` endpoint to create a simple login that allows trusted users to proceed directly to the retail/MOTO iframe. For a tutorial, see [Using simple login for authentication](using-simple-login-for-authentication) in Guides.\n\nWork with payment billing for subscriptions and payment plans with the `subscriptions` endpoint. For additional information on using these endpoints, see the [Getting started with subscriptions](doc:getting-started-with-subscriptions) and [Getting started with pay plans](doc:getting-started-with-pay-plans) topics in Guides.\n\nThe `apm` endpoint allows you to generate one-time-use tokens and perform the various payment tasks for alternative payment methods. For workflows, integration guides, and tutorials, see the [Payment Methods](doc:payment-methods) documentation.",
    "contact": {
      "name": "Integrations Support",
      "email": "integrations@nexiopay.com",
      "url": "https://nexiointegrations.slack.com/"
    },
    "license": {
      "name": "ISC",
      "url": "https://docs.nexiopay.com/page/license"
    }
  },
  "security": [
    {
      "Basic_Authentication": []
    },
    {
      "One-time-use_Token": []
    }
  ],
  "servers": [
    {
      "description": "Sandbox",
      "url": "https://api.nexiopaysandbox.com",
      "variables": {}
    }
  ],
  "components": {
    "securitySchemes": {
      "Basic_Authentication": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic authentication is a simple authentication scheme built into the HTTP protocol. \n\nFor the \"Try It\" feature, type your API username and password in the appropriate fields. The system then automatically creates the Authorization header that contains the word `Basic` followed by a space and a base64-encoded string `username:password`. \n\nFor example: `Authorization: Basic ZGVtbzpwQDU1dzByZA==` \n\nFor your own requests, learn how to do the conversion in the [Authentication](doc:authentication#basic-authentication) guide. \n\nFor more information about this security protocol, see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#basic-authentication-sample"
      },
      "One-time-use_Token": {
        "type": "apiKey",
        "name": "token",
        "in": "query",
        "description": "The one-time-use token authentication scheme requires a token supplied in the named query parameter that can only be used to submit a single API request and that expires after one hour. \n\nFor the \"Try It\" feature, first generate the one-time-use token through either the [Create one-time-use token](ref:createonetimeusetoken) or the [Create APM one-time-use token](ref:createapmonetimeusetoken) endpoint. Copy the resulting token and then paste it in the appropriate field for the current endpoint. \n\nFor your own requests, learn how to generate the one-time-use token in the [Authentication](doc:authentication#one-time-use-tokens) guide. Then, use it as normal for this endpoint. \n\nFor more information about the \"apiKeys\" security protocol, see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object"
      }
    },
    "responses": {
      "401": {
        "description": "Unauthorized.\n\nFor help with this error and other error codes, see [Common errors](doc:common-errors) in the Guides area.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "integer",
                  "example": 440,
                  "description": "Indicates the Nexio error code, if applicable."
                },
                "message": {
                  "type": "string",
                  "description": "A message from Nexio about the state of the request.",
                  "example": "Unauthorized"
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Ecommerce",
      "description": "APIs for ecommerce payments"
    }
  ],
  "paths": {
    "/pay/v3/void": {
      "post": {
        "description": "Allows you to void a credit card, debit card, or echeck transaction using the Nexio Payment ID. In order to void a transaction, it must have been authorized but not yet settled.\n\nThe entire process for voiding a transaction is as follows: \n1. A transaction using the [Run card transaction](ref:runcardtransaction) or [Run echeck transaction](ref:runechecktransaction) endpoint occurs.\n2. Retrieve the `id` from the response. This is the Nexio Payment ID.\n3. Include that `id` in the body of your request for this endpoint in order to void the transaction.\n\nIf you do not know the `paymentId`, you can get an array of possible transactions that have authorized but are not yet settled with the [View transactions](ref:viewtransactions) endpoint and at least the following query filters:<br/>`transactionStatus=10`<br/>`plugin=`\n\n<!-- theme: warning -->\n> ⚠️ Try It\n> \n> To use the Try It feature for this endpoint, you can use the credentials for your [Sandbox API user](doc:sandbox-environments).<br/><br/>You can also use the following test account. Copy the value and paste it into the appropriate space in the Try It section to the right.\n> username: `docs@nexiopay.com`\n> password: `JZdzoXpdDeH6VA`<br/><br/>Include the ID as indicated above.\n\n<div style=\"display:none;\">\n\n## Request parameters\n- id\n\n## Response parameters\n- id\n- merchantId\n- transactionDate\n- authCode\n- transactionStatus\n- transactionType\n- currency\n- message\n- data\n- data.currency\n- data.settlementCurrency\n- gatewayResponse\n- gatewayResponse.gatewayName\n- gatewayResponse.refNumber\n\n</div>",
        "operationId": "VoidTransaction",
        "tags": [
          "Ecommerce"
        ],
        "security": [
          {
            "Basic_Authentication": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "title": "id",
                    "type": "string",
                    "description": "The Nexio Payment ID. To void a transaction through this endpoint it must have been captured through the Nexio Payment API.",
                    "example": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                    "x-tags": [
                      "component"
                    ]
                  }
                }
              },
              "examples": {
                "Example request": {
                  "value": {
                    "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0="
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "title": "id",
                      "type": "string",
                      "description": "The Nexio Payment ID.",
                      "example": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "merchantId": {
                      "type": "string",
                      "title": "merchantId",
                      "description": "The merchant ID (MID) through which the transaction was originally processed.",
                      "example": "100100",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "authCode": {
                      "title": "authCode",
                      "type": "string",
                      "description": "Indicates the code for the originally processed and successfully authorized payment request. Not all [gateways or connections](doc:connections) return a value for `authCode`, so Nexio recommends against using this for reconciliation or bookkeeping.",
                      "example": "035410",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "transactionType": {
                      "title": "transactionType",
                      "type": "string",
                      "description": "The [transaction type](doc:constant-transaction-values#transaction-type-transactiontype).",
                      "example": "sale",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "transactionDate": {
                      "title": "transactionDate",
                      "type": "string",
                      "description": "The original transaction date and time, formatted as an [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date expressed in UTC.",
                      "example": "2019-01-15T13:19:39.329Z",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "transactionStatus": {
                      "type": "string",
                      "title": "transactionStatus",
                      "description": "The current [transaction status](doc:constant-transaction-values#transaction-status-transactionstatus). If the void request is successful, this value will be `voided`.",
                      "x-tags": [
                        "component"
                      ],
                      "example": "voided"
                    },
                    "message": {
                      "type": "string",
                      "title": "message",
                      "description": "A message describing the status of the request.",
                      "example": "success",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "currency": {
                      "title": "currency",
                      "type": "string",
                      "description": "The [three-character ISO code](https://en.wikipedia.org/wiki/ISO_4217) for the currency used in the original transaction.",
                      "x-tags": [
                        "component"
                      ],
                      "x-internal": false,
                      "example": "USD"
                    },
                    "data": {
                      "type": "object",
                      "description": "Transaction data.",
                      "properties": {
                        "currency": {
                          "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/currency"
                        },
                        "settlementCurrency": {
                          "title": "settlementCurrency",
                          "type": "string",
                          "description": "The [three-character ISO code](https://en.wikipedia.org/wiki/ISO_4217) for the currency in which the transaction was specified to be settled originally.",
                          "example": "EUR",
                          "x-tags": [
                            "component"
                          ]
                        }
                      }
                    },
                    "gatewayResponse": {
                      "title": "gateway",
                      "type": "object",
                      "description": "Gateway-specific information. <b>Details will vary by gateway. Do NOT code to any information included in this object</b>.",
                      "properties": {
                        "gatewayName": {
                          "$ref": "#/paths/~1pay~1v3~1processFromTerminal~1%7BterminalRequestId%7D/get/responses/200/content/application~1json/schema/properties/gatewayResponse/properties/gatewayName"
                        },
                        "refNumber": {
                          "type": "string",
                          "title": "refNumber",
                          "description": "The gateway identifier for the transaction.",
                          "example": "8E56222GD0701110",
                          "x-tags": [
                            "component"
                          ]
                        }
                      },
                      "x-tags": [
                        "object"
                      ]
                    },
                    "random-nnnnnnn": {
                      "$ref": "#/paths/~1card~1v3/get/responses/200/content/application~1json/schema/properties/random-nnnn"
                    }
                  }
                },
                "examples": {
                  "Example response": {
                    "value": {
                      "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                      "merchantId": "100100",
                      "authCode": "",
                      "currency": "USD",
                      "transactionType": "sale",
                      "transactionDate": "2019-01-15T13:19:39.329Z",
                      "transactionStatus": "voided",
                      "message": "success",
                      "gatewayResponse": {
                        "gatewayName": "usaepay",
                        "refNumber": "8E56222GD0701110"
                      },
                      "data": {
                        "currency": "EUR",
                        "settlementCurrency": "USD"
                      },
                      "random-nnnnnnn": "6fec4a03-3a9f-40de-90bc-23a513ac904c"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "summary": "Void a transaction"
      }
    },
    "/pay/v3/refund": {
      "post": {
        "description": "Allows you to refund all or part of a previous credit card, debit card, or echeck transaction using the Nexio Payment ID. In order to refund a transaction, it must have already settled.\n\nThe entire process for refunding a transaction is as follows: \n1. Run a transaction using the [Run card transaction](ref:runcardtransaction) or [Run echeck transaction](ref:runechecktransaction) endpoint.\n2. Retrieve the `id` from the response. This is the Nexio Payment ID.\n3. Use the dashboard from the gateway connection that processed the transaction to manually settle the transaction if that is possible (or wait for the transaction to settle). Note that you can use the [Nexio mock gateway](doc:nexio-mock-gateway-integration-guide) and the `paymentOptionTag` of `nexioAuto` to immediately make a transaction settle. \n4. Include the payment `id` in the body of your request for this endpoint, along with an `amount` that is less than or equal to the original transaction amount. Note that some gateway connections allow multiple refunds per transaction. In this situation, you should ensure that the total of all refunds does not exceed the amount charged in the original transaction.\n\nIf you do not know the `paymentId` or the maximum `amount` to refund, you can get an array of possible transactions that have settled with the [View transactions](ref:viewtransactions) endpoint and at least the following query filters:<br/>`transactionStatus=20`<br/>`plugin=`\n\n<!-- theme: warning -->\n> ⚠️ Try It\n> \n> To use the Try It feature for this endpoint, you can use the credentials for your [Sandbox API user](doc:sandbox-environments).<br/><br/>You can also use the following test account. Copy the value and paste it into the appropriate space in the Try It section to the right.\n> username: `docs@nexiopay.com`\n> password: `JZdzoXpdDeH6VA`<br/><br/>Include the ID and a refund amount, as indicated above. You may also include a description of why you are issuing the refund.\n\n<div style=\"display:none;\">\n\n## Request parameters\n- id\n- data\n- data.amount\n- refundReason\n\n## Response parameters\n- id\n- merchantId\n- transactionDate\n- authCode\n- transactionStatus\n- transactionType\n- currency\n- amount\n- message\n- data\n- data.currency\n- data.settlementCurrency\n- data.amount\n- gatewayResponse\n- gatewayResponse.gatewayName\n- gatewayResponse.refNumber\n- recurringData\n- recurringData.recurringId\n- recurringData.recurringIdType\n\n</div>",
        "operationId": "RefundTransaction",
        "tags": [
          "Ecommerce"
        ],
        "security": [
          {
            "Basic_Authentication": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Transaction data",
                "properties": {
                  "id": {
                    "title": "id",
                    "type": "string",
                    "description": "The Nexio Payment ID. To refund a transaction through this endpoint it must have been captured through the Nexio Payment API. The transaction must also have already settled.",
                    "example": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                    "x-tags": [
                      "component"
                    ]
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "amount"
                    ],
                    "properties": {
                      "amount": {
                        "type": "number",
                        "title": "amount",
                        "description": "The amount of the transaction you want to refund, in the transaction currency. This value may be less than or equal to the original transaction `amount`, but it may not exceed it. This also means that if you make more than one refund to a single transaction where each is less than the original `amount`, you need to ensure that the total of all refunds does not exceed the original `amount`. The system returns a `435` error code if the refund amount exceeds the original `amount`.",
                        "example": 5.95,
                        "x-tags": [
                          "component"
                        ]
                      }
                    }
                  },
                  "refundReason": {
                    "type": "string",
                    "title": "refundReason",
                    "description": "Specifies information about why the refund is being issued.\n\nThe gateway or connection may not use or return this value.",
                    "x-tags": [
                      "component"
                    ],
                    "example": "This is the reason for the refund."
                  }
                },
                "required": [
                  "id",
                  "data"
                ]
              },
              "examples": {
                "Refund request with required parameters only": {
                  "value": {
                    "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                    "data": {
                      "amount": 5.95
                    }
                  }
                },
                "Refund request with all parameters": {
                  "value": {
                    "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                    "data": {
                      "amount": 5.95
                    },
                    "refundReason": "Customer return."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/id"
                    },
                    "merchantId": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/merchantId"
                    },
                    "authCode": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/authCode"
                    },
                    "transactionType": {
                      "title": "transactionType",
                      "type": "string",
                      "description": "The [transaction type](doc:constant-transaction-values#transaction-type-transactiontype). If the refund was successful, this value will be `refund`.",
                      "example": "refund",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "transactionDate": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/transactionDate"
                    },
                    "transactionStatus": {
                      "type": "string",
                      "title": "transactionStatus",
                      "example": "settled",
                      "description": "The [transaction status](doc:constant-transaction-values#transaction-status-transactionstatus).",
                      "x-tags": [
                        "component"
                      ]
                    },
                    "message": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/message"
                    },
                    "refundReason": {
                      "type": "string",
                      "title": "refundReason",
                      "description": "Indicates the information specified when submitting the refund request. This parameter is only returned when included in the refund request, and only when returned by the gateway or connection.",
                      "x-tags": [
                        "component"
                      ],
                      "example": "This is the reason for the refund."
                    },
                    "amount": {
                      "type": "number",
                      "title": "amount",
                      "description": "The amount that was refunded, expressed as a negative number.",
                      "example": -15.95,
                      "x-tags": [
                        "component"
                      ]
                    },
                    "currency": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/currency"
                    },
                    "data": {
                      "title": "data",
                      "type": "object",
                      "description": "Transaction data for the refund.",
                      "x-tags": [
                        "object"
                      ],
                      "properties": {
                        "amount": {
                          "$ref": "#/paths/~1pay~1v3~1refund/post/responses/200/content/application~1json/schema/properties/amount"
                        },
                        "currency": {
                          "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/currency"
                        },
                        "settlementCurrency": {
                          "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/data/properties/settlementCurrency"
                        }
                      }
                    },
                    "gatewayResponse": {
                      "$ref": "#/paths/~1pay~1v3~1void/post/responses/200/content/application~1json/schema/properties/gatewayResponse"
                    },
                    "recurringData": {
                      "title": "recurringData",
                      "type": "object",
                      "description": "When the original transaction used raw card information and may have recurring or subsequent transactions, the system returns this object.",
                      "x-tags": [
                        "object"
                      ],
                      "properties": {
                        "recurringId": {
                          "type": "string",
                          "title": "recurringId",
                          "description": "The ID that references the previous transaction authorization. Save this value to use in subsequent transactions every time you run a transaction with raw card information.",
                          "example": "858939643422519",
                          "x-tags": [
                            "component"
                          ]
                        },
                        "recurringIdType": {
                          "type": "string",
                          "title": "recurringIdType",
                          "description": "The type of recurring ID, in relation to the original authorization. Will be either `networkTransactionId` (meaning that a card brand issued the identifier and therefore you can potentially use it across multiple gateways or connections) or `gatewayRecurringId` (meaning that the gateway or connection issued the identifier and you can only use it with that specific gateway or connection).",
                          "x-tags": [
                            "component"
                          ],
                          "example": "networkTransactionId"
                        }
                      }
                    },
                    "random-nnnnnnn": {
                      "$ref": "#/paths/~1card~1v3/get/responses/200/content/application~1json/schema/properties/random-nnnn"
                    }
                  }
                },
                "examples": {
                  "Example card refund for recurring raw card transaction": {
                    "value": {
                      "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                      "merchantId": "100100",
                      "authCode": "035410",
                      "transactionType": "refund",
                      "transactionDate": "2025-01-15T13:19:39.329Z",
                      "transactionStatus": "settled",
                      "message": "success",
                      "refundReason": "Customer return.",
                      "amount": -5.95,
                      "currency": "USD",
                      "data": {
                        "amount": -5.95,
                        "currency": "USD",
                        "settlementCurrency": "EUR"
                      },
                      "gatewayResponse": {
                        "gatewayName": "usaepay",
                        "refNumber": "8E56222GD0701110"
                      },
                      "recurringData": {
                        "recurringId": "858939643422519",
                        "recurringIdType": "networkTransactionId"
                      },
                      "random-nnnnnnn": "6fec4a03-3a9f-40de-90bc-23a513ac904c"
                    }
                  },
                  "Example echeck refund": {
                    "value": {
                      "id": "eyJuYW1lIjoWJlciI6IjMxCJtZXJjaGFudElkIjoiMoiVVNEIn0=",
                      "merchantId": "100100",
                      "authCode": "035410",
                      "transactionType": "refund",
                      "transactionDate": "2019-01-15T13:19:39.329Z",
                      "transactionStatus": "settled",
                      "message": "success",
                      "refundReason": "This is the reason for the refund.",
                      "amount": -5.95,
                      "currency": "USD",
                      "data": {
                        "amount": -5.95,
                        "currency": "USD",
                        "settlementCurrency": "EUR"
                      },
                      "gatewayResponse": {
                        "gatewayName": "usaepay",
                        "refNumber": "8E56222GD0701110"
                      },
                      "random-nnnnnnn": "6fec4a03-3a9f-40de-90bc-23a513ac904c"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "integer",
                      "description": "Nexio's error code",
                      "example": 435
                    },
                    "message": {
                      "type": "string",
                      "description": "The reason for the failure to authenticate",
                      "example": "Amount exceeds original transaction amount."
                    },
                    "gatewayResponse": {
                      "type": "object",
                      "description": "The failure response from the gateway. Details will vary by gateway",
                      "properties": {
                        "gatewayName": {
                          "type": "string",
                          "description": "The gateway name",
                          "example": "yourGateway"
                        },
                        "refNum": {
                          "type": "string",
                          "description": "The gateway's reference number",
                          "example": "3113320943"
                        },
                        "status": {
                          "type": "string",
                          "description": "The [transaction status](doc:constant-transaction-values#transaction-status-transactionstatus).",
                          "example": "error"
                        }
                      }
                    },
                    "merchantId": {
                      "type": "string",
                      "description": "The merchant ID",
                      "example": "100100"
                    },
                    "random-nnnnnnn": {
                      "$ref": "#/paths/~1card~1v3/get/responses/200/content/application~1json/schema/properties/random-nnnn"
                    }
                  }
                },
                "examples": {
                  "Example failure": {
                    "value": {
                      "error": 435,
                      "message": "Amount exceeds original transaction amount.",
                      "gatewayResponse": {
                        "gatewayName": "[yourGateway]",
                        "refNum": "",
                        "status": "error"
                      },
                      "merchantId": "100100",
                      "random-nnnnnnn": "6fec4a03-3a9f-40de-90bc-23a513ac904c"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "summary": "Refund a transaction"
      }
    },
    "/card/v3": {
      "get": {
        "description": "Allows you to view all saved card tokens based on the given criteria. \n\n<!-- theme: info -->\n> 📘 Note \n> \n> Nexio does not currently support returning terminal tokens from this endpoint. Instead, use the terminal's token with the [View card token details](ref:viewcardtokendetails) endpoint.\n\nSaved card tokens can be used to process through any MID on your account. They are not restricted to a specific merchant account or currency.\n\n<!-- theme: warning -->\n> ⚠️ Try It\n> \n> To use the Try It feature for this endpoint, you can use the credentials for your [Sandbox API user](doc:sandbox-environments).\n> \n> You can include any of the possible filters, or none of them, in your request. For example, `/card/v3/?expirationYear<2024&merchantId=000999` to return all records for the given merchantId and a card expiration year before 2024.\n\n<div style=\"display:none;\">\n\n## Request parameters\n- limit\n- offset\n- createdAt\n- updatedAt\n- merchantId\n- merchantIds\n- customerRef\n- expirationMonth\n- expirationYear\n- accountUpdaterStatus\n- shouldUpdateCard\n- lastAccountUpdaterUpdate\n- pauseAccountUpdater\n- cardType\n- firstSix\n- lastFour\n- token\n- cardHolderName\n\n\n## Response parameters\n- limit\n- offset\n- hasMore\n- rows.key\n- rows.merchantId\n- rows.customerRef\n- rows.expirationMonth\n- rows.expirationYear\n- rows.accountUpdaterStatus\n- rows.shouldUpdateCard\n- rows.lastAccountUpdaterUpdate\n- rows.pauseAccountUpdater\n- rows.createdAt\n- rows.updatedAt\n- rows.cardType\n- rows.firstSix\n- rows.lastFour\n- rows.token\n- rows.cardHolderName\n- random-nnnn\n\n</div>",
        "operationId": "ViewCardTokens",
        "tags": [
          "Ecommerce"
        ],
        "security": [
          {
            "Basic_Authentication": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "description": "The number of records to return. ",
            "schema": {
              "type": "integer",
              "example": 12,
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "The offset. Used to view records further along the list.",
            "schema": {
              "type": "integer",
              "example": 10,
              "default": 0
            }
          },
          {
            "$ref": "#/components/parameters/createdAt"
          },
          {
            "$ref": "#/components/parameters/updatedAt"
          },
          {
            "$ref": "#/components/parameters/merchantId"
          },
          {
            "$ref": "#/components/parameters/merchantIds"
          },
          {
            "$ref": "#/components/parameters/customerRef"
          },
          {
            "$ref": "#/components/parameters/expirationMonth"
          },
          {
            "$ref": "#/components/parameters/expirationYear"
          },
          {
            "$ref": "#/components/parameters/cardType"
          },
          {
            "$ref": "#/components/parameters/cardHolderName"
          },
          {
            "$ref": "#/components/parameters/firstSix"
          },
          {
            "$ref": "#/components/parameters/lastFour"
          },
          {
            "$ref": "#/components/parameters/accountUpdaterStatus"
          },
          {
            "$ref": "#/components/parameters/lastAccountUpdaterUpdate"
          },
          {
            "$ref": "#/components/parameters/pauseAccountUpdater"
          },
          {
            "$ref": "#/components/parameters/shouldUpdateCard"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "limit": {
                      "type": "integer",
                      "x-stoplight": {
                        "id": "m7rr4xu6r2u9i"
                      },
                      "title": "limit",
                      "description": "The maximum number of records returned in a response (starting from the default or specified `offset` query parameter).",
                      "default": 10,
                      "example": 12,
                      "x-tags": [
                        "component"
                      ]
                    },
                    "offset": {
                      "type": "integer",
                      "x-stoplight": {
                        "id": "bge9c0whmlhqb"
                      },
                      "title": "offset",
                      "description": "The offset indicates how many card token records were skipped before beginning to return records in a response. If both `offset` and `limit` were used together, the offset records were skipped before starting to count the records to limit.",
                      "default": 0,
                      "example": 10,
                      "x-tags": [
                        "component"
                      ]
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Will be `true` if there are more records after the current paged response. Use the `limit` and `offset` query parameters to display paged results."
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "title": "key",
                            "example": "4f211fde-d135-4c91-afbc-bcdb73c0c504.5292712865664733",
                            "x-tags": [
                              "component"
                            ],
                            "description": "The Nexio unique key for the card token."
                          },
                          "token": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/get/responses/200/content/application~1json/schema/properties/tokenex/properties/token"
                          },
                          "customerRef": {
                            "title": "customerRef",
                            "type": "string",
                            "description": "Customer identifier associated with the card/echeck token.",
                            "example": "RP006",
                            "x-tags": [
                              "component"
                            ]
                          },
                          "merchantId": {
                            "$ref": "#/paths/~1pay~1v3~1saveCard/post/responses/200/content/application~1json/schema/properties/merchantId"
                          },
                          "cardType": {
                            "$ref": "#/paths/~1pay~1v3~1saveCard/post/responses/200/content/application~1json/schema/properties/cardType"
                          },
                          "cardHolderName": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/get/responses/200/content/application~1json/schema/properties/card/properties/cardHolderName"
                          },
                          "firstSix": {
                            "type": "string",
                            "title": "firstSix",
                            "description": "The first six digits of the card number.",
                            "x-tags": [
                              "component"
                            ],
                            "example": "424242"
                          },
                          "lastFour": {
                            "type": "string",
                            "title": "lastFour",
                            "description": "The last four digits of the card number.",
                            "x-tags": [
                              "component"
                            ],
                            "example": "4242"
                          },
                          "expirationMonth": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/put/responses/200/content/application~1json/schema/properties/card/properties/expirationMonth"
                          },
                          "expirationYear": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/put/responses/200/content/application~1json/schema/properties/card/properties/expirationYear"
                          },
                          "createdAt": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/get/responses/200/content/application~1json/schema/properties/dateCreated"
                          },
                          "updatedAt": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/get/responses/200/content/application~1json/schema/properties/dateLastModified"
                          },
                          "shouldUpdateCard": {
                            "$ref": "#/paths/~1pay~1v3~1saveCard/post/responses/200/content/application~1json/schema/properties/shouldUpdateCard"
                          },
                          "accountUpdaterStatus": {
                            "$ref": "#/paths/~1pay~1v3~1vault~1card~1%7BcardToken%7D/get/responses/200/content/application~1json/schema/properties/accountUpdaterStatus"
                          },
                          "lastAccountUpdaterUpdate": {
                            "type": "string",
                            "title": "lastAccountUpdaterUpdate",
                            "description": "The most recent update to the card token from Account Updater. The value is one of the following:\n- `cardExpiration` - if the expiration date was changed\n- `cardNumber` - if the card number was changed\n- `accountClosed` - if the last update indicated that the account is closed\n- null - if no change has occurred yet",
                            "x-tags": [
                              "component"
                            ],
                            "example": "cardNumber"
                          },
                          "pauseAccountUpdater": {
                            "type": "boolean",
                            "title": "pauseAccountUpdater",
                            "x-tags": [
                              "component"
                            ],
                            "description": "This parameter has been deprecated. For Nexio internal use only.",
                            "example": false,
                            "deprecated": true
                          }
                        }
                      }
                    },
                    "random-nnnn": {
                      "type": "string",
                      "title": "random-4611765",
                      "description": "Used for sandbox/testing only. The parameter name includes a random set of numbers as part of the name and includes a random value in the response.\\\n\\\nThis parameter and value have no meaning except to remind you to create a flexible integration with the Nexio API.",
                      "example": "6fec4a03-3a9f-40de-90bc-23a513ac904c",
                      "x-tags": [
                        "component"
                      ]
                    }
                  }
                },
                "examples": {
                  "Example response": {
                    "value": {
                      "limit": 12,
                      "offset": 10,
                      "hasMore": true,
                      "rows": [
                        {
                          "key": "4f211fde-d135-4c91-afbc-bcdb73c0c504.5292712865664733",
                          "token": "6ee140a0-05d1-4958-8325-b38a690dbb9d",
                          "customerRef": "RP006",
                          "merchantId": "000999",
                          "cardType": "visa",
                          "cardHolderName": "John H Doe",
                          "firstSix": "479300",
                          "lastFour": "3313",
                          "expirationMonth": "12",
                          "expirationYear": "28",
                          "createdAt": "2020-04-28T19:19:33.185Z",
                          "updatedAt": "2022-03-28T19:19:33.185Z",
                          "shouldUpdateCard": true,
                          "accountUpdaterStatus": "isExcluded",
                          "lastAccountUpdaterUpdate": "cardNumber",
                          "pauseAccountUpdater": false
                        }
                      ],
                      "random-nnnn": "6fec4a03-3a9f-40de-90bc-23a513ac904c"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "summary": "View card tokens"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```