#Ji_net

1 messages · Page 1 of 1 (latest)

valid lightBOT
umbral dragon
#

Hey there

#

Taking a look

#

Yeah so I agree we should mark this as conditional, but the way credit notes work is that you can state the whole amount is out of band but then when you dictate the lines you need to dictate either the quantity or amount so it indicates how much of the credit note is applied to the line items themselves.

lost dew
#

the lines are optional, right!

#

I used to not passed them and I get an error

umbral dragon
#

My understanding is the lines are not optional (though I agree the API ref dictates it as an optional array of hashes). Let me double check on that

#

Alright yeah so this stuff should be marked as conditional, but really you have two paths:

  • you use invoice and lines
  • you use invoice, amount, and credit_amount
lost dew
#

hmmm, ok so I'll be using the first option since I need to pass the out_of_band_amount

#

another question please, in case the invoice item was created as a proration, I can't add the items with a negative amount in as line's amount when creating a credit note, should I pass only lines with positive amount?

umbral dragon
#

Yes I believe that is correct.

#

I've not tested that scenario before