#Laith-refund

1 messages · Page 1 of 1 (latest)

radiant sinew
#

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?

deep pasture
#

ChargeDesk is making this Stripe request POST /v1/credit_notes

#

and it is giving a 400

radiant sinew
#

Thanks. Can you share that request ID?

#

It looks like req_xxxxx

deep pasture
#

req_ALjn3Cw9EDdD2Q

radiant sinew
#

Thanks, taking a look

deep pasture
#

thank you

radiant sinew
#

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

deep pasture
#

alright thank you and please let me know

opaque yacht
#

Hi 👋 I"m stepping in for bismark. Sorry for the delay, I'm still reviewing this.

deep pasture
#

thanks

opaque yacht
#

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

deep pasture
#

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",
}
}
}

opaque yacht
#

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

deep pasture
#

okay so just

#
{
  "invoice": "in_1LIxZbL7UCpB2Xo4dmYGctX4",
  "lines": {
    "0": {
      "type": "custom_line_item",
      "amount": "7971",
    }
  }
}
opaque yacht
#

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