I want to confirm that a customer subscription has been cancelled. The Stripe API documentation only refers to returning "active" subscription. How can I get a listing of all the subscriptions?
Listing subscriptions
You can see a list of the customer's active subscriptions.
GET https://api.stripe.com/v1/customers/{CUSTOMER_ID}/subscriptions
Retrieving a customer's subscription
By default, you can see the 10 most recent active subscriptions stored on a customer directly on the customer object, but you can also retrieve details about a specific active subscription for a customer.
GET https://api.stripe.com/v1/customers/{CUSTOMER_ID}/subscriptions/{SUBSCRIPTION_ID}
To reactivate the subscription, update the subscription, setting the value of cancel_at_period_end to false . This prevents the subscription from canceling at the end of the billing period. You can also use the Dashboard's Reactivate Subscription option.
You can cancel subscriptions through the API or in the Dashboard. Once you open the subscription, you can choose to Cancel subscription in the dropdown menu. When you click Cancel subscription... you will be able to choose when to end the subscription: immediately, at the end of the period, or on a custom day.
It's just people that didn't finish the checkout. Errors on payment. Some merchants have been worried by errors that appear in the logs when we're communicating with Stripe. These errors are normal and are Stripe's way of responding to bad data like misspelled emails or when the card couldn't be charged.
To your actual question, to find any active subscriptions on that customer, you can look at the subscriptions property on the customer response (https://stripe.com/docs/api#customer_object).
As of the 7/06/16 API update:
You can now view canceled subscriptions by specifying status=canceled or status=all when listing subscriptions. In addition, you can now retrieve a canceled subscription by its ID.
https://stripe.com/docs/upgrades#api-changelog
So if you're using the ruby API, for example, you should be able to fetch canceled subscriptions like this:
Stripe::Subscription.all(status: 'canceled')
And get a list of all subscriptions, as you ask for above, like this:
Stripe::Subscription.all(status: 'all')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With