PayOrc
Invoices

Invoice Items

Create, update, activate, deactivate, and delete line items for invoices.

Invoice Items

Version: 3.0.0

Generate an API Key for the Invoice channel before making requests.

Invoice items are the individual products or services you bill for. Create reusable item templates once, then add them to any invoice. Each item stores a name, rate, category, and description.

Reusable invoice items save time and ensure consistent pricing across all invoices. Create them once, reference them in multiple invoices.

Every create and list response returns two identifiers: a display item_id (a short sequence number) and a data_id (an encrypted token). Always send the data_id token when updating, activating, deactivating, deleting, fetching an item, or referencing the item inside an invoice. The item_id is for display only.

Available Operations

ActionMethodEndpointDescription
Create ItemPOSThttps://api.payorc.com/invoice/v1/items/addCreate a new line item
Update ItemPOSThttps://api.payorc.com/invoice/v1/items/updateModify item details
DeactivatePOSThttps://api.payorc.com/invoice/v1/items/deactivateDisable item (hide from new invoices)
ActivatePOSThttps://api.payorc.com/invoice/v1/items/activateRe-enable a deactivated item
DeletePOSThttps://api.payorc.com/invoice/v1/items/deletePermanently remove an item
Get DetailsGEThttps://api.payorc.com/invoice/v1/items/detailsFetch a single item
List ItemsGEThttps://api.payorc.com/invoice/v1/items/listList all items with pagination

Authentication

HeaderTypeDescription
merchant-keyStringYour merchant key
merchant-secretStringYour merchant secret

Create Item

Create a new reusable line item for invoices.

Endpoint

MethodURL
POSThttps://api.payorc.com/invoice/v1/items/add

Please use the test credentials for sandbox testing.

Request Body

FieldTypeRequiredDescription
item_nameStringYesItem name (1–50 characters, must be unique per merchant)
item_rate_per_unitNumberYesItem rate per unit (greater than 0, max 9999999)
item_categoryStringYesItem category (e.g., Electronics, Clothing, Services) (max 100 characters)
item_descriptionStringNoItem description (max 200 characters)

Code Examples

curl -X POST https://api.payorc.com/invoice/v1/items/add \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "item_name": "Apple",
    "item_rate_per_unit": "1000",
    "item_category": "Fruits",
    "item_description": "This is the invoice item."
  }'

Example Response

{
  "data": {
    "item_id": "0000000001",
    "data_id": "VTVKMjhqUFdQQkN"
  },
  "message": "Item added successfully",
  "status": "success",
  "code": "00"
}

Item names must be unique within your merchant account. Attempting to create a duplicate will return an error. Store the returned data_id — it is the token you pass to all other item operations.


Update Item

Modify details of an existing invoice item. All fields except data_id follow the same rules as Create Item.

Endpoint

MethodURL
POSThttps://api.payorc.com/invoice/v1/items/update

Please use the test credentials for sandbox testing.

Request Body

FieldTypeRequiredDescription
data_idStringYesEncrypted token of the item to update (from the create/list response)
item_nameStringYesItem name (1–50 characters)
item_rate_per_unitNumberYesRate per unit (greater than 0, max 9999999)
item_categoryStringYesItem category (max 100 characters)
item_descriptionStringNoItem description (max 200 characters)

Code Examples

curl -X POST https://api.payorc.com/invoice/v1/items/update \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "VTVKMjhqUFdQQkN",
    "item_name": "Keyboard",
    "item_rate_per_unit": "10000",
    "item_category": "Electronics",
    "item_description": "This is the invoice item."
  }'

Example Response

{
    "message": "Item updated successfully.",
    "status": "success",
    "code": "00"
}

Deactivate Item

Deactivate an item so it no longer appears when creating new invoices. Existing invoices using this item are unaffected.

Endpoint

MethodURL
POSThttps://api.payorc.com/invoice/v1/items/deactivate

Please use the test credentials for sandbox testing.

Request Body

FieldTypeRequiredDescription
data_idStringYesEncrypted token of the item to deactivate

