post https://test.payu.in/merchant/postservice.php
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
Test Environment | https://test.payu.in/merchant/postservice?form=2 |
Production Environment | https://info.payu.in/merchant/postservice?form=2 |
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
Parameter | Description |
---|---|
status | This 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 |
msg | This parameter returns the following message if the pre-auth transaction was successful: Capture Request Queued |
request_id | This parameter returns the request ID for the transaction. |
bank_ref_num | This parameter returns the bank reference number for the transaction. |
Request parameters
Parameter | Reference |
---|---|
key | For more information on how to generate the Key and Salt, refer to any of the following: - Production: Generate Merchant Key and Salt - Test: Generate Test Merchant Key and Salt |
hash | Hash logic for this API is:sha512(key|command|var1|salt)
sha512 |