Capture Authorized Payment
This endpoint is used to collect the funds after a successful authorization. You can only call this API when the transaction state is AUTHORIZED. If it is in any other state (e.g., AUTHORIZATION_IN_PROGRESS, FAILED), it returns an INVALID_TRANSACTION_STATE error. Wait for the authorization webhook callback before calling this API. You may capture a partial amount (less than or equal to the authorized amount).
API Endpoint
| Environment | HTTP Method | API |
Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/capture |
Production | POST | https://api.phonepe.com/apis/pg/payments/v2/capture |
Request
Request Header
| Header Name | Header Value |
Content-Type | application/x-www-form-urlencoded |
Authorization | O-Bearer <merchant-auth-token> |
Sample Request
{
"merchantOrderId": "ORDER_123456",
"currency": "INR",
"amount": 10000
}Request Parameters
| Parameter Name | Type | Required | Description | Constraints |
merchantOrderId | String | Yes | Unique order identifier from merchant. | Max Length = 63 characters No Special characters are allowed except underscore “_” and hyphen “-“ |
currency | String | Yes | Payment currency. | Valid currency code (e.g., INR) |
amount | Long | Yes | Amount to capture (in smallest currency unit) | Min: 100 (in paise) |
Response
Sample Response
{
"orderId": "OMO2506...",
"state": "CAPTURE_IN_PROGRESS"
}| Parameter Name | Type | Description |
orderId | String | Payment Gateway generated internal order ID. |
state | String | Transaction state after capture request. |