PayPal · Schema

Lineitem

The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.

BillingCommerceDisputesInvoicesOrdersPaymentsPayoutsSubscriptionsTokensWebhooks
View JSON Schema on GitHub

JSON Schema

paypal-line-item-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/line_item",
  "title": "Lineitem",
  "type": "object",
  "description": "The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.",
  "allOf": [
    {
      "$ref": "#/components/schemas/item"
    },
    {
      "properties": {
        "commodity_code": {
          "type": "string",
          "description": "Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.",
          "minLength": 1,
          "maxLength": 12,
          "pattern": "^[a-zA-Z0-9_'.-]*$"
        },
        "discount_amount": {
          "description": "Use this field to break down the discount amount included in the total purchase amount. The value provided here will not add to the total purchase amount. The value cannot be negative.",
          "$ref": "#/components/schemas/money"
        },
        "total_amount": {
          "description": "The subtotal for all items. Must equal the sum of (items[].unit_amount * items[].quantity) for all items. item_total.value can not be a negative number.",
          "$ref": "#/components/schemas/money"
        },
        "unit_of_measure": {
          "type": "string",
          "description": "Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).",
          "minLength": 1,
          "maxLength": 12,
          "pattern": "^[a-zA-Z0-9_'.-]*$"
        }
      }
    }
  ]
}