Fees And Discounts
If you want to add fees or discounts to your payment order, this can be done by
include them as orderItems in your request. The feature is currently
available for Invoice, Installment Account and Monthly Payments.
Use positive amounts for fees and negative amounts for discounts. Remember
that the sum of the orderItems must match the total payment order amount.
Restricting the fee or discount to certain payment methods is also possible.
Simply add the restrictedToInstruments field and which payment method the fee
or discount applies to. This is currently available for invoice only.
The example below shows a fee which only applies to Swedish invoices. Other options for some of the fields are in the table below.
Fee Request
Request
1
2
3
4
POST /psp/paymentorders HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0 // Version optional for 3.0 and 2.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"orderItems": [
{
"reference": "I1",
"name": "InvoiceFee",
"type": "PAYMENT_FEE",
"class": "Fees",
"description": "Fee for paying with Invoice",
"quantity": 1,
"quantityUnit": "pcs",
"unitPrice": 1900,
"vatPercent": 0,
"amount": 1900,
"vatAmount": 0,
"restrictedToInstruments": [
"Invoice-PayExFinancingSe"
]
}
]
}
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
string
check
PRODUCT, SERVICE, SHIPPING_FEE, PAYMENT_FEE, DISCOUNT, VALUE_CODE or OTHER. The type of the order item. PAYMENT_FEE is the amount you are charged with when you are paying with invoice. The amount can be defined in the amount field below.
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
A textual description of the purchase. Maximum length is 40 characters.
discountDescription
string
quantity
number
check
quantityUnit
string
check
pcs, grams, or similar. This is used for your own book keeping.
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.
restrictedToInstruments
array
Invoice only. Invoice supports the subtypes PayExFinancingNo, PayExFinancingSe and PayMonthlyInvoiceSe, separated by a dash, e.g.; Invoice-PayExFinancingNo. The fee or discount applies to all payment methods if a restriction is not included. Use of this field requires an agreement with Swedbank Pay.