---
title: "Adds a Payment"
method: POST
path: "/api/v1/payment_terms"
tags: ["payment_terms"]
---

# Adds a Payment

`POST /api/v1/payment_terms`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/payment_terms`
- Auth: none declared. Required headers: `X-API-TOKEN`, `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/payment_terms/post.ts> (a function with typed inputs; its response is checked against the schema)

Adds a Payment Term to the system

## Query parameters

- `include` string

## Headers

- `X-API-TOKEN` string, required
- `X-Requested-With` string, required

## Request body

- PaymentTerm
  - `num_days` integer: The payment term length in days
  - `name` string: The payment term length in string format
  - `created_at` number: Timestamp
  - `updated_at` number: Timestamp
  - `archived_at` number: Timestamp

## Response `200`

Returns the saved Payment object

- PaymentTerm
  - `num_days` integer: The payment term length in days
  - `name` string: The payment term length in string format
  - `created_at` number: Timestamp
  - `updated_at` number: Timestamp
  - `archived_at` number: Timestamp

## Other responses

- `401`: Authentication error
- `403`: Authorization error
- `422`: Validation error
- `default`: Unexpected Error

## Changes

- **2024-06-06** `8e82a2bd77e0`: 3 breaking, 12 info
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `default`
  - added the new optional request property `archived_at`
  - …11 more
- **2024-06-05** `e61df65649e2`: 3 breaking, 12 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `default`
  - removed the request property `archived_at`
  - …11 more
- **2024-03-07** `71171a40d629`: 6 breaking, 17 info
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `403`
  - …19 more
- **2024-02-18** `88bbc1f38ff7`: 6 breaking, 17 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `403`
  - …19 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/payment_terms/post.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
