Get sandbox card accounts
GET/v1/sandbox/card-accounts
Only for managing sandbox data, not part of the production API. Get list of all card accounts which have been created using POST /v1/sandbox/card-accounts.
Request
Header Parameters
- keyId must be formatted as
keyId="SN=XXX,CA=YYY"
whereXXX
is the serial number of the signing certificate in hexadecimal encoding andYYY
is the full Distinguished Name of the Certificate Authority having certificate - algorithm must identify the same algorithm for the signature as presented in the signing certificate and should be
rsa-sha256
- headers must contain
date
,digest
,x-request-id
,psu-id
,psu-corporate-id
, andtpp-redirect-uri
when available - signature must be computed as
Base64(RSA-SHA256(signingString))
Advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header.
Advertises which character set the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice within the Content-Type response header.
Advertises which content encoding, usually a compression algorithm, the client is able to understand. Using content negotiation, the server selects one of the proposals, uses it and informs the client of its choice with the Content-Encoding response header.
Advertises which natural languages the client is able to understand, and which locale variant is preferred. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Language response header.
The domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening.
Request identifier, unique to the call, as determined by the TPP.
The certificate used for signing the request in base64 encoding.
HTTP Message Signature as specified by https://tools.ietf.org/html/draft-cavage-http-signatures-10 with requirements imposed by Berlin Group's NextGenPSD2 Framework.
If any values in the Signature header is ISO-8859-1 or UTF-8 encoded you need to URL encode the Signature header according to RFC 2047 which means MIME encoding the signature.
Also the signature must be wrapped using this format: =?charset?encoding?encoded signature?=
Example of this encoding: =?utf-8?B?a2V5QTQsQ0E9Mi41LjQuOTc9IzB........jMTM1MDUzNDQ0ZTRmMmQ0NjUz?=
Java example of how to implement encoding:
if (charset.equals(StandardCharsets.UTF_8)) {
Signature = String.format("=?utf-8?B?%s?=", Base64.getEncoder().encodeToString(signature.getBytes(StandardCharsets.UTF_8)));
}
Responses
- 200
- application/json
- Schema
- Example (from schema)
- application/json;charset=utf-8
Schema
Array [
Array [
]
]
cardAccounts
object[]
required
creditLimit
object
required
balances
object[]
required
balanceAmount
object
required
Possible values: [closingBooked
, expected
]
Possible values: [enabled
, deleted
, blocked
]
_links
object
required
self
object
required
transactions
object
required
{
"cardAccounts": [
{
"resourceId": "enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=",
"maskedPan": "1234xxxxxxxx4321",
"currency": "NOK",
"creditLimit": {
"amount": 1000,
"currency": "NOK"
},
"balances": [
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "expected"
},
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "closingBooked"
}
],
"cardId": "1",
"cardIdVNo": "2",
"accountNumber": "123412341234",
"expiry": "2020-01-01",
"name": "Test",
"product": "TEST-kort",
"status": "enabled",
"_links": {
"self": {
"href": "/v1/sandbox/card-accounts/enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=",
"verbs": [
"GET",
"DELETE"
]
},
"transactions": {
"href": "/v1/sandbox/card-accounts/enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=/transactions",
"verbs": [
"GET",
"POST",
"DELETE"
]
}
}
},
{
"resourceId": "enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=",
"maskedPan": "1234xxxxxxxx1337",
"currency": "NOK",
"creditLimit": {
"amount": 1000,
"currency": "NOK"
},
"balances": [
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "expected"
},
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "closingBooked"
}
],
"cardId": "1",
"cardIdVNo": "2",
"accountNumber": "123412341234",
"expiry": "2020-01-01",
"name": "Test",
"product": "TEST-kort",
"status": "enabled",
"_links": {
"self": {
"href": "/v1/sandbox/card-accounts/enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=",
"verbs": [
"GET",
"DELETE"
]
},
"transactions": {
"href": "/v1/sandbox/card-accounts/enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=/transactions",
"verbs": [
"GET",
"POST",
"DELETE"
]
}
}
}
]
}
{
"cardAccounts": [
{
"resourceId": "enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=",
"maskedPan": "1234xxxxxxxx4321",
"currency": "NOK",
"creditLimit": {
"amount": 1000,
"currency": "NOK"
},
"balances": [
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "expected"
},
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "closingBooked"
}
],
"cardId": "1",
"cardIdVNo": "2",
"accountNumber": "123412341234",
"expiry": "2020-01-01",
"name": "Test",
"product": "TEST-kort",
"status": "enabled",
"_links": {
"self": {
"href": "/v1/sandbox/card-accounts/enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=",
"verbs": [
"GET",
"DELETE"
]
},
"transactions": {
"href": "/v1/sandbox/card-accounts/enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0=/transactions",
"verbs": [
"GET",
"POST",
"DELETE"
]
}
}
},
{
"resourceId": "enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=",
"maskedPan": "1234xxxxxxxx1337",
"currency": "NOK",
"creditLimit": {
"amount": 1000,
"currency": "NOK"
},
"balances": [
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "expected"
},
{
"balanceAmount": {
"amount": 0,
"currency": "NOK"
},
"balanceType": "closingBooked"
}
],
"cardId": "1",
"cardIdVNo": "2",
"accountNumber": "123412341234",
"expiry": "2020-01-01",
"name": "Test",
"product": "TEST-kort",
"status": "enabled",
"_links": {
"self": {
"href": "/v1/sandbox/card-accounts/enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=",
"verbs": [
"GET",
"DELETE"
]
},
"transactions": {
"href": "/v1/sandbox/card-accounts/enc!!EXhP23NJNfhEK-eSDYFbOeFOdCLtsvY3putzG7OwLUswyjJqo2MGo_IZfHkQDsfT1jplTOfBnbStUCAdqCcoKCsJrsIQFInv28l0F12k3ak=/transactions",
"verbs": [
"GET",
"POST",
"DELETE"
]
},
"balances": {
"title": "BalancesLink",
"type": "object",
"description": "Update balances link",
"properties": {
"href": {
"type": "string"
},
"verbs": {
"type": "array",
"items": {
"type": "string",
"enum": [
"PUT"
]
}
}
},
"required": [
"href",
"verbs"
],
"example": {
"href": "/v1/sandbox/accounts/enc!!90hSjpSdpeftHiDSYiPaHVGoKHriD-6ARR4JlXcEebYbYa_WNwJvqevSrba4WtnD/balances",
"verbs": [
"PUT"
]
}
}
}
}
]
}