The Payment Term object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

payment_term_name string
invoice_portion number
mode_of_payment string
due_date_based_on string
credit_days integer
credit_months integer
description string
discount_type string

Default: Percentage

discount number
discount_validity_based_on string

Default: Day(s) after invoice date

discount_validity integer
The Payment Term object
{
  "id": "payment-term_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "payment_term_name": "payment_term_name_example",
  "invoice_portion": 0,
  "mode_of_payment": "mode_of_payment_example",
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "description": "description_example",
  "discount_type": "Percentage",
  "discount": 0,
  "discount_validity_based_on": "Day(s) after invoice date",
  "discount_validity": 0
}
GET /api/accounts/payment-term/{id}

Retrieve a payment term

Retrieves the details of an existing payment term. Supply the unique payment term ID that was returned from a previous request.

Path parameters

id string required

The identifier of the payment term to retrieve.

Returns

Returns the payment term object if a valid identifier was provided.

GET /api/accounts/payment-term/{id}
curl https://api.overplane.dev/api/accounts/payment-term/payment-term_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "payment-term_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "payment_term_name": "payment_term_name_example",
  "invoice_portion": 0,
  "mode_of_payment": "mode_of_payment_example",
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "description": "description_example",
  "discount_type": "Percentage",
  "discount": 0,
  "discount_validity_based_on": "Day(s) after invoice date",
  "discount_validity": 0
}
GET /api/accounts/payment-term

List all payment terms

Returns a list of payment terms. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of payment term objects.

GET /api/accounts/payment-term
curl https://api.overplane.dev/api/accounts/payment-term \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "payment-term_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "payment_term_name": "payment_term_name_example",
      "invoice_portion": 0,
      "mode_of_payment": "mode_of_payment_example",
      "due_date_based_on": "2024-01-15",
      "credit_days": 0,
      "credit_months": 0,
      "description": "description_example",
      "discount_type": "Percentage",
      "discount": 0,
      "discount_validity_based_on": "Day(s) after invoice date",
      "discount_validity": 0
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/payment-term

Create a payment term

Creates a new payment term object.

Body parameters

payment_term_name string
invoice_portion number
mode_of_payment string
due_date_based_on string
credit_days integer
credit_months integer
description string
discount_type string

Default: Percentage

discount number
discount_validity_based_on string

Default: Day(s) after invoice date

discount_validity integer

Returns

Returns the newly created payment term object if the call succeeded.

POST /api/accounts/payment-term
curl https://api.overplane.dev/api/accounts/payment-term \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json"
Response
{
  "id": "payment-term_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "payment_term_name": "payment_term_name_example",
  "invoice_portion": 0,
  "mode_of_payment": "mode_of_payment_example",
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "description": "description_example",
  "discount_type": "Percentage",
  "discount": 0,
  "discount_validity_based_on": "Day(s) after invoice date",
  "discount_validity": 0
}
PATCH /api/accounts/payment-term/{id}

Update a payment term

Updates the specified payment term by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the payment term to update.

Body parameters

payment_term_name string
invoice_portion number
mode_of_payment string
due_date_based_on string
credit_days integer
credit_months integer
description string
discount_type string

Default: Percentage

discount number
discount_validity_based_on string

Default: Day(s) after invoice date

discount_validity integer

Returns

Returns the updated payment term object.

PATCH /api/accounts/payment-term/{id}
curl https://api.overplane.dev/api/accounts/payment-term/payment-term_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"payment_term_name":"payment_term_name_example","invoice_portion":0}'
Response
{
  "id": "payment-term_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "payment_term_name": "payment_term_name_example",
  "invoice_portion": 0,
  "mode_of_payment": "mode_of_payment_example",
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "description": "description_example",
  "discount_type": "Percentage",
  "discount": 0,
  "discount_validity_based_on": "Day(s) after invoice date",
  "discount_validity": 0
}
DELETE /api/accounts/payment-term/{id}

Delete a payment term

Permanently deletes a payment term. This cannot be undone.

Path parameters

id string required

The identifier of the payment term to delete.

Returns

Returns a confirmation that the payment term has been deleted.

DELETE /api/accounts/payment-term/{id}
curl https://api.overplane.dev/api/accounts/payment-term/payment-term_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "payment-term_abc123",
  "deleted": true
}