---
page_source: https://docs.juspay.io/paytm-gateway-configuration/docs/preauth-and-capture/void-api
page_title: Void API
---

## API Version: default


# Void API



This will be used to void an authorized transaction. 

Status Understanding:


| Payment Gateway Response | Juspay Transaction Status |
|---|---|
| Pending | VOID_INITIATED |
| Success | VOIDED |
| Failure | VOID_FAILED |
| Timeout/no response from gateway | AUTHORIZED |
## Endpoints:
- Production: https://api.juspay.in/v2/txns/{txn_uuid}/void

## Request Type: 
POST

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Mandatory
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl --request POST \
     --url https://api.juspay.in/v2/txns/txn_uuid/void \
     --header 'accept: application/json' \
     --header 'authorization: Basic OUU4QxxxxxxxxxxxxxxxxTQzMEM2RkFDMjcyQjM5Og=='
```

### Sample Response:

#### Response:
```json
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "txn_uuid": "eulvW58PbNNojAJXR7B",
  "txn_id": ":txn_uuid",
  "status_id": 32,
  "status": "VOID_INITIATED",
  "return_url": "https://api.juspay.in",
  "refunded": false,
  "product_id": "",
  "payment_method_type": "CARD",
  "payment_method": "MASTERCARD",
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ord_be69837b0a4b4fe486967e1ce1cd0477",
    "mobile": "https://api.juspay.in/merchant/pay/ord_be69837b0a4b4fe486967e1ce1cd0477?mobile=true",
    "iframe": "https://api.juspay.in/merchant/ipay/ord_be69837b0a4b4fe486967e1ce1cd0477"
  },
  "payment_gateway_response": {
    "txn_id": "8342jhd9",
    "rrn": "",
    "resp_message": "Void is Pending",
    "resp_code": "PENDING",
    "epg_txn_id": "14327074",
    "created": "2019-03-01T08:38:44Z",
    "auth_id_code": "NA"
  },
  "order_id": "183782",
  "merchant_id": "merchant_id",
  "id": "ord_be69837b0a4b4fe486967e1ce1cd0477",
  "gateway_id": 70,
  "date_created": "2019-03-01T08:37:10Z",
  "customer_phone": null,
  "customer_id": "FUR14920977945",
  "customer_email": null,
  "currency": "SGD",
  "card": {
    "using_saved_card": true,
    "saved_to_locker": false,
    "name_on_card": "test",
    "last_four_digits": "",
    "expiry_year": "2022",
    "expiry_month": "07",
    "card_type": "DEBIT",
    "card_reference": "aa301450fe38c65cd813a8c33897942b",
    "card_issuer": "JP MORGAN",
    "card_isin": "541919",
    "card_fingerprint": "6rds4re1p3678ftk333q64gs1g",
    "card_brand": "MASTERCARD"
  },
  "bank_error_message": "Void is Pending",
  "bank_error_code": "PENDING",
  "auth_type": "THREE_DS",
  "amount_refunded": 0,
  "amount": 10
}
```

## API Responses:
### 200:

#### udf1-10:
- Tags: string

#### txn_uuid:
- Description: eulvW58PbNNojAJXR7B
- Tags: string

#### txn_id:
- Description: :txn_uuid
- Tags: string

#### status_id:
- Tags: integer

#### status:
- Description: VOID_INITIATED
- Tags: string

#### return_url:
- Description: https://api.juspay.in
- Tags: string

#### refunded:
- Tags: boolean

#### product_id:
- Tags: string

#### payment_method_type:
- Description: CARD
- Tags: string

#### payment_method:
- Description: MASTERCARD
- Tags: string

#### payment_links:
- Value:
  - **Web**:
    - Description: https://api.juspay.in/merchant/pay/ord_be69837b0a4b4fe486967e1ce1cd0477
    - Tags: string
  - **Mobile**:
    - Description: https://api.juspay.in/merchant/pay/ord_be69837b0a4b4fe486967e1ce1cd0477?mobile=true
    - Tags: string
  - **Iframe**:
    - Description: https://api.juspay.in/merchant/ipay/ord_be69837b0a4b4fe486967e1ce1cd0477
    - Tags: string
- Tags: object

#### payment_gateway_response:
- Value:
  - **Txn_id**:
    - Description: 8342jhd9
    - Tags: string
  - **Rrn**:
    - Tags: string
  - **Resp_message**:
    - Description: Void is Pending
    - Tags: string
  - **Resp_code**:
    - Description: PENDING
    - Tags: string
  - **Epg_txn_id**:
    - Description: 14327074
    - Tags: string
  - **Created**:
    - Description: 2019-03-01T08:38:44Z
    - Tags: string
  - **Auth_id_code**:
    - Description: NA
    - Tags: string
- Tags: object

#### order_id:
- Description: 183782
- Tags: string

#### merchant_id:
- Description: merchant_id
- Tags: string

#### id:
- Description: ord_be69837b0a4b4fe486967e1ce1cd0477
- Tags: string

#### gateway_id:
- Tags: integer

#### date_created:
- Description: 2019-03-01T08:37:10Z
- Tags: string

#### customer_phone:

#### customer_id:
- Description: FUR14920977945
- Tags: string

#### customer_email:

#### currency:
- Description: INR
- Tags: string

#### card:
- Value:
  - **Using_saved_card**:
    - Tags: boolean
  - **Saved_to_locker**:
    - Tags: boolean
  - **Name_on_card**:
    - Description: test
    - Tags: string
  - **Last_four_digits**:
    - Tags: string
  - **Expiry_year**:
    - Description: 2022
    - Tags: string
  - **Expiry_month**:
    - Description: 07
    - Tags: string
  - **Card_type**:
    - Description: DEBIT
    - Tags: string
  - **Card_reference**:
    - Description: aa301450fe38c65cd813a8c33897942b
    - Tags: string
  - **Card_issuer**:
    - Description: HDFC Bank
    - Tags: string
  - **Card_isin**:
    - Description: 541919
    - Tags: string
  - **Card_fingerprint**:
    - Description: 6rds4re1p3678ftk333q64gs1g
    - Tags: string
  - **Card_brand**:
    - Description: MASTERCARD
    - Tags: string
- Tags: object

#### bank_error_message:
- Description: Void is Pending
- Tags: string

#### bank_error_code:
- Description: PENDING
- Tags: string

#### auth_type:
- Description: THREE_DS
- Tags: string

#### amount_refunded:
- Tags: integer

#### amount:
- Tags: integer
### 400:

#### status:
- Description: Bad Request
- Tags: string

#### error_message:
- Description: Invalid state for void operation.
- Tags: string

#### error_code:
- Description: Invalid
- Tags: string
### 401:

#### status:
- Description: error
- Tags: string

#### error_code:
- Description: access_denied
- Tags: string
