---
title: "Void transaction"
method: POST
path: "/payments/{transId}/void"
tags: ["Payments"]
---

# Void transaction

`POST /payments/{transId}/void`

Void a transaction. You can void payments, returns, and pre-auths completions. It will cancel that transaction.

## Path parameters

- `transId` number, required

## Request body

- Void
  - `amount` number, double, required — A decimal value in dollars. Must be equal to the original purchase amount. You can void purchases as well as pre-auths and returns.
  - `order_number` string — A unique order number.

## Response `200`

Payment response containing the payment details as well as if the transaction was approved or declined.

- PaymentResponse
  - `id` string — transaction Id
  - `authorizing_merchant_id` integer — The id of the merchant that authorized the transaction.
  - `approved` string — Approval status of payment transaction. 0 if the transaction is not approved. 1 if the transaction is approved.
  - `message_id` integer — Payment response code
  - `message` string — Message containing information about the transactions status
  - `auth_code` string — Auth Code
  - `created` string, date-time — Time stamp of when the transaction occurred
  - `order_number` string — Order number
  - `type` 'P' | 'R' | 'VP' | 'VR' | 'PA' | 'PAC' — Payment transaction type
  - `risk_score` number, double — The risk score represents the percentage of probability that the transaction is fraudulent. For example, a score of 10 represents a 10% possibility that the transaction is fraudulent.
  - `amount` number, double — A decimal value in dollars. Uses up to two decimal places.
  - `payment_method` 'card' | 'token' | 'payment_profile' | 'cash' | 'cheque' | 'apple_pay' | 'google_pay' — Payment method
  - `custom` Custom
    - `ref1` string — custom reference field 1
    - `ref2` string — custom reference field 2
    - `ref3` string — custom reference field 3
    - `ref4` string — custom reference field 4
    - `ref5` string — custom reference field 5
  - `card` CardPurchaseResponse
    - `card_type` 'AM' | 'DI' | 'JB' | 'MC' | 'NN' | 'VI' | 'PV' | 'MD' — The type of card used in the transaction. AM = American Express, DI = Diners, JB = JCB, MC = MasterCard, NN = Discover, VI = Visa, PV = Visa Debit, MD = Debit Mastercard
    - `last_four` string — For all payments completed using a credit card, this field will contain the last four digits of the card number used. Payments completed using ApplePay will return last four digits of the Device Primary Account Number (DPAN) associated to the transaction.
    - `card_bin` string — For all payments completed using a credit card, this field will contain the Bank Identification Number (BIN) of the card used. The field will be set to either the first six or first eight digits of the card PAN. Payments completed using ApplePay will return the first six digits of the Device Primary Account Number (DPAN) associated to the transaction. This field will not be returned for credit card transactions processed using a Processor Token.
    - `cvd_result` integer — Result of CVD verification. 1=CVD Match, 2=CVD Mismatch, 3=CVD Not Verified, 4=CVD Should have been present, 5=CVD Issuer unable to process request, 6=CVD Not Provided
    - `eci` integer — The electronic commerce indicator (ECI) returned back in the transaction response. NOTE: No longer returned for 3DS 2.0, please see status_id instead.
    - `address_match` integer — Result of Address verification. 0 if Adddress Verification Service(AVS) is disabled or AVS fails. 1 if AVS is enabled and address and postal/zip code match
    - `postal_result` integer — Result of postal verification. 0 if the postal\_code parameter does does not match the customers address records or if AVS was not processed for the transaction. 1 if the postal\_code parameter matches the consumers address records at the issuing bank.
    - `avs` AvsResponse
      - `id` '0' | '5' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'G' | 'I' | 'M' | 'N' | 'P' | 'R' | 'S' | 'U' | 'W' | 'X' | 'Y' | 'Z' — A unique avs response code. For a description of each code see https://docs.na.worldline-solutions.com/build-your-integration/security-and-fraud-APIs/address-verification-system-avs.
      - `message` string — Message containing details of the avs status. Corresponding to each avs\_id, there is an avs_message describing the status of address verification service. For example If avs\_id = 5 then avs\_message = Invalid AVS Response.
      - `processed` boolean — Is true if the issuing bank has successfully processed an AVS check on the transaction. Is false if no AVS check was performed.
    - `processor_token` ProcessorTokenResponse — Token information generated from card request, or what was used to submit payment.
      - `payment_token` string — The payment token.
      - `reporting_token` string — Token used for reporting.
      - `status` 'success' | 'fail' — Status of the token.
      - `source` string — This will contain the name of the processor that is hosting the tokenization feature.
      - `source_data` SourceData — This will contain processor specific data related to the tokenization feature returned for informational use only.
        - `td_token_status` string — This field is returned only on response message and it will indicate the status of generating the PT and/or RT tokens. Valid values are: * 0 = successful – PT and/or RT were generated * 1 = PT token could not be generated * 2 = RT token could not be generated * 3 = PT and RT tokens could not be generated * 4 = Invalid instance value * 5 = PT not able to detokenize
    - `cavv_result` string — Result code returned back from performing the 3D Secure Code validation.
    - `status_id` integer — Status/result of a 3DS 2 transaction. Set to a value of 1-4, see status for a text description.
    - `status` '1' | '2' | '3' | '4' — Status/result of a 3DS 2 transaction. 1 = Authenticated, 2 = Attempted, 3 = Non participating, 4 = Failed
    - `error_id` integer — Returned if status is 'Failed'. Set to a value of 1-3, see error for a text description.
    - `error` '1' | '2' | '3' — Returned if status is 'Failed'. 1 = 3D Secure service is not enabled, 2 = Service temporarily unavailble, 3 = Internal error
  - `3d_secure` 3DSecureResponse — 3D Secure result data
    - `status` string, required — Status of 3D secure authentication for the transaction. One of: Succeeded, Attempted, Rejected, Failed, Unavailable, or Error
    - `downgraded` boolean — Indicates whether or not the 3DS transaction was downgraded. A downgraded transaction does not provide a liability shift to the merchant, even if the 3DS authentication result was "Success" or "Attempted".
    - `reason_merchant` string — For merchant use only. Provides a category which identifies the reason for the rejection. [See list of reasons](https://docs.na.worldline-solutions.com/build-your-integration/security-and-fraud-APIs/3ds-20/)
    - `reason_cardholder` string — The reason for the rejection and instructions on what to do. This can be returned to the cardholder.
    - `method_url` string — The outcome of a 3DS Method URL operation performed during the course of a transaction. Either Succeeded (3DS Method URL was initiated and was successful), Failed (3DS Method URL was initiated but failed. The transaction will proceed but without the support of Method URL.) or NotAttempted (3DS Method URL was not requested for this transaction or a validation error existed in the supplied threeDSservertransaction_id).
  - `merchant_data` string — Returned only for 3D Secure payment requests. This value can be used as the {id} value when creating your 'continue' endpoint URL.
  - `contents` string — Returned only for 3D Secure payment requests. This should be embedded in the user's browser client and this needs to be displayed to the customer to redirect them to the 3D Secure processing page.
  - `links` Link[]
    - `ref` string — Eg. "void" or "return"
    - `href` string — Url to perform the void, return, completion etc.
    - `method` string — Http method. post, put, get etc.
  - `card_on_file` CardOnFileResponse
    - `type` 'not_card_on_file' | 'first_installment' | 'subsequent_installment' | 'first_recurring' | 'subsequent_recurring' | 'subsequent_customer_initiated' | 'subsequent_unscheduled' — * not\_card\_on\_file - A transaction where the credit card information is not stored on file. * first_installment - The first payment in a series of installment payments. (Eg. Initial installment payment when purchasing a fridge.) * subsequent_installment - A subsequent payment (ie. not the first) in a series of installment payments. (Eg. Next installment payment when purchasing a fridge.) * first_recurring - The first payment in a series of scheduled payments with no expected end date. (Eg. Initial payment for a subscription service.) * subsequent_recurring - A subsequent payment (ie. not the first) in a series of scheduled payments with no expected end date. (Eg. Next payment for a subscription service.) * subsequent\_customer_initiated - A recurring transaction that is initiated by the customer. (Eg. Customer reloads a prepaid cash card.) * subsequent_unscheduled - An unscheduled recurring transaction that is initiated by the merchant. (Eg. Merchant auto-reloads a prepaid cash card for the customer when the balance on the card reaches a predetermined threshold.)
    - `series_id` number — The identifier for the set of transactions that this transaction belongs to.

## Other responses

- `400` — Bad Request
- `401` — Authentication Failure
- `402` — Business Rule Violation or Decline
- `403` — Authorization Failure
- `405` — Invalid Request Method
- `500` — Internal Server Error

---

[API](https://skmtc.net/worldline-solutions/apis/worldline-payment-apis.md) · [All operations](https://skmtc.net/worldline-solutions/apis/worldline-payment-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/worldline-solutions/worldline-payment-apis/versions/d661d9e357a1/schema)
