Execute Redemption
The Redemption API is used to debit the payment from the user’s bank account as part of a recurring subscription. This process is initiated after the Notify step has been completed and serves as the actual payment transaction. By calling this API, the merchant requests the system to initiate the payment transfer to process the required amount from the user’s account.
📘 Check Subscription Status Before Execution!
Before calling the Execute API, you must first verify that the subscription state is ACTIVE by using the Subscription Status API. This ensures that the transaction proceeds without any issues or failures.
Environment
| Environment | HTTP Method | API |
| Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/redeem |
| Production | POST | https://api.phonepe.com/apis/pg/subscriptions/v2/redeem |
Request
Request Headers
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <partner-auth-token> |
| X-MERCHANT-ID | MID |
Sample Request
{
"merchantOrderId": "MO12344",
"customerDetails": { //this is for Automated Email Notifications
"name": "John Doe",
"email": "[email protected]",
"phoneNumber": "9999999999"
}
}Request Parameters
| Parameter Name | Data Type | Description | Mandatory (Yes/No) | Constraints |
| String | Pass the same merchantOrderId used in the Notify request. | Yes | • Maximum length is 63 characters. • Only underscore (_) and hyphen (-) are allowed as special characters. |
⚠️ Redemption Handling Alert!
- Custom:
- If paymentFlow.redemptionRetryStrategy is set to CUSTOM, merchants are required to retry the redemption until a terminal status (COMPLETED or FAILED) is achieved. The maximum time window to get a terminal status is by default 48 hours, and a maximum of 4 tries (1 attempt + 3 retries) are allowed.
- +Subsequent redemption retry attempts must be separated by a minimum interval of 1.5 hours, following a terminal state for a previous attempt.
- Note: No further retries will be executed once the transaction status is marked as completed.+_
- Standard:
- If paymentFlow.redemptionRetryStrategy is set to STANDARD, PhonePe will handle the internal retries for redemption. The maximum time window to get a terminal status is by default 48 hours, and retries are managed by PhonePe internally.
- Default Value: STANDARD.
Response
Sample Response
{
"state" : "PENDING",
"transactionId": "OM1234"
}Response Parameters
| Parameter Name | Description |
| Indicates the current status of the order. Possible values: COMPLETED, FAILED, or PENDING. |
transactionId | Transaction ID generated by PhonePe. |