Line Items API are used to communicate the details of a purchase to a patron.
Restrictions
-
The price of a Line Item MUST represent the amount that a patron will pay for that Line Item, including tax and any discounts applied (e.g. price = product price * qty - discounts + tax).
Example[ { name: 'Cinema Tickets', sku: '123456789', qty: '2', price: '3600', // 2 x $20 + $6 (15% tax) - $10 (discount) tax: '15.0', discount: '1000' # $10 } ]
-
The price for each Line Item MUST be provided in cents.
-
The total for all Line Item prices MUST sum to the Payment Request API amount.
-
The currency for each Line Item MUST be consistent with the Payment Request value.
-
The discount for each Line Item MUST be provided in cents and is tax exclusive.
-
A discount that applies to multiple line items may be represented as a separate line item with a negative amount.
Example[ { name: 'Cinema Tickets', sku: '123456789', qty: '2', price: '4600' // 2 x $20 + $6 (15% tax), tax: '15.0' }, { name: 'Popcorn', sku: '987654321', qty: '1', price: '1150', // $10 popcorn + $1.50 (15% tax) tax: '15.0' }, { name: 'Combo Discount', sku: '123456789', qty: '1', price: '-1500', // $15 (discount) tax: '15.0' } ]