This will perform capture on the successfully authorized transaction. Use this in case if auto_capture was false while authenticating API.

Request

|Type|Params|Values|Description|
|HEADER|api_key|string| |
|EMBEDDED|id|string|Unique id generated for the transaction in generating OTP API call.|

Example

curl -X POST https://api.juspay.in/v2/txns/:id/capture -u your_api_key:

Response

{
  "id": "txn_035b4e708d5148478828ea3136a9efd7",
  "order_id": ":order_id",
  "txn_id": ":txn_id",
  "status": "CHARGED",
  "gateway": "CYBERSOURCE",
  "created": "2017-05-05T12:12:08Z",
  "resp_code": "00",
  "resp_message": "",
  "payment_info": {
    "payment_method_type": "CARD",
    "payment_method": "VISA",
    "card": {
    "last_four_digits": "",
    "card_isin": "400020",
    "expiry_month": "09",
    "expiry_year": "2020",
    "name_on_card": "",
    "card_type": "",
    "card_issuer": "",
    "card_brand": "VISA",
    "card_reference": "",
    "card_fingerprint": "37sug6sns7p8ubota3md74va3u",
    "using_saved_card": false,
    "saved_to_locker": false
    }
  },
  "payment_gateway_response": {
    "created": "2017-05-05T12:12:42Z",
    "txn_id": ":txn_id",
    "rrn": "",
    "epg_txn_id": ":epg_txn_id",
    "auth_id_code": "",
    "resp_code": "00",
    "resp_message": "",
    "gateway_response_map": {
    //gateway dependent response parameters
    }
  },
  "refunds":[ ]
}
{
  "status": "invalid_request_error",
  "error_code": "invalid",
  "error_message": "Invalid authentication account id."
}
{
  "status": "error",
  "error_code": "access_denied",
  "error_message": "Invalid Authentication"
}

Did this page help you?