The Payment Schedule object

Attributes

id string

Unique identifier for the object.

idx integer
parent_id string required
parent_type string required
payment_term string
description string
due_date string required
invoice_portion number
payment_amount number required
mode_of_payment string
paid_amount number
discounted_amount number

Default: 0

outstanding number
discount_date string
discount_type string

Default: Percentage

discount number
base_payment_amount number
base_outstanding number
base_paid_amount number
due_date_based_on string
credit_days integer
credit_months integer
discount_validity_based_on string
discount_validity integer
The Payment Schedule object
{
  "id": "payment-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "payment_term": "payment_term_example",
  "description": "description_example",
  "due_date": "2024-01-15",
  "invoice_portion": 0,
  "payment_amount": 0,
  "mode_of_payment": "mode_of_payment_example",
  "paid_amount": 0,
  "discounted_amount": 0,
  "outstanding": 0,
  "discount_date": "2024-01-15",
  "discount_type": "Percentage",
  "discount": 0,
  "base_payment_amount": 0,
  "base_outstanding": 0,
  "base_paid_amount": 0,
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "discount_validity_based_on": "discount_validity_based_on_example",
  "discount_validity": 0
}
GET /api/accounts/payment-schedule?parent_id={id}

List payment schedules by parent

Returns all payment schedules belonging to the specified parent.

Query parameters

parent_id string required

The ID of the parent to list children for.

Returns

A list of payment schedule objects belonging to the parent.

GET /api/accounts/payment-schedule?parent_id={id}
curl https://api.overplane.dev/api/accounts/payment-schedule?parent_id=parent_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "payment-schedule_abc123",
      "idx": 1,
      "parent_id": null,
      "parent_type": "parent_type_example",
      "payment_term": "payment_term_example",
      "description": "description_example",
      "due_date": "2024-01-15",
      "invoice_portion": 0,
      "payment_amount": 0,
      "mode_of_payment": "mode_of_payment_example",
      "paid_amount": 0,
      "discounted_amount": 0,
      "outstanding": 0,
      "discount_date": "2024-01-15",
      "discount_type": "Percentage",
      "discount": 0,
      "base_payment_amount": 0,
      "base_outstanding": 0,
      "base_paid_amount": 0,
      "due_date_based_on": "2024-01-15",
      "credit_days": 0,
      "credit_months": 0,
      "discount_validity_based_on": "discount_validity_based_on_example",
      "discount_validity": 0
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/payment-schedule

Create a payment schedule

Creates a new payment schedule object.

Body parameters

idx integer
parent_id string required
parent_type string required
payment_term string
description string
due_date string required
invoice_portion number
payment_amount number required
mode_of_payment string
paid_amount number
discounted_amount number

Default: 0

outstanding number
discount_date string
discount_type string

Default: Percentage

discount number
base_payment_amount number
base_outstanding number
base_paid_amount number
due_date_based_on string
credit_days integer
credit_months integer
discount_validity_based_on string
discount_validity integer

Returns

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

POST /api/accounts/payment-schedule
curl https://api.overplane.dev/api/accounts/payment-schedule \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"parent_id":null,"parent_type":"parent_type_example","due_date":"2024-01-15","payment_amount":0}'
Response
{
  "id": "payment-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "payment_term": "payment_term_example",
  "description": "description_example",
  "due_date": "2024-01-15",
  "invoice_portion": 0,
  "payment_amount": 0,
  "mode_of_payment": "mode_of_payment_example",
  "paid_amount": 0,
  "discounted_amount": 0,
  "outstanding": 0,
  "discount_date": "2024-01-15",
  "discount_type": "Percentage",
  "discount": 0,
  "base_payment_amount": 0,
  "base_outstanding": 0,
  "base_paid_amount": 0,
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "discount_validity_based_on": "discount_validity_based_on_example",
  "discount_validity": 0
}
PATCH /api/accounts/payment-schedule/{id}

Update a payment schedule

Updates the specified payment schedule 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 schedule to update.

Body parameters

idx integer
parent_id string
parent_type string
payment_term string
description string
due_date string
invoice_portion number
payment_amount number
mode_of_payment string
paid_amount number
discounted_amount number

Default: 0

outstanding number
discount_date string
discount_type string

Default: Percentage

discount number
base_payment_amount number
base_outstanding number
base_paid_amount number
due_date_based_on string
credit_days integer
credit_months integer
discount_validity_based_on string
discount_validity integer

Returns

Returns the updated payment schedule object.

PATCH /api/accounts/payment-schedule/{id}
curl https://api.overplane.dev/api/accounts/payment-schedule/payment-schedule_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"idx":1,"parent_id":null}'
Response
{
  "id": "payment-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "payment_term": "payment_term_example",
  "description": "description_example",
  "due_date": "2024-01-15",
  "invoice_portion": 0,
  "payment_amount": 0,
  "mode_of_payment": "mode_of_payment_example",
  "paid_amount": 0,
  "discounted_amount": 0,
  "outstanding": 0,
  "discount_date": "2024-01-15",
  "discount_type": "Percentage",
  "discount": 0,
  "base_payment_amount": 0,
  "base_outstanding": 0,
  "base_paid_amount": 0,
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "discount_validity_based_on": "discount_validity_based_on_example",
  "discount_validity": 0
}
DELETE /api/accounts/payment-schedule/{id}

Delete a payment schedule

Permanently deletes a payment schedule. This cannot be undone.

Path parameters

id string required

The identifier of the payment schedule to delete.

Returns

Returns a confirmation that the payment schedule has been deleted.

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

Reorder payment schedules

Updates the sort order of payment schedules within their parent by setting new index values.

Returns

Returns the reordered list.

POST /api/accounts/payment-schedule/reorder
curl https://api.overplane.dev/api/accounts/payment-schedule/reorder \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "payment-schedule_abc123",
  "idx": 1,
  "parent_id": null,
  "parent_type": "parent_type_example",
  "payment_term": "payment_term_example",
  "description": "description_example",
  "due_date": "2024-01-15",
  "invoice_portion": 0,
  "payment_amount": 0,
  "mode_of_payment": "mode_of_payment_example",
  "paid_amount": 0,
  "discounted_amount": 0,
  "outstanding": 0,
  "discount_date": "2024-01-15",
  "discount_type": "Percentage",
  "discount": 0,
  "base_payment_amount": 0,
  "base_outstanding": 0,
  "base_paid_amount": 0,
  "due_date_based_on": "2024-01-15",
  "credit_days": 0,
  "credit_months": 0,
  "discount_validity_based_on": "discount_validity_based_on_example",
  "discount_validity": 0
}