Request Delivery Information
Swedbank Pay provides the possibility to return delivery information from
payment methods which support this. You do this by adding the field
requestDeliveryInfo in your payment order request and setting it to true.
The returned delivery information will appear in the payer field after the
payment has been paid, and not the initial response. You have to
perform a GET to see it.
Only payment methods which support this will return delivery information. If you
only want to show payment methods which support this in you menu, you can also
add the field restrictedToDeliveryInfoInstruments and setting it to true.
This will leave out all payment methods which can’t return delivery information.
You are currently only able to request delivery information from Apple Pay, Click to Pay and Google Pay™, but we will add support for more payment methods going forward. No changes are required at your (the merchant’s) end to be able to offer more payment methods at a later time.
Request Delivery Info Request
The fields themselves are bools which must be added in the paymentorder
field of the request, like the example below.
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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"paymentorder": {
"requestDeliveryInfo": true,
"restrictedToDeliveryInfoInstruments": true,
"operation": "Purchase",
"currency": "SEK",
"amount": 1500,
"vatAmount": 375,
"description": "Test Purchase",
"userAgent": "Mozilla/5.0...",
"language": "sv-SE",
"productName": "Checkout3", // Removed in 3.1, can be excluded in 3.0 if version is added in header
"urls": {
"hostUrls": [ "https://example.com", "https://example.net" ],
"completeUrl": "https://example.com/payment-completed",
"cancelUrl": "https://example.com/payment-cancelled",
"callbackUrl": "https://api.example.com/payment-callback"
},
"payeeInfo": {
"payeeId": "5cabf558-5283-482f-b252-4d58e06f6f3b",
"payeeReference": "AB832",
"payeeName": "Merchant1",
"productCategory": "A123",
"orderReference": "or-123456",
"subsite": "MySubsite",
"siteId": "MySiteId"
},
"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
},
{
"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"
]
}
],
"riskIndicator": {
"deliveryEmailAddress": "olivia.nyhuus@swedbankpay.com",
"deliveryTimeFrameIndicator": "01",
"preOrderDate": "19801231",
"preOrderPurchaseIndicator": "01",
"shipIndicator": "01",
"giftCardPurchase": false,
"reOrderPurchaseIndicator": "01",
"pickUpAddress": {
"name": "Olivia Nyhus",
"streetAddress": "Saltnestoppen 43",
"coAddress": "",
"city": "Saltnes",
"zipCode": "1642",
"countryCode": "NO"
}
}
}
}
paymentOrder
object
check
requestDeliveryInfo
bool
true if you want Swedbank Pay to return delivery information from the payment methods which support this. It will be visible in a GET response after the payment has been completed.
restrictedToDeliveryInfoInstruments
bool
true if you want to restrict your payment menu to only include payment methods which return delivery info.
operation
string
check
currency
string
check
amount
integer
check
vatAmount
integer
check
description
string
check
userAgent
string
check
language
string
check
productName
string
check
implementation
string
urls
object
check
urls object, containing the URLs relevant for the payment order.
hostUrls
array
check
completeUrl
string
check
cancelUrl
string
abort request of the payment or paymentorder.
callbackUrl
string
check
termsOfServiceUrl
string
check
payeeInfo
object
check
payeeId
string
check
payeeReference
string(30)
check
payeeName
string
productCategory
string(50)
check
orderReference
string(50)
check
subsite
string(40)
check
siteId
string(15)
payer
object
payer object containing information about the payer relevant for the payment order.
digitalProducts
bool
true for merchants who only sell digital goods and only require email and/or msisdn as shipping details. Set to false if the merchant also sells physical goods.
firstName
string
check
lastName
string
email
string
msisdn
string
payerReference
string
shippingAddress
object
payer. The field is related to 3-D Secure 2.
firstName
string
lastName
string
streetAddress
string
coAddress
string
zipCode
string
city
string
countryCode
string
billingAddress
object
firstName
string
lastName
string
streetAddress
string
coAddress
string
zipCode
string
city
string
countryCode
string
SE, NO, or FI.
accountInfo
object
payer containing info about the payer's account.
accountAgeIndicator
string
01 (No account, guest checkout) 02 (Created during this transaction) 03 (Less than 30 days old) 04 (30 to 60 days old) 05 (More than 60 days old)
accountChangeIndicator
string
01 (Changed during this transaction) 02 (Less than 30 days ago) 03 (30 to 60 days ago) 04 (More than 60 days ago)
accountChangePwdIndicator
string
01 (No changes) 02 (Changed during this transaction) 03 (Less than 30 days ago) 04 (30 to 60 days ago) 05 (More than 60 days old)
shippingAddressUsageIndicator
string
01 (This transaction) 02 (Less than 30 days ago) 03 (30 to 60 days ago) 04 (More than 60 days ago)
shippingNameIndicator
string
01 (Account name identical to shipping name) 02 (Account name different from shipping name)
suspiciousAccountActivity
string
01 (No suspicious activity has been observed) 02 (Suspicious activity has been observed)
orderItems
array
check
reference
string
check
name
string
check
type
string
check
PRODUCT, SERVICE, SHIPPING_FEE, PAYMENT_FEE DISCOUNT, VALUE_CODE or OTHER.
class
string
check
[\w-]*.
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
vatAmount
integer
check
restrictedToInstruments
array
riskIndicator
array
deliveryEmailAdress
string
deliveryTimeFrameIndicator
string
01 Electronic, 02 Same day, 03 Overnight, 04 Two-day or more.
preOrderDate
string
YYYYMMDD.
preOrderPurchaseIndicator
string
01 Merchandise available, 02 Future availability.
shipIndicator
string
giftCardPurchase
bool
true if this purchase is a gift card.
reOrderPurchaseIndicator
string
01 First time ordered, 02 Reordered.
pickUpAddress
object
shipIndicator is 04 (store pickup).
name
string
streetAddress
string
coAddress
string
city
string
zipCode
string
countryCode
string
Request Delivery Info Response
Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x/2.0
api-supported-versions: 3.x/2.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"paymentOrder": {
"id": "/psp/paymentorders/ca59fa8a-3423-40e5-0f77-08d9d133750b",
"created": "2022-01-07T07:58:26.1300282Z",
"updated": "2022-01-07T08:17:44.6839034Z",
"operation": "Purchase",
"status": "Initialized",
"currency": "SEK",
"amount": 1500,
"vatAmount": 375,
"description": "Test Purchase",
"initiatingSystemUserAgent": "swedbankpay-sdk-dotnet/3.0.1",
"language": "sv-SE",
"availableInstruments": [
"CreditCard",
"Invoice-PayExFinancingSe",
"Invoice-PayMonthlyInvoiceSe",
"Swish",
"CreditAccount",
"Trustly"
],
"instrumentMode": false,
"guestMode": false,
"payer": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payers"
},
"orderItems": {
"id": "/psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/orderitems"
},
"history": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/history"
},
"failed": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failed"
},
"aborted": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/aborted"
},
"paid": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/paid"
},
"cancelled": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/cancelled"
},
"financialTransactions": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/financialtransactions"
},
"failedAttempts": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failedattempts"
},
"metadata": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/metadata"
}
},
"operations": [
{
"href": "https://api.payex.com/psp/paymentorders/222a50ca-b268-4b32-16fa-08d6d3b73224",
"rel":"update-order",
"method":"PATCH",
"contentType":"application/json"
},
{
"href": "https://api.payex.com/psp/paymentorders/222a50ca-b268-4b32-16fa-08d6d3b73224",
"rel": "abort",
"method": "PATCH",
"contentType": "application/json"
},
{
"href": "https://api.payex.com/psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce",
"rel": "abort-paymentattempt",
"method": "PATCH",
"contentType": "application/json"
}
]
}
paymentOrder
object
id
string
created
string
updated
string
operation
string
status
string
Initialized is returned when the payment is created and still ongoing.
The request example above has this status. Paid is returned when the payer has completed the payment successfully.
See the Paid section for further information.
Failed is returned when a payment has failed. You will find an error message in the failed section.
Further information here.
Cancelled is returned when an authorized amount has been fully cancelled.
See the Cancel feature section for further information.
It will contain fields from both the cancelled description and paid section.
Aborted is returned when the merchant has aborted the payment or if the payer cancelled the payment
in the redirect integration (on the redirect page). See the
Abort feature section for further information.
currency
string
amount
integer
vatAmount
integer
description
string(40)
initiatingSystemUserAgent
string
language
string
availableInstruments
string
implementation
string
Enterprise or PaymentsOnly. Informational only.
integration
string
HostedView (Seamless View) or Redirect. Populated after UI is opened.
instrumentMode
bool
guestMode
bool
payerReference or nationalIdentifier in the original payment order request.
payer
id
payer resource.
orderItems
id
orderItems resource.
history
id
history resource.
failed
id
failed resource.
aborted
id
aborted resource.
paid
id
paid resource.
cancelled
id
cancelled resource.
financialTransactions
id
financialTransactions resource.
failedAttempts
id
failedAttempts resource.
metadata
id
metadata resource.
operations
array
abort, update-order and redirect-checkout or view-checkout, depending on the integration.
See Operations for details.