#dragonlord_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1354111736747261962
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
https://docs.stripe.com/api/invoices/list
So I can see I can filter by a subscription but lets say I want to filter by product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Not possible unfortunately and it looks like the search API cannot do this either. One workaround could be to set metadata along with your items and then use the search API to list invoices with that metadata https://docs.stripe.com/search#query-fields-for-invoices
okay will try that and if I have any issues I will open another ticket thank you for this
\Stripe\Checkout\Session::create([
can I add invoice metadata in this call?
Indeed you can! The create session call has an invoice_data.metadata parameter that will pass what you set there to the invoice that is created https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-invoice_creation-invoice_data
Note that only works for one-time payments. For subscriptions there isn't a way to do it from the Checkout Session so you need to listen to webhook events and copy over metadata via API calls
https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_thresholds
one last question for the billing_thresholds for creating subscription is that in cents or dollars?
Do I have to pass 20 or 2000, for 20 dollars
For dollar currencies, our amounts are in cents, so you would provide 2000
Basically any currency outside of our zero decimal ones you will be working in cents https://docs.stripe.com/currencies#zero-decimal
thank you