#nstripe0_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/1333605872869445758
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- nstripe0_api, 16 hours ago, 6 messages
- nstripe0_api, 5 days ago, 11 messages
I'm looking at the API docs for updating an invoice here: https://docs.stripe.com/api/invoices/update
My prior conversation with another Stripe dev suggested to specify an empty array for the coupons to remove the coupons no longer applicable to the invoice.
This does not seem to work, or our understanding of how to do this was incorrect. Is it even possible? If so, how can this action (removing coupon from invoice) be done?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Could you try to pass an empty string to the discounts parameter?
Wouldn't that remove all discounts?
If there are two coupons, and I need to remove one of them, how can I specify that?
The docs here seem to imply this may be for adding discounts, but not modifying existing ones or removing them (perhaps besides removing all).
Ah I see, 1 min
Well then you can remove the coupon you want, inside the discounts array. That array contains a list of applying "discount", which represent coupon
So using the discounts.discount to specify the ones the invoice should have.
- If there is A and B and I just want to keep B, specify that discount ID there.
- If there is A and B and I don't want any, perhaps then specify the empty string.
Yeah
Will give that a try...
FYI, passing empty string to disounts.discount results in "Invalid array" error (req_QS6xeDfay4lnbQ)
You want to pass direct to discounts
Ah, ok