On This Page
Using Line Items
Klarna uses line items when you send a create session and update session requests.
Line items are used to include information about the goods that
your customers purchase, such as product name, quantity, and price.
Line items are represented as the
item_#_
fields,
starting with item_0_
, and increasing in numerical
order.These fields are required for each line item that you use:
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
Including Line Items in a Service Request
This example shows three valid line items.
<item id="0"> <productCode>123456</productCode> <productDescription>Red</productDescription> <productName>Shirt</productName> <quantity>1</quantity> <unitPrice>30.00</unitPrice> </item> <item id="1"> <productCode>456789</productCode> <productDescription>Green</productDescription> <productName>Pants</productName> <quantity>3</quantity> <unitPrice>19.99</unitPrice> </item> <item id="2"> <productCode>987654</productCode> <productDescription>Blue</productDescription> <productName>Dress</productName> <quantity>2</quantity> <unitPrice>25.50</unitPrice> </item>