#Syafiq Idrus
1 messages · Page 1 of 1 (latest)
Hi there, it'll continue with the existing subscriptions and invoices.
How do i end all subs that are under the archived prices?
You can call this API (https://stripe.com/docs/api/subscriptions/list#list_subscriptions-price) to filter for subscriptions that contain this recurring price ID, and call this API (https://stripe.com/docs/api/subscriptions/cancel#cancel_subscription) to cancel them one by one
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Noted, so theres no way to run this from the dashboard then
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
I do have a followup question regarding prices and architecture
What would be the best way to integrate product categories? Right now, we are storing the categories on our backend alongside the relations between products and categories. And to retrieve the details of all the price, I would then call Stripe's list of prices API, passing in the list of ids.
Is that the correct way to go about this, or would there be a simpler approach?
You can also store category in product's metadatas:
https://stripe.com/docs/api/products/create#create_product-metadata
My initial idea was to store the category in the metadata, but then thought it would be difficult to query it using this api and through Strips's query languagehttps://stripe.com/docs/api/products/search
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What is the general response time for the search api given a simple or complex query? The documentation states "under a minute", but do you have a better guestimation?
Or would this api
https://stripe.com/docs/api/products/list#list_products-ids
be quicker?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Nope.
This API is just for quering by ids and not by metadatas.
Yes, and i would retrieve the list of IDs from our own database
Im wondering, in terms of performance on a first glance, which would be faster
I invite you test honestly. but I thinkg listing by ids is more faster than doing search queris.