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

# Capture a transaction

`POST /pay/v3/capture`

Allows you to capture an auth only transaction. To do this, you must complete the following steps:
1. Run an auth only transaction using the [Run card transaction](https://docs.nexiopay.com/reference/runcardtransaction) endpoint (by setting the `isAuthOnly` parameter to `true`).
2. Retrieve the `id` from the response. This is the Nexio Payment ID.
3. Include that `id` in the body of your request to this endpoint.

If you do not know the `paymentId` or `amount` to use, make a call with the [View transactions](https://docs.nexiopay.com/reference/viewtransactions) endpoint with the query filter of `transactionStatus=11` and `plugin=` to get an array of possible transactions.

<!-- 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 for an <<glossary:auth only>> transaction.

<div style="display:none;">

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

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

</div>

## Request body

- object
  - `id` Id, required — unresolved $ref
  - `data` object, required — Transaction data
    - `amount` number, required — The amount of the auth only transaction you wish to capture. Is not required to be the full amount.

## Response `200`

Success

- object
  - `id` Id — unresolved $ref
  - `merchantId` MerchantId — unresolved $ref
  - `authCode` string — Represents a 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). This value is cached in the one-time-use token.
  - `transactionDate` string — The 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` TransactionStatus — unresolved $ref
  - `gatewayResponse` GatewayResponse — unresolved $ref
  - `message` Message — unresolved $ref
  - `currency` string — The [three-character ISO code](https://en.wikipedia.org/wiki/ISO_4217) for the currency used in the transaction.
  - `amount` number — The amount to be captured.
  - `data` object — Transaction data.
    - `amount` Amount — unresolved $ref
    - `currency` Currency — unresolved $ref
    - `settlementCurrency` SettlementCurrency — unresolved $ref

## Other responses

- `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)
