Aborted
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/aborted 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
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
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"aborted": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/aborted",
"abortReason": "Payment aborted by payer"
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
aborted |
object |
The abort object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
abortReason |
string |
Why the payment was aborted. |
Cancelled
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/cancelled 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
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"cancelled": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/paid",
"cancelReason": "<should be the description from the merchant when doing cancel on the authorisation payment>",
"instrument": "Creditcard",
"number": 1234567890,
"payeeReference": "CD123",
"orderReference": "AB1234",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"tokens": [
{
"type": "payment",
"token": "12345678-1234-1234-1234-1234567890AB",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "recurrence",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
}
],
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
}
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
cancelled |
object |
The cancel object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
cancelReason |
string |
Why the payment was cancelled. |
instrument |
string |
The payment method used in the fulfillment of the payment. Do not use this field for code validation purposes. To determine if a capture is needed, we recommend using operations or the transactionType field. |
number |
integer |
The transaction number , useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead. |
payeeReference |
string |
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles the settlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30) . If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12) . All characters must be digits. |
orderReference |
string(50) |
The order reference should reflect the order reference found in the merchant’s systems. |
transactionType |
string |
This will either be set to Authorization or Sale . Can be used to understand if there is a need for doing a capture on this payment order. Swedbank Pay recommends using the different operations to figure out if a capture is needed. |
amount |
integer |
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. |
submittedAmount |
integer |
This field will display the initial payment order amount, not including any discounts or fees specific to a payment method. The final payment order amount will be displayed in the amount field. |
feeAmount |
integer |
If the payment method used had a unique fee, it will be displayed in this field. |
discountAmount |
integer |
If the payment method used had a unique discount, it will be displayed in this field. |
tokens |
integer |
A list of tokens connected to the payment. |
type |
string |
payment , recurrence , transactionOnFile or unscheduled . The different types of available tokens. |
token |
string |
The token guid . |
name |
string |
The name of the token. In the example, a masked version of a card number. |
expiryDate |
string |
The expiry date of the token. |
details |
integer |
Details connected to the payment. |
nonPaymentToken |
string |
The result of our own card tokenization. Activated in POS for the merchant or merchant group. |
externalNonPaymentToken |
string |
The result of an external tokenization. This value will vary depending on card types, acquirers, customers, etc. For Mass Transit merchants, transactions redeemed by Visa will be populated with PAR. For Mastercard and Amex, it will be our own token. |
Failed
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/failed 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
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"failed": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/failed",
"problem": {
"type": "https://api.payex.com/psp/errordetail/creditcard/acquirererror",
"title": "Operation failed",
"status": 403,
"detail": "Unable to complete Authorization transaction, look at problem node!",
"problems": [
{
"name": "ExternalResponse",
"description": "REJECTED_BY_ACQUIRER-unknown error, response-code: 51"
}
]
}
}
}
Field | Type | Description |
paymentOrder |
object |
The payment order object. |
failed |
object |
The failed object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
problem |
object |
The problem object. |
type |
string |
The type of problem that occurred. |
title |
string |
The title of the problem that occurred. |
status |
integer |
The HTTP status code that the problem was served with. |
detail |
string |
A detailed, human readable description of the error. |
problems |
array |
The array of problem detail objects. |
name |
string |
The name of the field, header, object, entity or likewise that was erroneous. |
description |
string |
The human readable description of what was wrong with the field, header, object, entity or likewise identified by name . |
FailedAttempts
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/failedattempts 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
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
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"failedAttempts": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/failedattempts"
"failedAttemptList": [
{
"created": "2020-03-03T07:21:01.1893466Z",
"instrument": "CreditCard",
"number": 123456,
"status": "Aborted",
"problem": {
"type": "https://api.payex.com/psp/errordetail/creditcard/3dsecureusercanceled",
"title": "Operation failed",
"status": 403,
"detail": "Unable to complete VerifyAuthentication transaction, look at problem node!",
"problems": [
{
"name": "ExternalResponse",
"description": "UserCancelled-CANCELED"
}
]
}
},
{
"created": "2020-03-03T07:21:01.1893466Z",
"instrument": "Vipps",
"number": 123457,
"status": "Failed",
"operationalFee": false,
"problem": {
"type": "https://api.payex.com/psp/errordetail/vipps/vippsdeclined",
"title": "Operation failed",
"status": 403,
"detail": "Unable to complete Vipps transaction. failedReason: VippsPaymentCancel,ErrorDescription: Received status USER_CANCEL from Vipps",
"problems": []
}
},
{
"created": "2020-03-03T07:22:21.1893466Z",
"instrument": "CreditCard",
"number": 123458,
"status": "Failed",
"problem": {
"type": "https://api.payex.com/psp/errordetail/creditcard/3dsecureacquirergatewayerror",
"title": "Operation failed",
"status": 502,
"detail": "Unable to complete VerifyAuthentication transaction, look at problem node!",
"problems": [
{
"name": "ExternalResponse",
"description": "ARCOT_MERCHANT_PLUGIN_ERROR-merchant plugin error [98]: This is a triggered error message."
}
]
}
}
]
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
failedAttempts |
object |
The failed attempt object. |
failedAttemptList |
array |
The array of failed attempts. |
created |
string |
The ISO-8601 date of when the payment order was created. |
instrument |
string |
Payment method used in the failed payment. |
number |
integer |
The paymentorder number , useful when there’s need to reference the paymentorder in human communication. Not usable for programmatic identification of the paymentorder, where id should be used instead. |
status |
string |
The status of the payment attempt. Failed or Aborted . |
operationalFee |
bool |
A field specific for Vipps. Set to true if an operational fee for receiving card information from Vipps has been generated. Set to false if no such fee has been generated. |
problem |
object |
The problem object. |
type |
string |
The type of problem that occurred. |
title |
string |
The title of the problem that occurred. |
status |
integer |
The HTTP status code that the problem was served with. |
detail |
string |
A detailed, human readable description of the error. |
problems |
array |
The array of problem detail objects. |
name |
string |
The name of the field, header, object, entity or likewise that was erroneous. |
description |
string |
The human readable description of what was wrong with the field, header, object, entity or likewise identified by name . |
FailedPostPurchaseAttempts
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/failedpostpurchaseattempts HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Accept: application/json;version=3.x
Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"postPurchaseFailedAttempts": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/postpurchasefailedattempts",
"postpurchaseFailedAttemptList": [
{
"created": "2020-03-03T07:21:01.1893466Z",
"status": "Failed",
"type": "Capture",
"number": 12345678,
"problem": {
"type": "https://api.payex.com/psp/errordetail/creditcard/badrequest",
"title": "Operation failed",
"status": 400,
"detail": "Unable to complete CreateCapture operation, look at problem node!",
"problems": [
{
"name":"Entitynotfound",
"description":"Capture with identifier f1c8c67b-88cb-407c-98fb-08db6f56295e could not be found"
},
{
"name":"Component",
"description":"pospay-ecommerce-financial-service"
},
{
"name":"Method",
"description":"N/A"
}
]
}
}
]
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
postpurchasefailedAttempts |
object |
The failed attempt object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
postpurchaseFailedAttemptList |
array |
The array of failed attempts. |
created |
string |
The ISO-8601 date of when the payment order was created. |
status |
string |
The status of the payment attempt. Failed or Aborted . |
type |
string |
The type of post-purchase transaction. |
number |
string |
The attempt number of the post-purchase operation. |
problem |
object |
The problem object. |
type |
string |
The type of problem that occurred. |
title |
string |
The title of the problem that occurred. |
status |
integer |
The HTTP status code that the problem was served with. |
detail |
string |
A detailed, human readable description of the error. |
problems |
array |
The array of problem detail objects. |
name |
string |
The name of the field, header, object, entity or likewise that was erroneous. |
description |
string |
The human readable description of what was wrong with the field, header, object, entity or likewise identified by name . |
FinancialTransactions
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/financialtransactions 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
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
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"financialTransactions" {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions",
"financialTransactionsList": [
{
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/7e6cdfc3-1276-44e9-9992-7cf4419750e1",
"created": "2020-03-04T01:01:01.01Z",
"updated": "2020-03-04T01:01:01.03Z",
"type": "Capture",
"number": 123459,
"amount": 1000,
"vatAmount": 250,
"description": "Test transaction1",
"payeeReference": "AH123456",
"receiptReference": "OL1234"
"orderItems": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/7e6cdfc3-1276-44e9-9992-7cf4419750e1/orderitems"
}
},
{
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/<transactionId>",
"created": "2020-03-05T01:01:01.01Z",
"updated": "2020-03-05T01:01:01.03Z",
"type": "Capture",
"number": 123460,
"amount": 500,
"vatAmount": 125,
"description": "Test transaction2",
"payeeReference": "AH234567",
"receiptReference": "OL5678"
"orderItems": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/7e6cdfc3-1276-44e9-9992-7cf4419750e1/orderitems"
}
},
{
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/<transactionId>",
"created": "2020-04-02T01:01:01.01Z",
"updated": "2020-04-02T01:01:01.03Z",
"type": "Reversal",
"number": 123461,
"amount": 1000,
"vatAmount": 250,
"description": "Test transaction3",
"payeeReference": "AH345678",
"receiptReference": "OL1357"
"orderItems": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/financialtransactions/7e6cdfc3-1276-44e9-9992-7cf4419750e1/orderitems"
}
}
]
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
financialTransactions |
object |
The financial transactions object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
financialTransactionsList |
array |
The array of financial transactions. |
id |
string |
The id of the financial transaction. |
created |
string |
The ISO-8601 date of when the payment order was created. |
updated |
string |
The ISO-8601 date of when the payment order was updated. |
type |
string |
The type of transaction. Capture , Authorization , Cancellation , Reversal , Sale . |
number |
integer |
The paymentorder number , useful when there’s need to reference the paymentorder in human communication. Not usable for programmatic identification of the paymentorder, where id should be used instead. |
amount |
integer |
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 |
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. |
description |
string |
The description of the payment order. |
payeeReference |
string |
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles the settlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30) . If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12) . All characters must be digits. |
receiptReference |
string(30) |
A unique reference to the transaction, provided by the merchant. Can be used as an invoice or receipt number as a supplement to payeeReference . |
orderItems |
array |
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. |
History
We advise you to not build logic around the content of these fields. They are mainly for information purposes, and might be subject to name changes. If these should occur, updates will be available in the list below.
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/history 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"history": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/history",
"historyList": [
{
"created": "2020-03-04T01:00:00.00Z",
"name": "PaymentCreated",
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T01:01:00.00Z",
"name": "PaymentLoaded",
"initiatedBy" "System"
},
{
"created": "2020-03-04T01:00:15.00Z",
"name": "CheckinInitiated",
"initiatedBy" "System"
},
{
"created": "2020-03-04T01:00:16.00Z",
"name": "PayerDetailsRetrieved",
"initiatedBy" "System"
},
{
"created": "2020-03-04T01:00:20.00Z",
"name": "PayerCheckedIn",
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T01:01:01.01Z",
"name": "PaymentInstrumentSelected",
"instrument": "CreditCard",
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T01:03:01.01Z",
"name": "PaymentAttemptStarted",
"instrument": "CreditCard",
"number": 123456,
"prefill": true,
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T01:03:01.01Z",
"name": "PaymentAttemptAborted",
"number": 123456,
"instrument": "CreditCard",
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentInstrumentSelected",
"instrument": "Vipps",
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T03:01:01.01Z",
"name": "PaymentInstrumentSelected",
"instrument": "CreditCard",
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentAttemptStarted",
"instrument": "CreditCard",
"number": 123457,
"prefill": true,
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentAttemptFailed",
"instrument": "CreditCard",
"number": 123457,
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentAttemptStarted",
"instrument": "CreditCard",
"number": 123458,
"prefill": true,
"initiatedBy" "Consumer"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentPaid",
"instrument": "CreditCard"
"number": 123458,
"initiatedBy" "Consumer"
},
{
"created": "2020-03-05T02:01:01.01Z",
"name": "PaymentPartiallyCaptured",
"instrument": "CreditCard"
"number": 123459,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-06T02:01:01.01Z",
"name": "PaymentPartiallyCaptured",
"instrument": "CreditCard"
"number": 123460,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-07T02:01:01.01Z",
"name": "PaymentPartiallyReversed",
"instrument": "CreditCard"
"number": 123461,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentCapturedFailed",
"instrument": "CreditCard",
"number": 123462,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentPartiallyCapturedFailed",
"instrument": "CreditCard",
"number": 123463,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentReversedFailed",
"instrument": "CreditCard",
"number": 123464,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentPartiallyReversedFailed",
"instrument": "CreditCard",
"number": 123465,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentCancelledFailed",
"instrument": "CreditCard",
"number": 123466,
"initiatedBy" "Merchant"
},
{
"created": "2020-03-04T02:01:01.01Z",
"name": "PaymentPartiallyCancelledFailed",
"instrument": "CreditCard",
"number": 123467,
"initiatedBy" "Merchant"
}
]
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
history |
object |
The history object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
historyList |
array |
The array of history objects. |
created |
string |
The ISO-8601 date of when the history event was created. |
name |
string |
Name of the history event. See list below for information. |
instrument |
string |
The payment method used when the event occurred. |
number |
integer |
Payment number associated with the event. |
prefill |
bool |
Indicates if payment info was prefilled or not. |
History Event Name | Description |
---|---|
PaymentCreated |
This event will occur as soon as the merchant initiates the payment order. |
CheckinInitiated |
Will be set when checkin is started, if checkin is activated for the merchant. The merchant must be configured with ProductPackage=Checkout |
PayerDetailsRetrieved |
Will be set if a consumer profile is found. The merchant must be configured with ProductPackage=Checkout |
PayerCheckedIn |
Will be set when checkin is completed. The merchant must be configured with ProductPackage=Checkout |
PaymentInstrumentSet |
If the PaymentOrder is initiated in Instrument Mode, the first occurrence will be set to the value from the merchant´s POST statement. Following values will be set for each time the merchant to a PATCH to change the payment method used for that payment. The payment method set will be in the instrument parameter. |
PaymentLoaded |
Will be set the first time the payer loads the payment window. If this event hasn’t occurred, the payment window hasn’t been loaded. |
PaymentInstrumentSelected |
Will occur each time the payer expands a payment method in the payment UI. The payment method selected will be set in the instrument parameter. |
PaymentAttemptStarted |
Will occur when the payer presses the first button in the payment process (either “pay” or “next” if the payment has multiple steps). The instrument parameter will contain the payment method for this attempt. The prefill will be true if the payment page was prefilled with payment information. The transaction number for this payment will be available in the number field. |
PaymentAttemptAborted |
Will occur if the payer aborts the payment attempt. Both the number and instrument parameters will be available on this event. |
PaymentAttemptFailed |
Will occur if the payment failed. Both the number and instrument parameters will be available on this event. |
PaymentPaid |
Will occur if the payment succeeds. Both the number and instrument parameters will be available on this event. |
PaymentCaptured |
Will occur when the merchant has captured the full authorization amount. Both the number and instrument parameters will be available on this event. The number of this event will point to a number in the financialTransaction field for easy linking. |
PaymentPartiallyCaptured |
Will occur when the merchant has done a partial capture of authorization amount. Both the number and instrument parameters will be available on this event. The number of this event will point to a number in the financialTransaction field for easy linking. |
PaymentCancelled |
Will occur when the merchant has cancelled the full authorization amount. Both the number and instrument parameters will be available on this event. |
PaymentPartiallyCancelled |
Will occur when the merchant has cancelled part of the authorization amount. Both the number and instrument parameters will be available on this event. |
PaymentReversed |
Will occur when the merchant reverses the full authorization amount. Both the number and instrument parameters will be available on this event. The number of this event will point to a number in the financialTransaction field for easy linking. |
PaymentPartiallyReversed |
Will occur when the merchant reverses a part of the authorization amount. Both the number and instrument parameters will be available on this event. The number of this event will point to a number in the financialTransaction field for easy linking. |
PaymentCapturedFailed |
Will occur when the merchant has tried - but failed - to do a full capture of the authorization amount. The number (nullable) of this event will point to a number in the financialTransaction node for easy linking. |
PaymentPartiallyCapturedFailed |
Will occur when the merchant has tried - but failed - to do a partial capture of the authorization amount. The number (nullable) of this event will point to a number in the financialTransaction node for easy linking. |
PaymentReversedFailed |
Will occur when the merchant has tried - but failed - to do a reversal of the fully captured authorization amount. The number parameter might be available on this event. If present, it will point to a number in the financialTransaction field for easy linking. |
PaymentPartiallyReversedFailed |
Will occur when the merchant has tried - but failed - to do a partial reversal of the captured authorization amount. The number parameter might be available on this event. If present, it will point to a number in the financialTransaction field for easy linking. |
PaymentCancelledFailed |
Will occur when the merchant has tried - but failed - to do a full cancel of the authorization amount. The number (nullable) of this event will point to a number in the financialTransaction node for easy linking. |
PaymentPartiallyCancelledFailed |
Will occur when the merchant has tried - but failed - to cancel the remaining (uncaptured) parts of authorizated amount. The number (nullable) of this event will point to a number in the financialTransaction node for easy linking. |
Paid
The payment order response with status
equal to Paid
, and the paid
resource expanded. Please note that the main code example is of a card payment.
We have included paid
resources of the remaining payment methods below the
main code example. Resource examples where details are empty indicate that no
details are available.
The wallets Apple Pay and Vipps do not return maskedPan
. Please note that
while MobilePay does return this field, the value present is actually a
networkToken
, which represents the PAN, but is not a PAN in itself.
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/paid 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
Card Paid
Resource
Card 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/paid",
"instrument": "Creditcard",
"number": 1234567890,
"payeeReference": "CD123",
"orderReference": "AB1234",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"tokens": [
{
"type": "payment",
"token": "12345678-1234-1234-1234-1234567890AB",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "recurrence",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "unscheduled",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "transactionsOnFile",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
}
],
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"paymentAccountReference": "43f6b6d2cbd30c36627ec02247259",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004", // Same format as maskedDpan for enrolled network tokenization cards
"maskedDPan": "***********1234",
"expiryDate": "12/2022",
"issuerAuthorizationApprovalCode": "L00302",
"acquirerTransactionType": "STANDARD",
"acquirerStan": "302",
"acquirerTerminalId": "70101301389",
"acquirerTransactionTime": "2022-06-15T14:12:55.029Z",
"transactionInitiator": "CARDHOLDER",
"bin": "492500"
}
}
Apple Pay Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Apple Pay 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/paid",
"instrument": "ApplePay",
"number": 80100001190,
"payeeReference": "1662360210",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {
"cardBrand": "Visa",
"cardType": "Credit",
"maskedDPan": "492500******0004",
"expiryDate": "12/2023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER",
"bin": "492500"
}
}
}
Click to Pay paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Click to Pay 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/paid",
"instrument": "ClickToPay",
"number": 80100001190,
"payeeReference": "1662360210",
"amount": 1500,
"paymentTokenGenerated": false,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004",
"maskedDPan": "492500******0004",
"expiryDate": "12/0023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER"
"bin": "489537"
}
}
}
Google Pay™ paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Google Pay™ 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/paid",
"instrument": "GooglePay",
"number": 80100001190,
"payeeReference": "1662360210",
"amount": 1500,
"paymentTokenGenerated": false,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004",
"maskedDPan": "492500******0004",
"expiryDate": "12/0023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER"
"bin": "489537"
}
}
}
MobilePay Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
MobilePay 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/efdcbf77-9a62-426b-a3b1-08da8caf7918/paid",
"instrument": "MobilePay",
"number": 75100106637,
"payeeReference": "1662364327",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"maskedDPan": "492500******0004",
"expiryDate": "12/2022",
"issuerAuthorizationApprovalCode": "018117",
"acquirerTransactionType": "MOBILEPAY",
"acquirerStan": "53889",
"acquirerTerminalId": "42",
"acquirerTransactionTime": "2022-09-05T09:54:05Z",
"bin": "489537"
}
}
}
Vipps Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Vipps 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/a463b145-3278-4aa0-c4db-08da8f1813a2/paid",
"instrument": "Vipps",
"number": 99463794,
"payeeReference": "1662366424",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"maskedDPan": "492500******0004",
"acquirerTransactionType": "WALLET",
"acquirerTerminalId": "99488282",
"acquirerTransactionTime": "2022-09-05T09:54:05Z",
"transactionInitiator": "CARDHOLDER",
"bin": "489537"
}
}
}
Swish Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Swish 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/b0410cd0-61df-4548-a3ad-08da8caf7918/paid",
"instrument": "Swish",
"number": 74100413405,
"payeeReference": "1662360831",
"transactionType": "Sale",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {
"misidn": "+46739000001"
}
}
}
Invoice Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Invoice 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/05a356df-05e2-49e6-8858-08da8cb4d651/paid",
"instrument": "Invoice",
"number": 71100775379,
"payeeReference": "1662360980",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {}
}
}
Installment Account Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Installment Account 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/39eef759-a619-4c91-885b-08da8cb4d651/paid",
"instrument": "CreditAccount",
"number": 77100038000,
"payeeReference": "1662361777",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {}
}
}
Trustly Paid
Resource
Please note that this is an abbreviated example. See the main paid
example for
more context.
Trustly 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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"paid": {
"id": "/psp/paymentorders/bf660901-93d0-4245-4e6b-08da8f165366/paid",
"instrument": "Trustly",
"number": 79100113652,
"payeeReference": "1662373401",
"orderReference": "orderReference",
"transactionType": "Sale",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"paymentTokenGenerated": false,
"details": {
"trustlyOrderId": 123456789
}
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
paid |
object |
The paid object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
instrument |
string |
The payment method used in the fulfillment of the payment. Do not use this field for code validation purposes. To determine if a capture is needed, we recommend using operations or the transactionType field. |
number |
integer |
The paymentorder number , useful when there’s need to reference the paymentorder in human communication. Not usable for programmatic identification of the paymentorder, where id should be used instead. |
payeeReference |
string |
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles the settlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30) . If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12) . All characters must be digits. |
orderReference |
string(50) |
The order reference should reflect the order reference found in the merchant’s systems. |
transactionType |
string |
This will either be set to Authorization or Sale . Can be used to understand if there is a need for doing a capture on this payment order. Swedbank Pay recommends using the different operations to figure out if a capture is needed. |
amount |
integer |
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. |
submittedAmount |
integer |
This field will display the initial payment order amount, not including any discounts or fees specific to a payment method. The final payment order amount will be displayed in the amount field. |
feeAmount |
integer |
If the payment method used had a unique fee, it will be displayed in this field. |
discountAmount |
integer |
If the payment method used had a unique discount, it will be displayed in this field. |
paymentTokenGenerated |
bool |
Set to true or false . Used to show if a payment token has been generated or not. Will be set to true if the checkbox enabled by EnablePaymentDetailsConsentCheckbox has been checked by the payer during a payment, otherwise false . |
tokens |
integer |
A list of tokens connected to the payment. |
type |
string |
payment , recurrence , transactionOnFile or unscheduled . The different types of available tokens. |
token |
string |
The token guid . |
name |
string |
The name of the token. In the example, a masked version of a card number. |
expiryDate |
string |
The expiry date of the token. |
details |
integer |
Details connected to the payment. |
nonPaymentToken |
string |
The result of our own card tokenization. Activated in POS for the merchant or merchant group. |
externalNonPaymentToken |
string |
The result of an external tokenization. This value will vary depending on card types, acquirers, customers, etc. For Mass Transit merchants, transactions will be populated with the paymentAccountReference . |
paymentAccountReference |
string |
The result of an external tokenization. The value will vary depending on card types, acquirers, customers, etc. For Mass Transit merchants, the paymentAccountReference will also populate the externalNonPaymentToken field. |
cardType |
string |
Credit Card or Debit Card . Indicates the type of card used for the authorization. |
maskedPan |
string |
The masked PAN number of the card. |
maskedDPan |
string |
A masked version of a network token representing the card. It will only appear if the chosen payment method is tokenized and the card used is tokenized by Visa or MasterCard. |
expiryDate |
string |
The month and year of when the card expires. |
issuerAuthorizationApprovalCode |
string |
Payment reference code provided by the issuer. |
acquirerTransactionType |
string |
3DSECURE or STANDARD . Indicates the transaction type of the acquirer. |
acquirerStan |
string |
The System Trace Audit Number assigned by the acquirer to uniquely identify the transaction. |
acquirerTerminalId |
string |
The ID of the acquirer terminal. |
acquirerTransactionTime |
string |
The ISO-8601 date and time of the acquirer transaction. |
transactionInitatior |
string |
The party which initiated the transaction. MERCHANT or CARDHOLDER . |
bin |
string |
The first six digits of the maskedPan. |
msisdn |
string |
The msisdn used in the purchase. Only available when paid with Swish. |
Payer
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
{
"paymentorder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"payer": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payers",
"reference": "reference to payer"
"name": "Azra Oliveira",
"email": "azra@payex.com",
"msisdn": "+46722345678",
"gender": "male",
"birthYear": "1980",
"hashedFields": {
"emailHash": "968e23eda8818f8647d15775c939b3bc32ba592e",
"msisdnHash": "a23ec9d5b9def87cae2769cfffb0b8a0487a5afd" ,
"socialSecurityNumberHash": "50288c11d79c1ba0671e6426ffddbb4954347ba4"
},
"shippingAddress": {
"addressee": "firstName + lastName",
"coAddress": "coAddress",
"streetAddress": "streetAddress",
"zipCode": "zipCode",
"city": "city",
"countryCode": "countryCode"
},
"device": {
"detectionAccuracy": 48,
"ipAddress": "127.0.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.62",
"deviceType": "Desktop",
"hardwareFamily": "Emulator",
"hardwareName": "Desktop|Emulator",
"hardwareVendor": "Unknown",
"platformName": "Windows",
"platformVendor": "Microsoft",
"platformVersion": "10.0",
"browserName": "Edge (Chromium) for Windows",
"browserVendor": "Microsoft",
"browserVersion": "95.0",
"browserJavaEnabled": false
}
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
payer |
object |
The payer object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
reference |
string |
The reference to the payer. In checkout, this will be the consumerReference . |
name |
string |
The name of the payer. |
email |
string |
The email address of the payer. |
msisdn |
string |
The msisdn of the payer. |
gender |
string |
The gender of the payer. |
birthYear |
string |
The birth year of the payer. |
hashedFields |
object |
The hashedFields object, containing hashed versions of the payer’s email, msisdn and if present, Social Security Number. |
emailHash |
string |
A hashed version of the payer’s email. |
msisdnHash |
string |
A hashed version of the payer’s email. |
socialSecurityNumberHash |
string |
A hashed version of the payer’s social security number. |
shippingAddress |
object |
The shipping address object related to the payer . |
addressee |
string |
First and last name of the addressee – the receiver of the shipped goods. |
coAddress |
string |
Payer’s c/o address, if applicable. |
streetAddress |
string |
Payer’s street address. Maximum 50 characters long. |
coAddress |
string |
Payer’s c/o address, if applicable. |
zipCode |
string |
Payer’s zip code. |
city |
string |
Payer’s city of residence. |
countryCode |
string |
Country code for country of residence, e.g. SE , NO , or FI . |
device |
object |
The device detection object. |
detectionAccuracy |
string |
Indicates the accuracy of the device detection on a scale from 0 to 100. |
ipAddress |
string |
The IP address of the payer’s device. |
userAgent |
string |
The user agent of the payer. Should typically be set to the value of the User-Agent header sent by the payer’s web browser. |
deviceType |
string |
The type of device used by the payer. |
hardwareFamily |
string |
The type of hardware used by the payer. |
hardwareName |
string |
The name of the payer’s hardware. |
hardwareVendor |
string |
The vendor of the payer’s hardware. |
platformName |
string |
Name of the operating system used on the payer’s device. |
platformVendor |
string |
Vendor of the operating system used on the payer’s device. |
platformVersion |
string |
Version of the operating system used on the payer’s device. |
browserName |
string |
Name of the browser used on the payer’s device. |
browserVendor |
string |
Vendor of the browser used on the payer’s device. |
browserVersion |
string |
Version of the browser used on the payer’s device. |
browserJavaEnabled |
bool |
Indicates if the browser has Java enabled. Either true or false . |
Reversed
The payment order response with status
equal to Reversed
, and the reversed
resource expanded. Please note that the main code example is of a card reversal.
Apart from the id and number fields, the output will be inherited from the
corresponding Paid
transaction. As several Reversed
transactions can exist
on a single payment, the number and payerReference will be from the latest
Reversed
.
We have included reversal
resources of the remaining payment methods below the
main code example. Resource examples where details are empty indicate that no
details are available.
The wallets Apple Pay and Vipps do not return maskedPan
. Please note that
while MobilePay does return this field, the value present is actually a
networkToken
, which represents the PAN, but is not a PAN in itself.
Request
1
2
3
4
GET /psp/paymentorders/09ccd29a-7c4f-4752-9396-12100cbfecce/reversed HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x
Card Reversed
Resource
Card Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c/reversed",
"instrument": "Creditcard",
"number": 1234567890,
"payeeReference": "CD123",
"orderReference": "AB1234",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"tokens": [
{
"type": "payment",
"token": "12345678-1234-1234-1234-1234567890AB",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "recurrence",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "unscheduled",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
},
{
"type": "transactionsOnFile",
"token": "87654321-4321-4321-4321-BA0987654321",
"name": "4925xxxxxx000004",
"expiryDate" : "mm/yyyy"
}
],
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"paymentAccountReference": "43f6b6d2cbd30c36627ec02247259",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004",
"maskedDPan": "49250000******04",
"expiryDate": "12/2022",
"issuerAuthorizationApprovalCode": "L00302",
"acquirerTransactionType": "STANDARD",
"acquirerStan": "302",
"acquirerTerminalId": "70101301389",
"acquirerTransactionTime": "2022-06-15T14:12:55.029Z",
"transactionInitiator": "CARDHOLDER",
"bin": "492500"
}
}
Apple Pay Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Apple Pay Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/reversed",
"instrument": "ApplePay",
"number": 80100001190,
"payeeReference": "1662360210",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {
"cardBrand": "Visa",
"cardType": "Credit",
"maskedDPan": "49250000******04",
"expiryDate": "12/2023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER",
"bin": "492500"
}
}
}
Click to Pay Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Click to Pay Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/reversed",
"instrument": "ClickToPay",
"number": 80100001190,
"payeeReference": "1662360210",
"amount": 1500,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004",
"maskedDPan": "49250000******04",
"expiryDate": "12/0023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER"
"bin": "489537"
}
}
}
Google Pay™ Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Google Pay™ Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/1f8d409e-8d8c-4ba1-a3ab-08da8caf7918/reversed",
"instrument": "GooglePay",
"number": 80100001190,
"payeeReference": "1662360210",
"amount": 1500,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"cardType": "Credit",
"maskedPan": "492500******0004",
"maskedDPan": "49250000******04",
"expiryDate": "12/0023",
"issuerAuthorizationApprovalCode": "L00392",
"acquirerTransactionType": "WALLET",
"acquirerStan": "392",
"acquirerTerminalId": "80100001190",
"acquirerTransactionTime": "2022-09-05T06:45:40.322Z",
"transactionInitiator": "CARDHOLDER"
"bin": "489537"
}
}
}
MobilePay Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
MobilePay Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/efdcbf77-9a62-426b-a3b1-08da8caf7918/reversed",
"instrument": "MobilePay",
"number": 75100106637,
"payeeReference": "1662364327",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"maskedDPan": "48953700******04",
"expiryDate": "12/2022",
"issuerAuthorizationApprovalCode": "018117",
"acquirerTransactionType": "MOBILEPAY",
"acquirerStan": "53889",
"acquirerTerminalId": "42",
"acquirerTransactionTime": "2022-09-05T09:54:05Z",
"bin": "489537"
}
}
}
Vipps Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Vipps Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
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
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/a463b145-3278-4aa0-c4db-08da8f1813a2/reversed",
"instrument": "Vipps",
"number": 99463794,
"payeeReference": "1662366424",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {
"nonPaymentToken": "12345678-1234-1234-1234-1234567890AB",
"externalNonPaymentToken": "1234567890",
"cardBrand": "Visa",
"maskedDPan": "49250000******04",
"acquirerTransactionType": "WALLET",
"acquirerTerminalId": "99488282",
"acquirerTransactionTime": "2022-09-05T09:54:05Z",
"transactionInitiator": "CARDHOLDER",
"bin": "489537"
}
}
}
Swish Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Swish Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/b0410cd0-61df-4548-a3ad-08da8caf7918/reversed",
"instrument": "Swish",
"number": 74100413405,
"payeeReference": "1662360831",
"transactionType": "Sale",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {
"misidn": "+46739000001"
}
}
}
Invoice Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Invoice Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/05a356df-05e2-49e6-8858-08da8cb4d651/reversed",
"instrument": "Invoice",
"number": 71100775379,
"payeeReference": "1662360980",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {}
}
}
Installment Account Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Installment Account Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/39eef759-a619-4c91-885b-08da8cb4d651/reversed",
"instrument": "CreditAccount",
"number": 77100038000,
"payeeReference": "1662361777",
"transactionType": "Authorization",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {}
}
}
Trustly Reversed
Resource
Please note that this is an abbreviated example. See the main Reversed
example
for more context.
Trustly Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.x
api-supported-versions: 3.x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"paymentOrder": "/psp/paymentorders/5adc265f-f87f-4313-577e-08d3dca1a26c",
"reversed": {
"id": "/psp/paymentorders/bf660901-93d0-4245-4e6b-08da8f165366/reversed",
"instrument": "Trustly",
"number": 79100113652,
"payeeReference": "1662373401",
"orderReference": "orderReference",
"transactionType": "Sale",
"amount": 1500,
"submittedAmount": 1500,
"feeAmount": 0,
"discountAmount": 0,
"details": {
"trustlyOrderId": 123456789
}
}
}
Field | Type | Description |
---|---|---|
paymentOrder |
object |
The payment order object. |
reversed |
object |
The reversed object. |
id |
string |
The relative URL and unique identifier of the paymentorder resource . Please read about URL Usage to understand how this and other URLs should be used in your solution. |
instrument |
string |
The payment method used in the fulfillment of the payment. Do not use this field for code validation purposes. To determine if a capture is needed, we recommend using operations or the transactionType field. |
number |
integer |
The paymentorder number , useful when there’s need to reference the paymentorder in human communication. Not usable for programmatic identification of the paymentorder, where id should be used instead. |
payeeReference |
string |
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles the settlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30) . If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12) . All characters must be digits. |
orderReference |
string(50) |
The order reference should reflect the order reference found in the merchant’s systems. |
transactionType |
string |
This will either be set to Authorization or Sale . Can be used to understand if there is a need for doing a capture on this payment order. Swedbank Pay recommends using the different operations to figure out if a capture is needed. |
amount |
integer |
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. |
submittedAmount |
integer |
This field will display the initial payment order amount, not including any method specific discounts or fees. The final payment order amount will be displayed in the amount field. |
feeAmount |
integer |
If the payment method used had a unique fee, it will be displayed in this field. |
discountAmount |
integer |
If the payment method used had a unique discount, it will be displayed in this field. |
tokens |
integer |
A list of tokens connected to the payment. |
type |
string |
payment , recurrence , transactionOnFile or unscheduled . The different types of available tokens. |
token |
string |
The token guid . |
name |
string |
The name of the token. In the example, a masked version of a card number. |
expiryDate |
string |
The expiry date of the token. |
details |
integer |
Details connected to the payment. |
nonPaymentToken |
string |
The result of our own card tokenization. Activated in POS for the merchant or merchant group. |
externalNonPaymentToken |
string |
The result of an external tokenization. This value will vary depending on card types, acquirers, customers, etc. For Mass Transit merchants, transactions will be populated with the paymentAccountReference . |
paymentAccountReference |
string |
The result of an external tokenization. The value will vary depending on card types, acquirers, customers, etc. For Mass Transit merchants, the paymentAccountReference will also populate the externalNonPaymentToken field. |
cardType |
string |
Credit Card or Debit Card . Indicates the type of card used for the authorization. |
maskedPan |
string |
The masked PAN number of the card. |
maskedDPan |
string |
A masked version of a network token representing the card. It will only appear if the chosen payment method is tokenized and the card used is tokenized by Visa or MasterCard. |
expiryDate |
string |
The month and year of when the card expires. |
issuerAuthorizationApprovalCode |
string |
Payment reference code provided by the issuer. |
acquirerTransactionType |
string |
3DSECURE or STANDARD . Indicates the transaction type of the acquirer. |
acquirerStan |
string |
The System Trace Audit Number assigned by the acquirer to uniquely identify the transaction. |
acquirerTerminalId |
string |
The ID of the acquirer terminal. |
acquirerTransactionTime |
string |
The ISO-8601 date and time of the acquirer transaction. |
transactionInitatior |
string |
The party which initiated the transaction. MERCHANT or CARDHOLDER . |
bin |
string |
The first six digits of the maskedPan. |
msisdn |
string |
The msisdn used in the purchase. Only available when paid with Swish. |