API Documentation

Time Tracking

Extended REST API
Clients
Projects
Tasks
People
Expenses
Expense Tracking
User Assignment
Task Assignment
Reports
Invoices
Invoice Messages
Invoice Payments
Invoice Categories


Questions?
Email support@getharvest.com

Invoice Payments

Important: this assumes invoice feature is enabled for your account.


Show all recorded payments for an invoice

GET /invoice/#{invoice_id}/payments

HTTP Response: 200 Success
<?xml version="1.0" encoding="UTF-8"?>
<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 /invoice/#{invoice_id}/payment/#{payment_id}

HTTP Response: 200 Success
<?xml version="1.0" encoding="UTF-8"?>
<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 /invoice/#{invoice_id}/payments

HTTP Response: 201 Created. Location: /invoice/#{new_id}/payments/#{newly_created_payment_id}

Sample post:

<?xml version="1.0" encoding="UTF-8"?>
<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 /invoice/#{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.