Mapping payerOwnedTokens vs. Payer API
What is payerOwnedTokens?
payerOwnedTokens was a PaymentOrder API endpoint (v2.0/v3.0/v3.1) used to
retrieve and update tokens asssociated to a specific payerReference. This
endpoint will be removed in v3.2 and replaced by the Payer API.
What is Payer API?
Payer API is the new, authoritative service used to retrieve, update and manage tokens for a payer.
Old (PaymentOrder API) |
New (Payer API) | Description |
|---|---|---|
GET /payerownedtokens/<payerReference> |
GET /online/payers/<payerReference> |
Retrieves active tokens for a payer |
PATCH /payerownedtokens/<payerReference> |
PATCH /online/payers/<payerReference> |
Archives all tokens for a payer |
GET /paymenttokens/<token> |
GET /online/payers/tokens/<tokenId> |
Retrieves a single token |
PATCH /paymenttokens/<token> |
PATCH /online/payers/tokens/<tokenId> |
Archives or updates token |
Code Examples
All the Payer API requests/responses you’ll need.
GET All Payer Tokens
Old (PaymentOrder API) GET All Tokens Request
1
2
3
GET /psp/paymentorders/payerownedtokens/<payerReference> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
New (Payer API) GET All Tokens Request
1
2
3
GET /online/payers/<payerReference>/tokens HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
GET All Tokens 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
{
"tokens": {
"id": "/online/payers/<payerReference>",
"payerReference": "customer-123",
"tokensList": [
{
"id": "/online/payers/tokens/<token>-<tokenType>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "CreditCard",
"displayName": "492500******0004",
"state": "Active"
}
]
}
}
Archive All Tokens
Old (PaymentOrder API) Archive All Tokens Request
1
2
3
PATCH /psp/paymentorders/payerownedtokens/<payerReference> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
New (Payer API) Archive All Tokens Request
1
2
3
PATCH /online/payers/<payerReference>/archives HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
GET Single Token
Old (PaymentOrder API) GET Single Token Request
1
2
3
GET /psp/paymentorders/paymenttokens/<tokenid> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
New (Payer API) GET Single Token Request
1
2
3
GET /online/payers/tokens/<token>-<tokenType> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <token>
Important Differences
-
Payer API gives you a more structured and long-term token handling.
-
All new integrations must use the Payer API, not
payerOwnedTokens. -
Token types and status (Active/Archived) are the same, but the Payer API has more detailed fields and better support for the token lifecycle.
New (Payer) APIs
All Payer APIs with requests and responses.
GET Single Payer Token
A GET request used when you need to retrieve a single token.
GET Single Payer Token Request
GET Single Payer Token Request
1
2
3
GET /online/payers/tokens/<token>-<tokenType> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
GET Single Payer Token Response
GET Single Payer Token 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
{
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"token": {
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "Trustly",
"displayName": "*****232",
"correlationId": "895e495f71a0b8e9f8085024f2947704a18ada29bc7ef78b59302c414fb6c190c295c088bd1a8707db5f507dd0e8349405414eee393f98538e00b1f7360f0d52",
"state": "Archived",
"archivedBy": "PAYEE",
"archiveReason": "string",
"networkTokenized": false,
"instrumentParameters": {
"maskedAccountNumber": "*****232",
"accountId": "6224691047"
}
}
}
id
string
payerReference
object
migratedFromConsumerProfile
bool
True or false, indicates if the token was migrated from a consumer profile or not.
token
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
Archived and indicates who archived it.
Can either be PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
Archived and indicates the reason why the token was archived.
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
Instrument Parameters - CreditCard
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
{
"token": {
"instrumentParameters": {
"cardBrand": "Visa",
"expiryDate" : "12/2028",
"expiryPan": "12/2028",
"issuerName": "Name of issuer if present",
"lastFourPan": "0004",
"bin": "492500",
"cardHolderType": "Consumer",
"cardType": "Debit",
"countryCode": "752",
"lastFourDPan": "1234",
"expiryDPan": "02/2029"
}
}
}
token
object
instrumentParameters
object
cardBrand
string
Visa, MC, etc. The brand of the card.
expiryDate
string
expiryPan
string
issuerName
string
lastFourPan
string
bin
string
cardHolderType
string
Corporate or a Consumer.
cardType
string
Debit or Credit card.
countryCode
string
lastFourDPan
string
expiryDPan
string
Instrument Parameters - Trustly
Instrument Parameters - Trustly
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
{
"token": {
"instrumentParameters": {
"AccountId": "156",
},
}
}
token
object
instrumentParameters
object
AccountId
string
GET All Payer Tokens
A GET request used to retrieve all payer tokens linked to a payee using the
payer’s payerReference.
GET All Payer Tokens Request
GET All Payer Tokens Request
1
2
3
GET /online/payers/<payerReference> HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
Get All Payer Tokens Response
GET All Payer Tokens 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
{
"tokens": {
"id": "/online/payers/<payerReference>",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"tokenList": [
{
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
},
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>/archives",
"rel": "archive-token",
"method": "PATCH",
"contentType": "application/json"
},
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>/displaynames",
"rel": "update-displayname",
"method": "PATCH",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>e",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Recurrence",
"instrument": "CreditCard",
"displayName": "0416",
"correlationId": "8e7752b2-016f-4b9f-ac39-2844907d8f9c",
"state": "Active",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "Visa",
"expiryPan": "12/2055",
"issuerName": "Utl. Visa",
"bin": "476173",
"cardholderType": "Unknown",
"cardType": "Credit",
"countryCode": "999",
"lastFourPan": "0416"
}
}
]
},
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/<payerReference>",
"rel": "get-payer-tokens",
"method": "GET",
"contentType": "application/json"
},
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/<payerReference>/archives",
"rel": "archive-payer-tokens",
"method": "PATCH",
"contentType": "application/json"
}
]
}
tokens
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
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.
payerReference
string
migratedFromConsumerProfile
bool
true or false.
tokenlist
array
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
Archived and indicates who archived it:
PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
GET Archived Payer Tokens
A GET request used to retrieve all archived tokens by a payee using the payer’s
payerReference.
GET Archived Payer Tokens Request
GET Archived Tokens Request
1
2
3
GET /online/payers/<payerReference>/archives HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
GET Archived Payer Tokens Response
GET Archived Payer Tokens 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
{
"tokens": {
"id": "/<payerReference>/archives",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"tokenList": [
{
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "CreditCard",
"displayName": "updated name",
"correlationId": "8e7752b2-016f-4b9f-ac39-2844907d8f9c",
"state": "Archived",
"archivedBy": "PAYEE",
"archiveReason": "string",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "Visa",
"expiryPan": "12/2055",
"issuerName": "Utl. Visa",
"bin": "476173",
"cardholderType": "Unknown",
"cardType": "Credit",
"countryCode": "999",
"lastFourPan": "0416"
}
}
]
},
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/<payerReference>/archives",
"rel": "get-archived-payer-tokens",
"method": "GET",
"contentType": "application/json"
}
]
}
tokens
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
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.
payerReference
string
migratedFromConsumerProfile
bool
true or false.
tokenlist
array
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
Archived and indicates who archived it:
PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
PATCH Update Display Name
A PATCH request used to update a payer token’s display name.
PATCH Update Display Name Request
PATCH Update Display Name Request
1
2
3
PATCH /online/payers/tokens/<token><tokenType>/displaynames HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
1
2
3
{
"displayName" : "Updated display name"
}
displayName
string
check
PATCH Update Display Name Response
PATCH Update Display Name 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
{
"id": "/tokens/bc898d02-2423-4e02-822c-8dfb136f2ca6-OneClick/displaynames",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"token": {
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
},
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>/archives",
"rel": "archive-token",
"method": "PATCH",
"contentType": "application/json"
},
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>/displaynames",
"rel": "update-displayname",
"method": "PATCH",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "CreditCard",
"displayName": "updated name",
"correlationId": "8e7752b2-016f-4b9f-ac39-2844907d8f9c",
"state": "Active",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "Visa",
"expiryPan": "12/2055",
"issuerName": "Utl. Visa",
"bin": "476173",
"cardholderType": "Unknown",
"cardType": "Credit",
"countryCode": "999",
"lastFourPan": "0416"
}
}
}
token
object
payerReference
object
migratedFromConsumerProfile
bool
True or false, indicating if the token was migrated from a consumer profile or not.
token
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
Archived and indicates who archived it:
PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
PATCH Archive Single Payer Token
A PATCH request used to archive a single, specific payer token.
PATCH Archive Single Payer Token Request
PATCH Archive Single Payer Token Request
1
2
3
PATCH /online/payers/tokens/<token>-<tokenType>/archives HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
1
2
3
4
{
"reason" : "description",
"updatedBy": "PAYEE"
}
reason
string
check
updatedBy
string
check
PAYEE, CONSUMER, ONLINE or TOKENISSUER.PATCH Archive Single Payer Token Response
PATCH Archive Single Payer Token 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
{
"id": "/tokens/<token>-<tokenType>/archives",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"token": {
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokenType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "CreditCard",
"displayName": "updated name",
"correlationId": "8e7752b2-016f-4b9f-ac39-2844907d8f9c",
"state": "Archived",
"archivedBy": "PAYEE",
"archiveReason": "string",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "Visa",
"expiryPan": "12/2055",
"issuerName": "Utl. Visa",
"bin": "476173",
"cardholderType": "Unknown",
"cardType": "Credit",
"countryCode": "999",
"lastFourPan": "0416"
}
}
}
token
object
payerReference
object
migratedFromConsumerProfile
bool
True or false, indicating if the token was migrated from a consumer profile or not.
token
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
Archived and indicates who archived it:
PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
PATCH Archive All Payer Tokens
A PATCH request used to archive all tokens linked to a specific
payerReference.
PATCH Archive All Payer Tokens Request
PATCH Archive All Payer Tokens Request
1
2
3
PATCH /online/payers/<payerReference>/archives HTTP/1.1
Host: api.externalintegration.swedbankpay.com
Authorization: Bearer <AccessToken>
1
2
3
4
{
"reason" : "description",
"updatedBy": "PAYEE"
}
reason
string
check
updatedBy
string
check
PAYEE, CONSUMER, ONLINE or TOKENISSUER.PATCH Archive All Payer Tokens Response
PATCH Archive All Payer Tokens 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
{
"tokens": {
"id": "/online/payers/<payerReference>/archives",
"payerReference": "<payerReference>",
"migratedFromConsumerProfile": false,
"tokenList": [
{
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokentType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokentType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Payment",
"instrument": "CreditCard",
"displayName": "3406",
"correlationId": "b5c14a0d-e098-4a49-9019-abcd181176c5",
"state": "Archived",
"archivedBy": "PAYEE",
"archiveReason": "string",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "MasterCard",
"expiryPan": "12/2055",
"bin": "522661",
"cardholderType": "Consumer",
"cardType": "Credit",
"countryCode": "752",
"lastFourPan": "3406"
}
},
{
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/tokens/<token>-<tokentType>",
"rel": "get-token",
"method": "GET",
"contentType": "application/json"
}
],
"id": "/online/payers/tokens/<token>-<tokenType>",
"payerReference": "<payerReference>",
"token": "<token>",
"tokenType": "Recurrence",
"instrument": "CreditCard",
"displayName": "3406",
"correlationId": "b5c14a0d-e098-4a49-9019-abcd181176c5",
"state": "Archived",
"archivedBy": "PAYEE",
"archiveReason": "string",
"networkTokenized": false,
"instrumentParameters": {
"cardBrand": "MasterCard",
"expiryPan": "12/2055",
"bin": "522661",
"cardholderType": "Consumer",
"cardType": "Credit",
"countryCode": "752",
"lastFourPan": "3406"
}
}
]
},
"operations": [
{
"href": "https://api.externalintegration.swedbankpay.com/online/payers/<payerReference>/archives",
"rel": "get-archived-payer-tokens",
"method": "GET",
"contentType": "application/json"
}
]
}
token
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
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.
payerReference
string
migratedFromConsumerProfile
bool
true or false.
tokenlist
array
id
string
payerReference
string
token
string
guid.
tokenType
string
Payment, Recurrence,
TransactionOnFile or Unscheduled.
instrument
string
CreditCard or Trustly.
instrumentDisplayName
string
correlationsId
string
state
string
Active or Archived.
archivedBy
string
PAYEE, SWEDBANK_PAY or TOKEN_ISSUER.
archiveReason
string
instrumentParameters
object
operations
array
The array of operations that are possible to perform on the payment order in its current state.
Old (payerOwnedTokens) APIs
You can still use the old APIs to manage tokens. Here is everything you need.
Delete Unscheduled, Recurrence Or Payment Tokens
Payers should be able to delete tokens connected to them. How to do this is
described in the example below. Note that the different token types have
different responses. The state field must have the state Deleted when
deleting the token. No other states are supported.
Delete recurrenceToken Request
Request
1
2
3
4
PATCH /psp/paymentorders/recurrenceTokens/5a17c24e-d459-4567-bbad-aa0f17a76119 HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0
1
2
3
4
{
"state": "Deleted",
"comment": "Comment on why the deletion is happening"
}
Delete recurrenceToken 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
{
"token": "5a17c24e-d459-4567-bbad-aa0f17a76119",
"isDeleted": true
}
Delete unscheduledToken Request
Request
1
2
3
4
PATCH /psp/paymentorders/unscheduledTokens/5a17c24e-d459-4567-bbad-aa0f17a76119 HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0
1
2
3
4
{
"state": "Deleted",
"comment": "Comment on why the deletion is happening"
}
Delete unscheduledToken Response
The example shows a token connected to a card. The parameters and display name will vary depending on the payment method.
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
{
"token": "5a17c24e-d459-4567-bbad-aa0f17a76119",
"instrument": "CreditCard",
"instrumentDisplayName": "123456xxxxxx1111"
"correlationId": "e2f06785-805d-4605-bf40-426a725d313d",
"instrumentParameters": {
"cardBrand": "Visa",
"expiryDate": "MM/YYYY"
}
}
Delete paymentToken Request
Request
1
2
3
4
PATCH /psp/paymentorders/paymentTokens/5a17c24e-d459-4567-bbad-aa0f17a76119 HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.x/2.0
1
2
3
4
{
"state": "Deleted",
"comment": "Comment on why the deletion is happening"
}
Delete paymentToken Response
The example shows a token connected to a card. The parameters and display name will vary depending on the payment method.
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
{
"paymentToken": "5a17c24e-d459-4567-bbad-aa0f17a76119",
"instrument": "CreditCard",
"instrumentDisplayName": "123456xxxxxx1111"
"correlationId": "e2f06785-805d-4605-bf40-426a725d313d",
"instrumentParameters": {
"cardBrand": "Visa",
"expiryDate": "MM/YYYY"
}
}
Delete payerOwnedToken Request
Request
1
2
3
4
PATCH /psp/paymentorders/payerownedtokens/<payerReference> HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.1/2.0
1
2
3
4
{
"state": "Deleted",
"comment": "Comment stating why this is being deleted"
}
Delete payerownedToken Response
Response
1
2
3
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.1
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
{
"payerOwnedTokens": {
"id": "/psp/paymentorders/payerownedtokens/{payerReference}",
"payerReference": "{payerReference}",
"tokens": [
{
"tokenType": "Payment",
"token": "{paymentToken}",
"instrument": "Invoice-payexfinancingno",
"instrumentDisplayName": "260267*****",
"correlationId": "e2f06785-805d-4605-bf40-426a725d313d",
"instrumentParameters": {
"email": "hei@hei.no",
"msisdn": "+4798765432",
"zipCode": "1642"
}
},
{
"tokenType": "Payment",
"token": "{paymentToken}",
"networkTokenized": true,
"instrument": "CreditCard",
"instrumentDisplayName": "492500******0004",
"correlationId": "e2f06785-805d-4605-bf40-426a725d313d",
"instrumentParameters": {
"expiryDate": "12/2020",
"cardBrand": "Visa"
}
}
]
}
}