Redemption via API
Once the mandate is active, the dashboard portion of the setup is complete. You will now use standard APIs to manage the actual billing cycles and the customer’s subscription lifecycle.
Using the Merchant Subscription ID retrieved from the dashboard, your system must execute the following flow for every billing cycle:
- Notify the Customer: Before deducting any funds, you must trigger a pre-debit notification API to alert the customer about the upcoming charge. For complete details, refer to the Notify Redemption.
- Verify Notification: You must then check the notification status API to confirm the customer successfully received the pre-debit alert. For complete details, refer to the Notification Status.
- Execute the Payment: Once the billing date arrives and the notification is confirmed, you trigger the redemption API to actually deduct the funds from the customer’s account. For complete details, refer to the Execute Redemption.
- Confirm Success: Finally, you check the redemption status API to ensure the transaction was successfully processed by the bank. For complete details, refer to the Redemption Order Status.
Beyond executing the billing cycle, you will also need to handle changes to the customer’s subscription status. You can use APIs to Cancel subscriptions when a user ends their service, or initiate Refunds for specific transactions if needed. Additionally, PhonePe will automatically send Webhook callbacks to your system if a customer chooses to Pause, Unpause, or completely Revoke their mandate directly from their banking app, allowing you to update their account access in real-time.