Capture a Pre-Authorized API

To capture a pre-authorized payment, use the following command. After the API command is successful, the transaction would be captured and settled to you.

HTTP Method: POST

Environment

Sample request
curl --location --request POST 'https://info.payu.in/merchant/postservice.php?form=2' \ 
--header 'Content-Type: application/x-www-form-urlencoded' \ 
--form 'key="JF***g"' \ 
--form 'command="capture_transaction"' \ 
--form 'hash="67411736ab98c59522492a12751a6015c41b87764019f9dc14052690c2c7af9095d31002fc109dcf3596c2f38792d56db6f6207b1989010f2adf51c144fa3019"' \ 
--form 'var1="15246574846"' \ 
--form 'var2="authorizeTransaction123"' \ 
--form 'var3="1"' 
Sample response
{ 
    "status": 1, 
    "msg": "Capture Request Queued", 
    "request_id": "Request ID", 
    "bank_ref_num": "Bank Reference Number" 
} 
Response parameters
ParameterDescription
statusThis parameter returns the status of web service call. The status can be any of the following:
- 0 - If web service call failed
- 1 - If web service call succeeded
msgThis parameter returns the following message if the pre-auth transaction was successful: Capture Request Queued
request_idThis parameter returns the request ID for the transaction.
bank_ref_numThis parameter returns the bank reference number for the transaction.

Request parameters

Language
Click Try It! to start a request and see the response here!