#elianbraja
1 messages · Page 1 of 1 (latest)
hi! you can use https://stripe.com/docs/api/invoices/list and pass subscription and status. If you want invoice with either of those statuses, you have to do two separate sets of list calls for each status, and unify the result in your code
but can't I just make one call to get my data?
no
and if I want to search for invoice with status paid?
on the search call I don't see any way to pass status
you can use the approach I described
as you say, the Search endpoint doesn't take a status, so you'd need to use the approach I described.
ok thanks
I had another question
can I make a subscription charge manually without waiting for the billing cycle to end?
not easily, no. You can create a new one-off invoice at any point to charge the customer : https://stripe.com/docs/billing/invoices/subscription#generating-invoices or you could reset the billing cycle : https://stripe.com/docs/billing/subscriptions/billing-cycle#changing , really it depends what you're trying to do
I want to test automatic collection
with different types of default cards of customer
HI there 👋 I'm jumping in as my teammate needs to step away soon. If you want to test subscription renewal behavior, then I would suggest using our Test Clocks feature. They allow you to create Subscriptions in a sandbox where you can advance time forcing the Subscription to move to new periods quickly.
https://stripe.com/docs/billing/testing/test-clocks
Ok thank you. I also wanted to ask. Currently I want my customers to be able to switch from a monthly subscription to an annual one. How can I preview a subscription update?
You can use this endpoint to retrieve a preview of an upcoming invoice, and when you do when you can pass in different values to simulate what the next invoice would like if you were updating the Subscription:
https://stripe.com/docs/api/invoices/upcoming
This guide helps show how to use that endpoint from the context of previewing proration charges for an update:
https://stripe.com/docs/billing/subscriptions/prorations#preview-proration