Search Documentation
Search across all documentation pages, APIs and guides.
Items Management
Create and manage product or service line items. Attach items to a payment transaction via the items array to give customers a clear, itemized view of exactly what they are purchasing, only available for custom API integrations.
E-commerce
Show product names and prices on the checkout receipt. Customers see exactly what they paid for, reducing disputes and chargebacks.
Subscriptions & SaaS
Attach the plan name and billing period as line items so customers recognise charges on their bank statement.
Invoicing
Map invoice line items to OnePay items for an itemized receipt that matches your invoice, useful for B2B reconciliation.
Custom metadata
Store internal attributes (SKU, brand, RAM, batch ID) in the metadata array for your own reporting without affecting the customer-facing display.
Create Item
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
namerequired | string | Product or service name. |
descriptionrequired | string | Short description of the item. |
pricerequired | number | Unit price, e.g. 1400.99. |
currencyrequired | string | LKR or USD. |
image_urloptional | string | Public URL of a product image shown on checkout. |
metadataoptional | object | Arbitrary key-value pairs for internal cataloguing (e.g. brand, SKU, RAM). |
| Parameter | Type | Description |
|---|---|---|
status | Number | Status code of the response (e.g., 200 for success) |
message | String | Response message indicating the result of the operation |
data | Object | Contains the response data |
data.item_id | String | Unique identifier of the created item |
Get items
Returns all items created under your App ID. Pass app_id as a query parameter no request body required.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
app_idrequired | string | Your application identifier. |
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
status | number | Status code of the response (e.g. 200 for success). |
message | string | Response message indicating the result of the operation. |
data | array | Array of item objects. |
data[].item_id | string | Unique identifier for the item. |
data[].name | string | Name of the item. |
data[].description | string | Description of the item. |
data[].price | string | Price of the item. |
data[].currency | string | Currency code for the price. |
data[].image_url | string | URL of the item's image. |
data[].is_deleted | boolean | Indicates if the item has been deleted. |
data[].metadata | array | Array of metadata objects for the item. |
data[].metadata[].key | string | Key of the metadata property. |
data[].metadata[].value | string | Value of the metadata property. |
data[].metadata[].is_deleted | boolean | Indicates if this metadata property has been deleted. |
Update item
Update any field on an existing item. Pass only the fields you want to change all other fields retain their current values.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
app_idrequired | string | Your application identifier. |
nameoptional | string | Updated item name. |
priceoptional | number | Updated unit price. |
descriptionoptional | string | Updated description. |
image_urloptional | string | Updated product image URL. |
metadataoptional | array | Updated metadata array. Replaces the existing metadata entirely. |
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
status | number | Status code of the response (e.g. 200 for success). |
message | string | Response message indicating the result of the operation. |
data | object | Contains the response data. |
data.item_id | string | Unique identifier of the updated item. |
Delete Item
Permanently removes an item record. Items already attached to completed transactions cannot be deleted.
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
app_idrequired | string | Your application identifier. |
| FIELD | TYPE | DESCRIPTION |
|---|---|---|
status | number | Status code of the response (e.g. 200 for success). |
message | string | Response message indicating the result of the operation. |
On This Page