#Codex - connect CreditNote to refund

1 messages · Page 1 of 1 (latest)

oak ravine
#

Hello, when you say it requires an integer quantity, are you seeing that in an error message somewhere?

bold stream
#

Yes, the message I get is: Request req_eE1jVVWDESgB34: quantityoramount is required when crediting an invoice line item.

#

In this case I would always have to use the quantity value?

oak ravine
#

Looking in to if there is a way to make this call without passing that param

bold stream
#

Thank you. Yes I am wondering if the refund ID is already enough?

oak ravine
#

It should be enough to make the call. It looks like the lines parameter itself is optional. Have you tried making the call without it?

bold stream
#

Hello, I tried without the lines parameter but it gave an error that it was required. So I tried with lines=[] just empty and it works for full refunds

#

However, for partial refunds, I get this error: Request req_65FEzRUvcuFSUr: The sum of credit amount, refund amount and out of band amount ($3.00) must equal the credit note amount ($2.40).

#

I inputted $3 to refund for that partial refund

oak ravine
#

Gotcha. Checking in to that error. Also I will make sure to file something about updating that section of the doc to reflect which fields are actually required vs not

bold stream
#

Thank you. I do find myself confused with the needed parameters for properly issuing a credit note attached to a full refund vs. a partial refund

oak ravine
#

Still trying to figure this out. For reference, is the line item that you are refunding worth $2.40?

bold stream
#

No,the whole invoice is for around $20

#

But I just set the amount for the refund api to $3

oak ravine
#

Hey huge apologies, I dropped off this thread when the server got a bit busy and am still having trouble figuring out the proper way to make this call. I am reaching out to my colleagues now for advice and will get back to you with what we can find

bold stream
#

Thank you

oak ravine
#

Can you tell me more about what you are trying to do here? I see that you were able to create a credit note like this while passing in quantity instead of amount but I am unclear on how that may not line up with what you are trying to do.

bold stream
#

Yes, If I pass in quantity that line up with the subscription quantity, the credit note works as intended

#

However, for partial refunds, where there is no quantity, but any amount that I can choose to return to the customer. Is there a way I can issue a credit note for a partial refund of any amount?

terse umbra
#

👋 catching up on this, sorry for the wait!

neon verge
#

Going to jump in here, so roadrunner can work on the other active threads. @bold stream for the last request you posted I think the issue has to do with the currency conversion.