Admin permissions required.

The invoice payment object

Attribute Type Description
id integer Unique ID for the payment.
amount string The amount of the payment.
paid_at datetime Date and time the payment was made.
recorded_by string The name of the person who recorded the payment.
recorded_by_email string The email of the person who recorded the payment.
notes string Any notes associated with the payment.
transaction_id string Either the card authorization or PayPal transaction ID.
payment_gateway object The payment gateway id and name used to process the payment.
created_at datetime Date and time the payment was recorded.
updated_at datetime Date and time the payment was last updated.

List all payments for an invoice

Returns a list of payments associate with a given invoice. The payments are returned sorted by creation date, with the most recently created payments appearing first.

The response contains an object with an invoice_payments property that contains an array of up to per_page payments. Each entry in the array is a separate payment object. If no more payments are available, the resulting array will be empty. Several additional pagination properties are included in the response to simplify paginating your payments.

GET /v2/invoices/{INVOICE_ID}/payments
Parameter Type Description
updated_since datetime Only return invoice payments that have been updated since the given date and time.
page integer The page number to use in pagination. For instance, if you make a list request and receive 100 records, your subsequent call can include page=2 to retrieve the next page of the list. (Default: 1)
per_page integer The number of records to return per page. Can range between 1 and 100. (Default: 100)

Example Request:

curl "https://api.harvestapp.com/v2/invoices/13150378/payments" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)"

Example Response:

{
"invoice_payments": [
{
"id": 10112854,
"amount": 10700,
"paid_at": "2017-02-21T00:00:00Z",
"recorded_by": "Alice Doe",
"recorded_by_email": "alice@example.com",
"notes": "Paid via check #4321",
"transaction_id": null,
"created_at": "2017-06-27T16:24:57Z",
"updated_at": "2017-06-27T16:24:57Z",
"payment_gateway": {
"id": 1234,
"name": "Linkpoint International"
}
}
],
"per_page": 100,
"total_pages": 1,
"total_entries": 1,
"next_page": null,
"previous_page": null,
"page": 1,
"links": {
"first": "https://api.harvestapp.com/v2/invoices/13150378/payments?page=1&per_page=100",
"next": null,
"previous": null,
"last": "https://api.harvestapp.com/v2/invoices/13150378/payments?page=1&per_page=100"
}
}

Create an invoice payment

Creates a new invoice payment object. Returns an invoice payment object and a 201 Created response code if the call succeeded.

POST /v2/invoices/{INVOICE_ID}/payments
Parameter Type Required Description
amount decimal required The amount of the payment.
paid_at datetime optional Date and time the payment was made.
notes string optional Any notes to be associated with the payment.

Example Request:

curl "https://api.harvestapp.com/v2/invoices/13150378/payments" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"amount":"1575.86","paid_at":"2017-07-24T13:32:18Z","notes":"Paid by phone"}'

Example Response:

{
"id": 10336386,
"amount": 1575.86,
"paid_at": "2017-07-24T13:32:18Z",
"recorded_by": "Jane Bar",
"recorded_by_email": "jane@example.com",
"notes": "Paid by phone",
"transaction_id": null,
"created_at": "2017-07-28T14:42:44Z",
"updated_at": "2017-07-28T14:42:44Z",
"payment_gateway": {
"id": null,
"name": null
}
}

Delete an invoice payment

Delete an invoice payment. Returns a 200 OK response code if the call succeeded.

DELETE /v2/invoices/{INVOICE_ID}/payments/{PAYMENT_ID}

Example Request:

curl "https://api.harvestapp.com/v2/invoices/13150378/payments/10336386" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Harvest-Account-Id: $ACCOUNT_ID" \
  -H "User-Agent: MyApp (yourname@example.com)" \
  -X DELETE