Submit Capture Request

Capture the amount authorized for a transaction. The amount can be passed in case of partial capture.

Headers

Field NameMandatoryDescription
Content-TypeYesapplication/json
X-VerifyYesSHA256(base64 encoded payload + '/v3/auth/capture' + salt key) + '###' + salt index
{  
   "merchantId": "MID12345",
   "transactionId": "TX123456789",
   "amount": 5000
}
{
  "request": "eyAgCiAgICJtZXJjaGFudElkIjogIk1JRDEyMzQ1IiwKICAgInRyYW5zYWN0aW9uSWQiOiAiVFgxMjM0NTY3ODkiLAogICAiYW1vdW50IjogNTAwMAp9"
}

Request Parameters

Field NameData TypeMandatoryDescription
merchantIdStringYesUnique merchantId assigned to the merchant
amountLongNoamount, if passed, will override the amount sent in the authorize request to enable Partial Capture.
Note: amount cannot be greater than the amount sent in the authorize request.
transactionIdStringYesThe transaction Id sent by merchant in the authorize request
{
  "code": "SUCCESS",
  "message": "Your request has been successfully completed.",
  "data": {
    "amount": 5000,
    "transactionId": "TX123456789",
    "authState": "CREATED",
    "providerReferenceId": "P2008151338006639533115"
    }
}

Response Parameters

Field NameData TypeDescription
transactionIdStringSame as Request
providerReferenceIdStringPhonePe ReferenceId for an initiated Payment
authStateStringCurrent state of the auth & capture transaction. For details, check the authState flow diagram below.
amountLongSame as Request

📘

  • Note: Capture callback response will be the same as for the normal debit calls. Details can be found on the developer documentation - S2S Callback Reference

Response codes for the edge cases where capture fails

CodeDescription
AUTHORIZATION_ALREADY_CANCELLEDCapture failed as the authorization for the given transaction is already canceled/expired.
INVALID_TRANSACTION_IDCapture has already been initiated. Please check the status by calling transaction status API.

Other Response Codes

CodeDescription
SUCCESSYour request has been successfully completed.
BAD_REQUESTInvalid request payload
AUTHORIZATION_FAILEDValue of X-VERIFY is incorrect
INTERNAL_SERVER_ERRORSomething went wrong. Please call status and try again.
TRANSACTION_NOT_FOUNDNo Authorization found with the given details.
USER_BLACKLISTEDCustomer is blacklisted on PhonePe side
USER_DOESNOT_EXISTInvalid user
BLOCKED_FRAUDCould not complete transaction due to security reasons.
Language
Click Try It! to start a request and see the response here!