Order Items
The orderItems
field of the paymentOrder
is an array containing information
about the items being purchased. It is mandatory for v3.0 and older
implementations, but voluntary for payment order v3.1, so feel free to
remove it from your requests if you want. If you offer invoice as a payment
option, the field is still recommended as it are used for the product details on
the customer’s invoice. If they are not present, orderItems
will be generated
by using the description
and amount
fields from the paymentOrder
.
Request Excerpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"orderItems": [
{
"reference": "P1",
"name": "Product1",
"type": "PRODUCT",
"class": "ProductGroup1",
"itemUrl": "https://example.com/products/123",
"imageUrl": "https://example.com/product123.jpg",
"description": "Product 1 description",
"discountDescription": "Volume discount",
"quantity": 5,
"quantityUnit": "pcs",
"unitPrice": 300,
"discountPrice": 0,
"vatPercent": 2500,
"amount": 1500,
"vatAmount": 375
}
]
orderItems
array
check
The array of items being purchased with the order. Note that authorization orderItems
will not be printed on invoices, so lines meant for print must be added in the Capture request. The authorization orderItems
will, however, be used in the Merchant Portal when captures or reversals are performed, and might be shown other places later. It is required to use this field to be able to send Capture orderItems
. Capture
requests should only contain items meant to be captured from the order.
reference
string
check
name
string
check
type
enum
check
PRODUCT
, SERVICE
, SHIPPING_FEE
, DISCOUNT
, VALUE_CODE
, or OTHER
. The type of the order item.
class
string
check
MobilePhone
. Note that class
cannot contain spaces and must follow the regex pattern [\w-]*
. Swedbank Pay may use this field for statistics.
itemUrl
string
imageUrl
string
description
string
discountDescription
string
quantity
number
check
quantityUnit
string
check
pcs
, grams
, or similar.
unitPrice
integer
check
discountPrice
integer
vatPercent
integer
check
25%
becomes 2500
.
amount
integer
check
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000
= 100.00
SEK, 5000
= 50.00
SEK.
vatAmount
integer
check
The payment’s VAT (Value Added Tax) amount
, entered in the lowest monetary unit of the selected currency. E.g.: 10000
= 100.00
SEK, 5000
= 50.00
SEK. The vatAmount
entered will not affect the amount
shown on the payment page, which only shows the total amount
. This field is used to specify how much of the total amount
the VAT will be. Set to 0
(zero) if there is no VAT amount
charged.