Payments

List all pay­ments of an invoice

GET /api/invoice-payments?invoice_id={invoice_id}

Pay­ments can only be retur­ned for a par­ti­cu­lar invoice.
The­re­fore invoice_id is a man­datory parameter.

<?xml version="1.0" encoding="UTF-8"?>
<invoice-payments type="array">
    <invoice-payment>
        ...
    <invoice-payment>
    <invoice-payment>
        ...
    <invoice-payment>
</invoice-payments>

Get sin­gle payment

GET /api/invoice-payments/{id}
<?xml version="1.0" encoding="UTF-8"?>
<invoice-payment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <invoice_id type="integer">1</invoice_id>
    <date type="date">2009-11-04</date>
    <amount type="float">12.34</amount>
    <comment>via bank transfer</comment>
    <type>BANK_TRANSFER</type>
</invoice-payment>

type can have the fol­lo­wing values:

  • CREDIT_NOTE
  • BANK_CARD
  • BANK_TRANSFER
  • DEBIT
  • CASH
  • PAYPAL
  • CREDIT_CARD
  • COUPON
  • MISC

Create pay­ment

POST /api/invoice-payments

Pay­ments can only be booked for invoices in the state OPEN or overdue.

XML ele­ment Descrip­tion Type Default value Man­datory
invoice_id ID of the invoice INT yes
date Date of payment DATE today
amount Payed ammount FLOAT yes
com­ment Com­ment text ALNUM
type Pay­ment type ALNUM (“CREDIT_NOTE”, “BANK_CARD”, “BANK_TRANSFER”, “DEBIT”, “CASH”, “PAYPAL”, “CREDIT_CARD”, “COUPON”, “MISC”)
mark_invoice_as_paid Indi­ca­tes whe­ther the asso­cia­ted invoice should be mar­ked as paid (set sta­tus to PAID). BOOL 0 (false)
<invoice-payment>
    <invoice_id>1</invoice_id>
    <date>2009-11-03</date>
    <amount>12.34</amount>
    <comment>via bank transfer</comment>
</invoice-payment>
<?xml version="1.0" encoding="UTF-8"?>
<invoice-payment>
    <id type="integer">1</id>
    <created type="datetime">2007-12-13T12:12:00+01:00</created>
    <invoice_id type="integer">1</invoice_id>
    <date type="date">2009-11-03</date>
    <amount type="float">12.34</amount>
    <comment>via bank transfer</comment>
</invoice-payment>

Delete pay­ment

DELETE /api/invoice-payments/{id}

Dele­tes a pay­ment and set its sta­tus to OPEN or OVERDUE.