Submit Capture Request

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

Headers

Field Name

Mandatory

Description

Content-Type

Yes

application/json

X-Verify

Yes

SHA256(base64 encoded payload + '/v3/auth/capture' + salt key) + '###' + salt index

{  
   "merchantId": "MID12345",
   "transactionId": "TX123456789",
   "amount": 5000
}
{
  "request": "eyAgCiAgICJtZXJjaGFudElkIjogIk1JRDEyMzQ1IiwKICAgInRyYW5zYWN0aW9uSWQiOiAiVFgxMjM0NTY3ODkiLAogICAiYW1vdW50IjogNTAwMAp9"
}

Request Parameters

Field Name

Data Type

Mandatory

Description

merchantId

String

Yes

Unique merchantId assigned to the merchant

amount

Long

No

amount, 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.

transactionId

String

Yes

The 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 Name

Data Type

Description

transactionId

String

Same as Request

providerReferenceId

String

PhonePe ReferenceId for an initiated Payment

authState

String

Current state of the auth & capture transaction. For details, check the authState flow diagram below.

amount

Long

Same 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

Code

Description

AUTHORIZATION_ALREADY_CANCELLED

Capture failed as the authorization for the given transaction is already canceled/expired.

INVALID_TRANSACTION_ID

Capture has already been initiated. Please check the status by calling transaction status API.

Other Response Codes

Code

Description

SUCCESS

Your request has been successfully completed.

BAD_REQUEST

Invalid request payload

AUTHORIZATION_FAILED

Value of X-VERIFY is incorrect

INTERNAL_SERVER_ERROR

Something went wrong. Please call status and try again.

TRANSACTION_NOT_FOUND

No Authorization found with the given details.

USER_BLACKLISTED

Customer is blacklisted on PhonePe side

USER_DOESNOT_EXIST

Invalid user

BLOCKED_FRAUD

Could not complete transaction due to security reasons.

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