API Documentation

API Endpoint

Payments

Payments

Supported filter params

  • invoice_id (array)

  • company_id (array)

  • project_id (array)

  • paid_after

  • paid_before

  • subsidiary_id (array)

Supported sort params

Supported aggregates params

  • total_amount

Filter operations are supported on this endpoint.

GET /api/v2/payments
Requestsreturns payments

GET  /api/v2/payments

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "2",
      "type": "payments",
      "attributes": {
        "paid_on": "2021-04-15",
        "written_off_on": null,
        "note": null,
        "external_id": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 10000,
        "amount_default": 12500,
        "amount_normalized": 10000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 472
          }
        },
        "invoice": {
          "data": {
            "type": "invoices",
            "id": "53"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "53",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": "2021-04-15",
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "d010d51fabfba027c58ed332eee1e8f6",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:25.992+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:26.007+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 0,
        "amount_default": 0,
        "amount_normalized": 0,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 0,
        "amount_with_tax_default": 0,
        "amount_with_tax_normalized": 0,
        "amount_paid": 10000,
        "amount_paid_default": 12500,
        "amount_paid_normalized": 10000,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": -10000,
        "amount_unpaid_default": -12500,
        "amount_unpaid_normalized": -10000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 472
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1744"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1249"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "1744",
      "type": "companies",
      "attributes": {
        "name": "Client1273",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:25.987+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 472
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "1249",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1234@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:26.000+02:00",
        "last_seen_at": "2021-04-15T01:04:26.022+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 1264,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:25.966+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 472
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1743"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1743",
      "type": "companies",
      "attributes": {
        "name": "Organization472",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:25.964+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 472
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/payments?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/payments?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Get payments
GET/api/v2/payments


GET /api/v2/payments/1
Requestsreturns payment

GET  /api/v2/payments/3

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "3",
    "type": "payments",
    "attributes": {
      "paid_on": "2021-04-15",
      "written_off_on": null,
      "note": null,
      "external_id": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "amount": 10000,
      "amount_default": 12500,
      "amount_normalized": 10000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 473
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "54"
        }
      }
    }
  },
  "included": [
    {
      "id": "54",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": "2021-04-15",
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "7f68b83689d1fa85179eab29f0177ccf",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:26.119+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:26.133+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 0,
        "amount_default": 0,
        "amount_normalized": 0,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 0,
        "amount_with_tax_default": 0,
        "amount_with_tax_normalized": 0,
        "amount_paid": 10000,
        "amount_paid_default": 12500,
        "amount_paid_normalized": 10000,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": -10000,
        "amount_unpaid_default": -12500,
        "amount_unpaid_normalized": -10000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 473
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1746"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1250"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "1746",
      "type": "companies",
      "attributes": {
        "name": "Client1274",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:26.114+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 473
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "1250",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1235@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:26.000+02:00",
        "last_seen_at": "2021-04-15T01:04:26.146+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 1265,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:26.093+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 473
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1745"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1745",
      "type": "companies",
      "attributes": {
        "name": "Organization473",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:26.092+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 473
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

Gets a payment
GET/api/v2/payments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

payment id


POST /api/v2/payments
Requestscreates paymentreturns error

POST  /api/v2/payments

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "payments",
    "attributes": {
      "amount": 10000,
      "paid_on": "2021-04-15"
    },
    "relationships": {
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "55"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5",
    "type": "payments",
    "attributes": {
      "paid_on": "2021-04-15",
      "written_off_on": null,
      "note": null,
      "external_id": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "amount": 10000,
      "amount_default": 12500,
      "amount_normalized": 10000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 474
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "55"
        }
      }
    }
  },
  "included": [
    {
      "id": "55",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": "2021-04-15",
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "44e5a8803c84f9beb633e94a5d22b364",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:26.240+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:26.282+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 0,
        "amount_default": 0,
        "amount_normalized": 0,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 0,
        "amount_with_tax_default": 0,
        "amount_with_tax_normalized": 0,
        "amount_paid": 20000,
        "amount_paid_default": 25000,
        "amount_paid_normalized": 20000,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": -20000,
        "amount_unpaid_default": -25000,
        "amount_unpaid_normalized": -20000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 474
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1748"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1251"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "1748",
      "type": "companies",
      "attributes": {
        "name": "Client1275",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:26.234+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 474
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "1251",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1236@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:26.000+02:00",
        "last_seen_at": "2021-04-15T01:04:26.267+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 1266,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:26.212+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 474
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1747"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1747",
      "type": "companies",
      "attributes": {
        "name": "Organization474",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:26.211+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 474
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

POST  /api/v2/payments

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "payments",
    "attributes": {
      "amount": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/invoice"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/amount"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/paid_on"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/paid_on"
      }
    }
  ]
}

Create a payment
POST/api/v2/payments

URI Parameters
HideShow
invoice_id
number (required) Example: 1

invoice id

amount
number (required) Example: 100

ammount

paid_on
date (required) Example: 2018-01-01

paid on


PATCH /api/v2/payments/1
Requestsupdates paymentreturns error

PATCH  /api/v2/payments/8

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "payments",
    "attributes": {
      "amount": 2000
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "8",
    "type": "payments",
    "attributes": {
      "paid_on": "2021-04-15",
      "written_off_on": null,
      "note": null,
      "external_id": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "amount": 2000,
      "amount_default": 2500,
      "amount_normalized": 2000
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 477
        }
      },
      "invoice": {
        "data": {
          "type": "invoices",
          "id": "58"
        }
      }
    }
  },
  "included": [
    {
      "id": "58",
      "type": "invoices",
      "attributes": {
        "number": "2016/01",
        "subject": null,
        "invoiced_on": "2021-04-15",
        "sent_on": null,
        "pay_on": "2021-04-25",
        "delivery_on": null,
        "paid_on": "2021-04-15",
        "discount": null,
        "tax1_name": null,
        "tax1_value": null,
        "tax2_name": null,
        "tax2_value": null,
        "deleted_at": null,
        "tag_list": [],
        "note": null,
        "exported_at": null,
        "export_integration_type_id": null,
        "note_interpolated": null,
        "email_key": "5fa7e662ff11b2de029e81d6770aec30",
        "purchase_order_number": null,
        "export_invoice_url": null,
        "company_reference_id": null,
        "created_at": "2021-04-15T01:04:26.551+02:00",
        "exchange_rate": "1.25",
        "exchange_date": "2021-04-15",
        "custom_fields": null,
        "updated_at": "2021-04-15T01:04:26.590+02:00",
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 0,
        "amount_default": 0,
        "amount_normalized": 0,
        "amount_tax": 0,
        "amount_tax_default": 0,
        "amount_tax_normalized": 0,
        "amount_with_tax": 0,
        "amount_with_tax_default": 0,
        "amount_with_tax_normalized": 0,
        "amount_paid": 2000,
        "amount_paid_default": 2500,
        "amount_paid_normalized": 2000,
        "amount_written_off": 0,
        "amount_written_off_default": 0,
        "amount_written_off_normalized": 0,
        "amount_unpaid": -2000,
        "amount_unpaid_default": -2500,
        "amount_unpaid_normalized": -2000
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 477
          }
        },
        "bill_to": {
          "data": null
        },
        "bill_from": {
          "data": null
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1754"
          }
        },
        "document_type": {
          "data": null
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "1254"
          }
        },
        "subsidiary": {
          "data": null
        },
        "invoice_attributions": {
          "data": []
        },
        "attachment": {
          "data": null
        }
      }
    },
    {
      "id": "1754",
      "type": "companies",
      "attributes": {
        "name": "Client1278",
        "billing_name": null,
        "vat": null,
        "default_currency": null,
        "created_at": "2021-04-15T01:04:26.547+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 477
          }
        },
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "1254",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1239@email.com",
        "title": null,
        "joined_at": "2021-04-15T01:04:26.000+02:00",
        "last_seen_at": "2021-04-15T01:04:26.577+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "user_id": 1269,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2021-04-15T01:04:26.527+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0,
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 477
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "1753"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "1753",
      "type": "companies",
      "attributes": {
        "name": "Organization477",
        "billing_name": null,
        "vat": null,
        "default_currency": "USD",
        "created_at": "2021-04-15T01:04:26.526+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": [],
        "contact": {}
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 477
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 100,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      },
      "duplicate_tasks": {
        "type": "switch",
        "available": true
      },
      "billable_time_rounding": {
        "type": "switch",
        "available": true
      },
      "payment_sync": {
        "type": "switch",
        "available": true
      },
      "booking_methods": {
        "type": "switch",
        "available": true
      },
      "import_tasks_csv": {
        "type": "switch",
        "available": true
      },
      "reactions": {
        "type": "switch",
        "available": true
      },
      "time_week_view": {
        "type": "switch",
        "available": true
      },
      "subtasks": {
        "type": "switch",
        "available": true
      },
      "time_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "theming": {
        "type": "switch",
        "available": true
      },
      "remove_branding": {
        "type": "switch",
        "available": true
      },
      "custom_invoicing_email": {
        "type": "switch",
        "available": true
      },
      "google_calendar_layout": {
        "type": "switch",
        "available": true
      },
      "pulse": {
        "type": "switch",
        "available": true
      }
    },
    "settings": {}
  }
}

PATCH  /api/v2/payments/9

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "payments",
    "attributes": {
      "amount": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/amount"
      }
    }
  ]
}

Update a payment
PATCH/api/v2/payments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

payment id


DELETE /api/v2/payments/1
Requestsdeletes payment

DELETE  /api/v2/payments/11

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a payment
DELETE/api/v2/payments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

payment id


Generated by aglio on 14 Apr 2021