#arggh-API
1 messages · Page 1 of 1 (latest)
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Sure, req_azPuAXjLkQKpTk
And can you also share with me the doc link?
The explanation talks about custom line items, but the code example uses invoice_line_item, and the code example doesn't work.
Thanks. Based on the log, you are passing lines as a object instead of an array. can you show me the code?
stripeCreditNote = await stripe.creditNotes.create({
invoice: stripeInvoiceId,
lines: [
{
type: 'invoice_line_item',
description,
quantity: 1,
unit_amount: Math.abs(amount)
}
]
});
EDIT: I changed the type to match the logged request
Probably some parsing happens in your API before the request gets logged. Or then Stripe's npm package has a bug.
My actual problem is related, I would be very happy to receive help for that. We are (apparently) using Stripe Tax. When I try to apply a Credit Note to an invoice, using custom_line_item, we get StripeInvalidRequestError: Custom line items are not supported for invoices with automatic_tax.enabled = true.
Our use case: we want to reduce arbitrary amounts from customers’ invoices. Example:
Fee 20$
Fee 25$
Fee adjustment -5$
Fee adjustment -2$
-------------------
Total 38$
or...
Fee 20$
Fee adjustment -25$
-------------------
Credit balance adjusted +5$
What is the correct way to achieve this? We are adjusting the invoices based on webhook calls before they are finalized.
Ah, you are right! our doc is wrong, it should be custom_line_item instead of invoice_line_item
Yep 👍
Thanks for the feedback! I'll tell the team to get it fix soon.
@tight latch sent a new message as I thought you either missed the question or that there's "one thread per issue" policy, but happy to address it here.
Sorry the waiting, discord is quite busy today
Can you share with me the request ID of which you specified the custom_line_item ?
req_464QdByhHyNmyA
I don't have a direct solution for this. The best I think about is to give customer credit balance to offset the next invoice (https://stripe.com/docs/invoicing/customer/balance)
Thanks. I believe this method has no way to tell customer where the balance/refund came from, like having a line item on the invoice does?
Also, if we remove automatic tax calculation, Credit Notes is the answer, am I correct?
You can put a internal note when creating a credit balance, but it's not visible to the customer.
I'm sure there is a valid reasoning for all this, but sure does seem like a random restriction that's preventing us from doing something trivial.
automatic tax = can't do many things you thought you could, only to find out after you have implemented 95% of the solution.
(as feedback)
Thanks for the feedback. Can I trouble to write in to Stripe support https://support.stripe.com/contact so that we can pass along your feedback to the relevant team?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.