Line items
Last updated: 12-Nov-2024
Overview
With the checkout API, a merchant can send product information to their customers on the checkout page. If the products are declared as line items, they will be shown under the order amount in the show details section.
- Line Item – Every product on the order is referenced by a record that includes a product name, quantity, and price
The sum of total amounts declared per product is equal to the order amount.
Availability
This feature is available on all merchant accounts.
The line item array is not mandatory when the create checkout is used; however, certain APMs require the usage of line items to validate the order content.
Requirements
Payment method | Required parameters | Type | Description |
---|---|---|---|
Card, Apple Pay, Google Pay, MobilePay, Swish, GPP2, Crypto, GiftCard, PLCC, Klarna, Paypal | name | string | Descriptive name of the order line item |
Card, Apple Pay, Google Pay, MobilePay, Swish, GPP2, Crypto, GiftCard, PLCC, Klarna, Paypal | total_amount | number | Price value of a product (with tax - unit_price + tax_rate) |
Klarna, Paypal | quantity | integer | Quantity of the order line item |
Klarna, Paypal | unit_price | number | Unit Price |
Klarna | tax_rate | number | Additional details specific to this type of event |
Klarna | total_tax_amount | number | Total tax amount |
Line items code snippet example:
"line_items": [
{
"name": "Product Test 1",
"quantity": 1,
"tax_rate": 21.0,
"total_tax_amount": 2100,
"total_amount": 12100,
"unit_price": 10000,
"image_url": "https://www.snipes.nl/dw/image/v2/BDCB_PRD/on/demandware.static/-/Sites-snse-master-eu/default/dwde1f6084/1650106_P.jpg?sw=300&sh=300&sm=fit&sfrm=png"
},
{
"name": "Product Test 2",
"quantity": 2,
"tax_rate": 0.0,
"total_tax_amount": 0,
"total_amount": 2000,
"unit_price": 1000,
"image_url": "https://www.snipes.nl/dw/image/v2/BDCB_PRD/on/demandware.static/-/Sites-snse-master-eu/default/dw76dba5d4/1884606_P.jpg?sw=300&sh=300&sm=fit&sfrm=png"
}
],
Rate this article: