The Payment Order 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.

status string

Default: draft

company string required
party string
posting_date string
payment_order_type string required
company_bank_account string required
company_bank string
account string
The Payment Order object
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}
GET /api/accounts/payment-order/{id}

Retrieve a payment order

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

Path parameters

id string required

The identifier of the payment order to retrieve.

Returns

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

GET /api/accounts/payment-order/{id}
curl https://api.overplane.dev/api/accounts/payment-order/payment-order_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}
GET /api/accounts/payment-order

List all payment orders

Returns a list of payment orders. 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 order objects.

GET /api/accounts/payment-order
curl https://api.overplane.dev/api/accounts/payment-order \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "payment-order_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "status": "draft",
      "company": "Example Corp",
      "party": "party_example",
      "posting_date": "2024-01-15",
      "payment_order_type": "payment_order_type_example",
      "company_bank_account": "Example Corp",
      "company_bank": "Example Corp",
      "account": "account_example"
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/payment-order

Create a payment order

Creates a new payment order object.

Body parameters

status string

Default: draft

company string required
party string
posting_date string
payment_order_type string required
company_bank_account string required
company_bank string
account string

Returns

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

POST /api/accounts/payment-order
curl https://api.overplane.dev/api/accounts/payment-order \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"company":"Example Corp","payment_order_type":"payment_order_type_example","company_bank_account":"Example Corp"}'
Response
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}
PATCH /api/accounts/payment-order/{id}

Update a payment order

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

Body parameters

status string

Default: draft

company string
party string
posting_date string
payment_order_type string
company_bank_account string
company_bank string
account string

Returns

Returns the updated payment order object.

PATCH /api/accounts/payment-order/{id}
curl https://api.overplane.dev/api/accounts/payment-order/payment-order_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","company":"Example Corp"}'
Response
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}
DELETE /api/accounts/payment-order/{id}

Delete a payment order

Permanently deletes a payment order. This cannot be undone.

Path parameters

id string required

The identifier of the payment order to delete.

Returns

Returns a confirmation that the payment order has been deleted.

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

Submit a payment order

Submits a draft payment order, transitioning its status from draft to submitted.

Path parameters

id string required

The identifier of the payment order to act on.

Returns

Returns the payment order object with updated status.

POST /api/accounts/payment-order/{id}/submit
curl https://api.overplane.dev/api/accounts/payment-order/payment-order_abc123/submit \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}
POST /api/accounts/payment-order/{id}/cancel

Cancel a payment order

Cancels a submitted payment order, transitioning its status to cancelled.

Path parameters

id string required

The identifier of the payment order to act on.

Returns

Returns the payment order object with updated status.

POST /api/accounts/payment-order/{id}/cancel
curl https://api.overplane.dev/api/accounts/payment-order/payment-order_abc123/cancel \
  -H "Authorization: Bearer sk_test_..." \
  -X POST
Response
{
  "id": "payment-order_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "company": "Example Corp",
  "party": "party_example",
  "posting_date": "2024-01-15",
  "payment_order_type": "payment_order_type_example",
  "company_bank_account": "Example Corp",
  "company_bank": "Example Corp",
  "account": "account_example"
}

Line items

Child objects that belong to this payment order. These are accessed via the parent's ID.

Payment Order Reference

Attributes

idx integer
payment_order_id string required
reference_doctype string required
reference_name string required
amount number required
supplier string
payment_request string
mode_of_payment string
bank_account string required
account string
payment_reference string

Endpoints

GET /api/accounts/payment-order-reference?parent_id={id}
POST /api/accounts/payment-order-reference
PATCH /api/accounts/payment-order-reference/{id}
DELETE /api/accounts/payment-order-reference/{id}
POST /api/accounts/payment-order-reference/reorder
Payment Order Reference object
{
  "id": "payment-order-reference_abc123",
  "idx": 1,
  "payment_order_id": "payment_order_id_example",
  "reference_doctype": "reference_doctype_example",
  "reference_name": "reference_name_example",
  "amount": 0,
  "supplier": "supplier_example",
  "payment_request": "payment_request_example",
  "mode_of_payment": "mode_of_payment_example",
  "bank_account": "bank_account_example",
  "account": "account_example",
  "payment_reference": "payment_reference_example"
}