#volco
1 messages · Page 1 of 1 (latest)
Hi, it looks like you could use the Search invoices API, https://stripe.com/docs/api/invoices/search and query by the Subscription Id, https://stripe.com/docs/search#query-fields-for-invoices and the status of the invoice.
Are you able to try this?
yes that worked thanks for pointing that out. I didn't consider using search because our api version was too old to support it. Is there any particular reason the normal /invoices/ endpoint isn't designed to support canceled subscriptions?
And as I under the search query language there is no 'IN' or list operator so to query multiple strings, it would have to be a series of ORs
Are you saying that when listing all invoices, https://stripe.com/docs/api/invoices/list#list_invoices-collection_method you're not seeing the invoices on the subscirption passed, https://stripe.com/docs/api/invoices/list#list_invoices-subscription?
It looks to be working for me.
You can combine multiple queries with either separating them with a space, or using the AND or OR keywords, https://stripe.com/docs/search#query-structure-and-terminology. IN is not supported
When passing in a subscription id to that api endpoint, if that subscription id belongs to a subscription that is cancelled, then an error is given saying "No such subscription"
But I will use the query method instead to get around that limitation, thanks for your help