Code Examples

curl -X POST https://api.payorc.com/invoice/v1/items/deactivate \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "VTVKMjhqUFdQQkN"
  }'

Example Response

{
    "message": "Item deactivated successfully.",
    "status": "success",
    "code": "00"
}

Deactivated items can be reactivated at any time. They are not deleted — just hidden from item selection.


Activate Item

Reactivate a previously deactivated item.

Endpoint

MethodURL
POSThttps://api.payorc.com/invoice/v1/items/activate

Please use the test credentials for sandbox testing.

Request Body

FieldTypeRequiredDescription
data_idStringYesEncrypted token of the item to activate

Code Examples

curl -X POST https://api.payorc.com/invoice/v1/items/activate \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "VTVKMjhqUFdQQkN"
  }'

Example Response

{
    "message": "Item activated successfully.",
    "status": "success",
    "code": "00"
}

Delete Item

Permanently delete an invoice item. This cannot be undone.

Endpoint

MethodURL
POSThttps://api.payorc.com/invoice/v1/items/delete

Please use the test credentials for sandbox testing.

Request Body

FieldTypeRequiredDescription
data_idStringYesEncrypted token of the item to delete

Code Examples

curl -X POST https://api.payorc.com/invoice/v1/items/delete \
  -H "Content-Type: application/json" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET" \
  -d '{
    "data_id": "VTVKMjhqUFdQQkN"
  }'

Example Response

{
    "message": "Item deleted successfully.",
    "status": "success",
    "code": "00"
}

Deleting an item is permanent and cannot be undone. Existing invoices that reference this item will retain the data, but the item cannot be used in new invoices.


Get Item Details

Retrieve details for a single invoice item.

Endpoint

MethodURL
GEThttps://api.payorc.com/invoice/v1/items/details?data_id=DATA_ID

Pass the encrypted data_id token (not the display item_id) as the query parameter. Please use the test credentials for sandbox testing.

Query Parameters

ParameterTypeRequiredDescription
data_idStringYesEncrypted token of the item to fetch

Code Examples

curl -X GET "https://api.payorc.com/invoice/v1/items/details?data_id=VTVKMjhqUFdQQkN" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET"

Example Response

{
  "data": {
    "item_id": "0000000001",
    "data_id": "VTVKMjhqUFdQQkN",
    "item_name": "Keyboard",
    "item_rate": 10000,
    "item_category": "Electronics",
    "item_description": "(description).",
    "submerchant_name": "Qwerty Tech",
    "status": "Active"
  },
  "message": "Details fetched successfully.",
  "status": "success",
  "code": "00"
}

List Items

Retrieve a paginated list of all invoice items.

Endpoint

MethodURL
GEThttps://api.payorc.com/invoice/v1/items/list

Please use the test credentials for sandbox testing.

Query Parameters

ParameterTypeRequiredDescription
perpageIntegerYesNumber of records per page (1–1000)
pageIntegerYesPage number (1–1000)
statusStringNoFilter by status (Active or Deactivated)

Code Examples

curl -X GET "https://api.payorc.com/invoice/v1/items/list?perpage=10&page=1" \
  -H "merchant-key: YOUR_MERCHANT_KEY" \
  -H "merchant-secret: YOUR_MERCHANT_SECRET"

Example Response

{
  "data": [
    {
      "item_id": "0000000001",
      "data_id": "VTVKMjhqUFdQQkN",
      "item_rate": 10000,
      "item_name": "Keyboard",
      "item_category": "Electronics",
      "item_description": "(description).",
      "submerchant_name": "Qwerty Tech",
      "status": "Active",
      "item_no": "00000001",
      "created_date": "2024-01-20 10:30:00",
      "last_modified_date": "2024-01-20 10:30:00"
    }
  ],
  "message": "List fetched successfully.",
  "status": "success",
  "code": "00",
  "total_records": 1
}

Use the data_id token returned from list operations when adding items to invoices via the invoice API (in the item_data[].data_id field).

On this page