---
title: "Void a transaction"
method: POST
path: "/pay/v3/void"
tags: ["Ecommerce"]
---

# Void a transaction

`POST /pay/v3/void`

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.

The entire process for voiding a transaction is as follows: 
1. A transaction using the [Run card transaction](https://docs.nexiopay.com/reference/runcardtransaction) or [Run echeck transaction](https://docs.nexiopay.com/reference/runechecktransaction) endpoint occurs.
2. Retrieve the `id` from the response. This is the Nexio Payment ID.
3. Include that `id` in the body of your request for this endpoint in order to void the transaction.

If 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](https://docs.nexiopay.com/reference/viewtransactions) endpoint and at least the following query filters:<br/>`transactionStatus=10`<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](https://docs.nexiopay.com/docs/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 as indicated above.

<div style="display:none;">

## Request parameters
- id

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

</div>

## Request body

- object
  - `id` string, required — The Nexio Payment ID. To void a transaction through this endpoint it must have been captured through the Nexio Payment API.

## Response `200`

Success

- object
  - `id` string — The Nexio Payment ID.
  - `merchantId` string — The merchant ID (MID) through which the transaction was originally processed.
  - `authCode` string — Indicates the code for the originally processed and successfully authorized payment request. Not all [gateways or connections](https://docs.nexiopay.com/docs/connections) return a value for `authCode`, so Nexio recommends against using this for reconciliation or bookkeeping.
  - `transactionType` string — The [transaction type](https://docs.nexiopay.com/docs/constant-transaction-values#transaction-type-transactiontype).
  - `transactionDate` string — 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.
  - `transactionStatus` string — The current [transaction status](https://docs.nexiopay.com/docs/constant-transaction-values#transaction-status-transactionstatus). If the void request is successful, this value will be `voided`.
  - `message` string — A message describing the status of the request.
  - `currency` string — The [three-character ISO code](https://en.wikipedia.org/wiki/ISO_4217) for the currency used in the original transaction.
  - `data` object — Transaction data.
    - `currency` Currency — unresolved $ref
    - `settlementCurrency` string — 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.
  - `gatewayResponse` object — Gateway-specific information. <b>Details will vary by gateway. Do NOT code to any information included in this object</b>.
    - `gatewayName` GatewayName — unresolved $ref
    - `refNumber` string — The gateway identifier for the transaction.
  - `random-nnnnnnn` RandomNnnn — unresolved $ref

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. For help with this error and other error codes, see [Common errors](https://docs.nexiopay.com/docs/common-errors) in the Guides area.

---

[API](https://skmtc.dev/nexiopay/apis/payments-api-reference.md) · [All operations](https://skmtc.dev/nexiopay/apis/payments-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nexiopay/payments-api-reference/revisions/b414b73979e5/schema)
