- Creates a line item
POST {{baseURL}}/pay-int-api/line-items
This endpoint creates a new line item in the merchant's catalog.
The catalog is the collective set of line items assigned to a merchant. A line item represents a single product or service that can be added to an invoice. Each request must include the item name, unit price, and unit type. When adding a line item to an invoice, the unit price can be overwritten.
A minimal request only needs three fields to succeed. Category and tax rate are optional and can be added later if needed.
Here is the simple example:
{
"productName": "Wireless Mouse",
"unitPrice": 18.99,
"unitTypeId": 1
}This creates a catalog item priced at $18.99, measured by the unit type specified. The response returns the new line item along with its generated ID.
See Also:
To list line items, see GET /pay-int-api/line-items.
To retrieve line item unit types, see GET /pay-int-api/line-items/unit-types.
To update a line item, see PUT /pay-int-api/line-items/{lineItemId}.
To delete a line item, see DELETE /pay-int-api/line-items/{lineItemId}.
The line item creation request.
Indicates the name of the item.
Example: RollerMouse Wireless Mouse
Indicates the identifier of the unit type.
This is a numeric identifier represents the unit of measure for the item. Each supplier provides their own lookup value. That value maps to a predefined unit type in their system.
Example: 1
Indicates the unit price (in USD) of the item.
Example: 18.99 (for $18.99)
Indicates a description of the item.
Example: RollerMouse Design Collection, Limited Edition Wireless Mouse
Indicates the product identifier item.
Example: 24474771
Indicates the identifier of the item category.
Example: a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b68
- Mock serverhttps://developer.flute.com/_mock/api-reference/pay-int-api/line-items
- Sandbox environmenthttps://sandbox.api.flute.com/pay-int-api/line-items
- Production environmenthttps://api.flute.com/pay-int-api/line-items
curl -i -X POST \
https://developer.flute.com/_mock/api-reference/pay-int-api/line-items \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-api-version: 1.0' \
-d '{
"productName": "RollerMouse Wireless Mouse",
"unitTypeId": 1,
"unitPrice": 18.99,
"description": "RollerMouse Design Collection, Limited Edition Wireless Mouse",
"sku": "24474771",
"categoryId": "a2d1c4b5-6e7f-4890-9abc-1d2e3f4a5b68",
"taxRate": 3.25
}'{ "id": "6f2e4a3b-9c1d-4e5f-8a7b-2d3c4e5f6a7b" }