Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Subscriptions
English French
English French

How to cancel a subscription via API?

In order to cancel a subscription via API, you will need to use the endpoint /publisher/subscription/cancel.

Below is an example request, which would also refund the last payment of the user's subscription:

https://api.piano.io/api/v3/publisher/subscription/cancel?aid=<AID>&amp;subscription_id=<subscription_ID>&amp;refund_last_payment=true&amp;api_token=<API_token>

More information about this endpoint is available here.

If you would like to cancel subscriptions in bulk, you will need to iterate through the list of subscriptions you want to cancel.

Last updated: