---
page_title: Capture API
product: API Reference 
page_source: https://juspay.io/br/docs/api-reference-brazil/docs/preauth-and-capture/capture-api
openapi: https://juspay.io/br/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fbr%2Fdocs%2Fapi-reference-brazil%2Fdocs%2Fpreauth-and-capture%2Fcapture-api
llms_txt: https://juspay.io/br/docs/llms.txt
product_llms_txt: https://juspay.io/br/docs/api-reference-brazil/llms.txt
---

## API Version: default


# Capture API



This will capture the transaction which is in the AUTHORIZED state. 


| Payment Gateway Response | Juspay Transaction Status |
|---|---|
| Success | CHARGED |
| Failed | CAPTURE_FAILED |
| Accepted and pending by gateway | CAPTURE_INITIATED |
| Timeout/ No response from gateway | AUTHORIZED |
## Endpoints:
- Sandbox: https://api.sandbox.juspay.io/v2/txns/{txn_uuid}/capture

- Production: https://api.juspay.io/v2/txns/{txn_uuid}/capture

## 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.io/v2/txns/txn_uuid/capture \
     --header 'accept: application/json' \
     --header 'authorization: Basic OUU4QxxxxxxxxxxxxUJDQTQzMEM2RkFDMjcyQjM5Og=='
```

### Sample Response:

#### Response:
```json
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "txn_uuid": "euld46jp7R1jE3tB8ss",
  "txn_id": "merchant_id-order_id-1",
  "status_id": 21,
  "status": "CHARGED",
  "return_url": "https://api.juspay.io",
  "refunded": false,
  "product_id": "",
  "payment_method_type": "CARD",
  "payment_method": "MASTERCARD",
  "payment_links": {
      "web": "https://api.juspay.io/merchant/pay/ord_7f609710bf6f4379b5917ee5afd8386b",
      "mobile": "https://api.juspay.io/merchant/pay/ord_7f609710bf6f4379b5917ee5afd8386b?mobile=true",
      "iframe": "https://api.juspay.io/merchant/ipay/ord_7f609710bf6f4379b5917ee5afd8386b"
  },
  "payment_gateway_response": {
      "txn_id": "merchant_id-order_id-1",
      "rrn": "",
      "resp_message": "Capture successful",
      "resp_code": "SUCCESS",
      "epg_txn_id": "14326152",
      "created": "2019-03-01T08:34:40Z",
      "auth_id_code": "NA"
  },
  "order_id": "92348923409",
  "merchant_id": "merchant_id",
  "id": "ord_7f609710bf6f4379b5917ee5afd8386b",
  "gateway_id": 70,
  "date_created": "2019-03-01T08:33:49Z",
  "customer_phone": null,
  "customer_id": "FUR14920977945",
  "customer_email": null,
  "currency": "BRL",
  "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": "PRE_AUTH|Transaction Successful | Approved",
  "bank_error_code": "SUCCESS",
  "auth_type": "THREE_DS",
  "amount_refunded": 0,
  "amount": 10
}

},
"refunds":[ ]
}

```

## Path Parameters:

#### txn_uuid:
The unique id generated by Juspay for a particular transaction. Can be used as an identifier in case of UPI transaction
- Tags: String, Max Length :128 
## API Responses:
### 200:

#### udf 1-10:
- Tags: Object

#### txn_uuid:
- Tags: String, Required

#### txn_id:
- Tags: String, Required

#### status_id:
- Tags: Number, Required

#### status:
- Tags: String, Required

#### return_url:
- Tags: String

#### refunded:
- Tags: Boolean

#### product_id:
- Tags: String

#### payment_method_type:
- Tags: String

#### payment_method:
- Tags: String

#### payment_links:
- Value:
  - **Web**:
    - Tags: String
  - **Mobile**:
    - Tags: String
  - **Iframe**:
    - Tags: String
- Tags: String

#### payment_gateway_response:
- Value:
  - **Txn_id**:
    - Tags: String
  - **Rrn**:
    - Tags: String
  - **Resp_message**:
    - Tags: String, Required
  - **Resp_code**:
    - Tags: String, Required
  - **Epg_txn_id**:
    - Tags: String
  - **Created**:
    - Tags: String
  - **Auth_id_code**:
    - Tags: String
  - **Eci**:
    - Tags: String
- Tags: String

#### order_id:
- Tags: String, Required

#### merchant_id:
- Tags: String

#### id:
- Tags: String, Required

#### gateway_id:
- Tags: String

#### date_created:
- Tags: String, Required

#### customer_phone:
- Tags: String

#### customer_id:
- Tags: String

#### customer_email:
- Tags: String

#### currency:
- Tags: String, Required

#### card:
- Value:
  - **Using_saved_card**:
    - Tags: Boolean
  - **Saved_to_locker**:
    - Tags: Boolean
  - **Name_on_card**:
    - Tags: String
  - **Last_four_digits**:
    - Tags: String
  - **Expiry_year**:
    - Tags: String
  - **Expiry_month**:
    - Tags: String
  - **Card_type**:
    - Tags: String
  - **Card_reference**:
    - Tags: String
  - **Card_issuer**:
    - Tags: String
  - **Card_isin**:
    - Tags: String
  - **Card_fingerprint**:
    - Tags: String
  - **Card_brand**:
    - Tags: String
  - **Extended_card_type**:
    - Tags: String
  - **Token_type**:
    - Tags: String
  - **Tokens**:
    - Tags: Array
  - **Payment_account_reference**:
    - Tags: String
  - **Using_token**:
    - Tags: Boolean
  - **Card_issuer_country**:
    - Tags: String
- Tags: String

#### bank_error_message:
- Tags: String

#### bank_error_code:
- Tags: String

#### auth_type:
- Tags: String

#### amount_refunded:
- Tags: Integer, Required

#### amount:
- Tags: Integer, Required

#### maximum_eligible_refund_amount:
- Tags: Integer

#### bank_pg:
- Tags: String

#### effective_amount:
- Tags: Integer

#### offers:
- Tags: Array
### 400:

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

#### error_message:
- Description: Cannot capture charged transaction
- Tags: string

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

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

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

#### error_message:
- Description: Invalid Authentication
- Tags: string


---

## See Also

- [PREAUTH CAPTURE AND VOID](https://juspay.io/br/docs/api-reference-brazil/docs/preauth-and-capture/preauth-capture-and-void)
- [Void API](https://juspay.io/br/docs/api-reference-brazil/docs/preauth-and-capture/void-api)
