This API is to debit the amount from the user’s bank account.
Host Details
Environment | Value |
---|---|
UAT | https://api-preprod.phonepe.com/apis/pg-sandbox |
PROD | https://api.phonepe.com/apis/pg |
API Endpoint
/subscriptions/v2/redeem
Complete Host URL
Http Method: POST
Environment | Value |
---|---|
UAT | https://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/redeem |
PROD | https://api.phonepe.com/apis/pg/subscriptions/v2/redeem |
Request Details
Request Headers
Header Name | Header Value |
---|---|
Content-Type | application/json |
Authorization | O-Bearer <access_token> |
Note: access_token can be generated using the Auth Token API. Refer here
Request Parameters
Parameter Name | Data Type | Description | Mandatory (Yes/No) | Constraints |
merchantOrderId | STRING | Same merchantOrderId passed in corresponding Notify request | Yes | Max Length = 63 characters No Special characters allowed except underscore “_” and hyphen “-“ |
Sample Request Payload
{
"merchantOrderId": "MO12344"
}
Sample Response
{
"state" : "PENDING",
"transactionId": "OM1234"
}
Response Parameters
Field Name | Description |
---|---|
state | Order state. ● COMPLETED ● FAILED ● PENDING |
transactionId | PhonePe generated transaction Id |
Key Notes
- If paymentFlow.redemptionRetryStrategy is passed as CUSTOM in the Redemption Notify API, then merchants has to retry the redemption until you get COMPLETED/FAILED (Terminal Status) . Maximum Time window for getting the terminal status is 48 hours and Maximum of 10 retries are allowed.
- If paymentFlow.redemptionRetryStrategy is passed as STANDARD in the Redemption Notify API, then PhonePe will take care of the internal retires for redemption. Maximum Time window for getting the terminal status is 48 hours and these retries are handled by PhonePe internally.
- Default Value – STANDARD