Cancel Subscription


Use the Cancel Subscription API to deactivate an active autopay subscription that is no longer required. This ensures that no further automatic payments are processed. Once canceled, the subscription is terminated and will not trigger any future charges.

EnvironmentHTTP MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/subscriptions/v2/{merchantSubscriptionId}/cancel
ProductionPOSThttps://api.phonepe.com/apis/pg/subscriptions/v2/{merchantSubscriptionId}/cancel
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>
Path Parameter
Parameter NameDescription
merchantSubscriptionIdA unique merchant subscription ID provided by the merchant at the time of subscription creation.

Once the Cancel API is executed, a 204 No Content response is returned, indicating that the subscription cancellation request was successfully processed. This means the subscription is now inactive and no further payments will be triggered. To confirm the cancellation and view the updated state, you can use the Subscription Status API, which will return the current status of the subscription (e.g., state: cancelled).

headers
body params

You can also test this API request directly in Postman for a quick and easy integration check.

We’ve seen how a subscription can be cancelled. Next, we’ll explore how the subscription can be revoked.

Head over to the next section to learn how to revoke the cancelled subscription.

Is this article helpful?