Capture the amount authorized for a transaction. The amount can be passed in case of partial capture.
Headers
Field Name | Mandatory | Description |
---|---|---|
|
| application/json |
|
| 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 |
---|---|---|---|
|
|
| Unique merchantId assigned to the merchant |
|
|
| amount, if passed, will override the amount sent in the authorize request to enable Partial Capture. |
|
|
| 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 |
---|---|---|
|
| Same as Request |
|
| PhonePe ReferenceId for an initiated Payment |
|
| Current state of the auth & capture transaction. For details, check the authState flow diagram below. |
|
| 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 |
---|---|
| Capture failed as the authorization for the given transaction is already canceled/expired. |
| Capture has already been initiated. Please check the status by calling transaction status API. |
Other Response Codes
Code | Description |
---|---|
| Your request has been successfully completed. |
| Invalid request payload |
| Value of X-VERIFY is incorrect |
| Something went wrong. Please call status and try again. |
| No Authorization found with the given details. |
| Customer is blacklisted on PhonePe side |
| Invalid user |
| Could not complete transaction due to security reasons. |