We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to check if a user's subscription auto-renewal is active or not via API?

The information from the parameter auto_renew ​with the values true or false is available when you call the endpoint publisher/subscription/list and pass the subscription_id into the q parameter.

A sample request for US Production would look like this:

https://api.piano.io/api/v3/publisher/subscription/list?api_token=<api_token>&amp;aid=<aid>&amp;q=RCI5TSQDEABC&amp;offset=0&amp;limit=10

All available base URLs for Production are listed here.

And the response would contain the information about the state of the subscription's auto-renewal:

"subscriptions" : {
    "subscription_id" : "RCI5TSQDEABC",
    "auto_renew" : false,
    "next_bill_date" : 1609254620,
    "payment_method" : "Visa ending in 1111",
    "user_payment_info_id" : "PMF0ZZ481234",
    "upi_ext_customer_id" : "123",
    "upi_ext_customer_id_label" : "Payment provider ID",
    "billing_plan" : "$9.99 per month / free trial for 1 week",
    "end_date" : 1609234981,
    "cancelable" : false,
    "cancelable_and_refundadle" : false,
    "status" : "expired",
    "status_name" : "Expired",
    "status_name_in_reports" : "expired",
}

Last updated: