GET /api/credit-note-payments
<?xml version="1.0" encoding="UTF-8"?> <credit-note-payments type="array" page="1" per_page="100" total="2"> <credit-note-payment> ... <credit-note-payment> <credit-note-payment> ... <credit-note-payment> </credit-note-payments>
GET /api/credit-note-payments?credit_note_id=123
List all payments for the credit note with ID 123.
The following filter parameters are available:
Parameter | Description |
---|---|
credit_note_id | ID of the credit note |
from | Only payments since this date (format YYYY-MM-DD) |
to | Only payments up to this date (format YYYY-MM-DD) |
type | Payment type (eg. CASH, BANK_TRANSFER, PAYPAL, …). More than one payment type could be given as a comma separated list. Theses payment types will be logically OR-connected. |
user_id | ID of the user |
GET /api/credit-note-payments/{id}
<?xml version="1.0" encoding="UTF-8"?> <credit-note-payment> <id type="integer">1</id> <created type="datetime">2007-12-13T12:12:00+01:00</created> <credit_note-id type="integer">1</credit_note-id> <user_id type="integer">1</user_id> <date type="date">2009-11-04</date> <amount type="float">12.34</amount> <comment>via bank transfer</comment> <transaction_purpose></transaction_purpose> <type>BANK_TRANSFER</type> </credit-note-payment>
type can have the following values:
– CREDIT_NOTE
– BANK_TRANSFER
– DEBIT
– CASH
– PAYPAL
– CREDIT_CARD
– MISC
POST /api/credit-note-payments
Payments can only be booked for invoices in the state OPEN or overdue.
XML element | Description | Type | Default value | Mandatory |
---|---|---|---|---|
credit_note_id | ID of the credit note | INT | yes | |
date | Date of payment | DATE | today | |
amount | Paid amount | FLOAT | yes | |
comment | Comment text | ALNUM | ||
type | Payment type | ALNUM (“CREDIT_NOTE”, “BANK_TRANSFER”, “DEBIT”, “CASH”, “PAYPAL”, “CREDIT_CARD”, “MISC”) | ||
mark_credit_note_as_paid | Indicates whether the associated invoice should be marked as paid (set status to PAID). | BOOL | 0 (false) |
<credit-note-payment> <credit_note-id>1</credit_note-id> <date>2009-11-03</date> <amount>12.34</amount> <comment>via bank transfer</comment> <type>BANK_TRANSFER</type> </credit-note-payment>
<?xml version="1.0" encoding="UTF-8"?> <credit-note-payment> <id type="integer">1</id> <created type="datetime">2007-12-13T12:12:00+01:00</created> <credit_note-id type="integer">1</credit_note-id> <user_id type="integer">1</user_id> <date type="date">2009-11-03</date> <amount type="float">12.34</amount> <comment>via bank transfer</comment> <transaction_purpose></transaction_purpose> <type>BANK_TRANSFER</type> </credit-note-payment>
DELETE /api/credit-note-payments/{id}
Deletes a payment and set its status to OPEN or OVERDUE.