#Laith-refund
1 messages · Page 1 of 1 (latest)
Hi there! I'm not too familiar with ChargeDesk. Are they a plugin? That looks to be an error that ChargeDesk is throwing, but do you have a request ID in your Stripe Dashboard for an error when you try to create a refund?
ChargeDesk is making this Stripe request POST /v1/credit_notes
and it is giving a 400
req_ALjn3Cw9EDdD2Q
Thanks, taking a look
thank you
So pretty sure the issue here is that ChargeDesk is passing invoice_line_item in the request. That specific line item that they are referencing is only for the $74.95, as that line item does not include tax.
I think that ChargeDesk would have to use a custom_line_item here instead
But let me double check with a colleague on that to make sure that is the best solution
alright thank you and please let me know
Hi 👋 I"m stepping in for bismark. Sorry for the delay, I'm still reviewing this.
thanks
Okay, first approach that a colleague has successfully tested. Specify the type as custom_line_item. This will allow you to credit the full amount.
If you make the credit note for the specific invoice item, you use the amount before taxes and Stripe will handle adding the tax for the full amount
So would it be the same body but with type pf custom_line_item
so like this
{
"invoice": "in_1LIxZbL7UCpB2Xo4dmYGctX4",
"lines": {
"0": {
"type": "custom_line_item",
"amount": "7971",
"invoice_line_item": "sli_15f2b1L7UCpB2Xo446d60c7c",
}
}
}
No invoice_line_item ID
If you are using custom line items then the credit note doesn't have the relationship back to the original line item
okay so just
{
"invoice": "in_1LIxZbL7UCpB2Xo4dmYGctX4",
"lines": {
"0": {
"type": "custom_line_item",
"amount": "7971",
}
}
}
Or you could adjust the amount to the pre-tax amount, include the invoice_line_item ID, and Stripe will handle calculating the tax to be added