What is the difference between credit and debit notes?

Dear All,
I want to inquire about the difference between credit and debit notes. ,
Does any of these notes mean a refund of the invoice ??

I appreciate your help…

credit note … like a refund
debit note … like an invoice

but both must be issued against document

Hi,
Here is a simple explanation,

You have an invoice of 100 SAR but there is adjustment is required in this which can be plus or minus. To make plus adjustment like adding 20 you need debit note but to reduce 20 and make it 80 you need credit note so both need a parent invoice againt which adjustment is required. thanks

Where i should put the original invoice in credit/debit note invoice XML?

@Alattar Please refer the Debit and Credit notes samples in SDK