API Documentation
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
Overview
Time Tracking
Extended REST API
Clients
Client Contacts
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories
Questions? Contact support
Invoice Payments
Important: this assumes invoice feature is enabled for your account.
Show all recorded payments for an invoice
GET /invoices/#{invoice_id}/payments
HTTP Response: 200 Success
<payments type="array"> <payment> <amount type="decimal">1238.0</amount> <created-at type="datetime">2008-02-14T19:36:52Z</created-at> <id type="integer">1334</id> <invoice-id type="integer">4393</invoice-id> <notes>check</notes> <paid-at type="datetime">2008-02-14T00:00:00Z</paid-at> <recorded-by>Happy Owner</recorded-by> <recorded-by-email>happy@owner.com</recorded-by-email> </payment> </payments>
Show a particular payment
GET /invoices/#{invoice_id}/payment/#{payment_id}
HTTP Response: 200 Success
<payment> <amount type="decimal">52000.0</amount> <created-at type="datetime">2008-03-13T11:29:18Z</created-at> <id type="integer">54664</id> <invoice-id type="integer">2393</invoice-id> <notes>Finally.</notes> <paid-at type="datetime">2008-02-14T00:00:00Z</paid-at> <recorded-by>Happy Owner</recorded-by> <recorded-by-email>happy@owner.com</recorded-by-email> </payment>
Create a new payment
POST /invoices/#{invoice_id}/payments
HTTP Response: 201 Created.
Location: /invoice/#{new_id}/payments/#{newly_created_payment_id}
Sample post:
<payment> <!-- required --> <paid-at type="datetime">2008-02-14T00:00:00Z</paid-at> <!-- required --> <amount type="decimal">52000.0</amount> <notes>Some optional notes go here</notes> </payment>
Payment related invoice attributes like due-amount will be updated. Invoice status will be set to paid if no amount is left due.
Delete existing payment
DELETE /invoices/#{invoice_id}/payments/#{payment_id}
HTTP Response: 200 OK.
Payment related invoice attributes like due-amount will be updated. Invoice status will be set to paid if no amount is left due.