Create sandbox card account transactions
POST/v1/sandbox/card-accounts/:mockCardAccountId/transactions
Create a transaction on a card account which was created using POST /v1/sandbox/card-accounts. Transactions must have booking date and value date before current time and booking date must not be afte value date
Request
Path Parameters
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 what type of data is actually sent.
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.
Base64 encoded sha256 or sha512 hash of the message body, used with the signature.
The Digest header is defined by RFC3230 and sha256/sha512 si defined by RFC5843.
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)));
}
- application/json
Body
array
required
Array [
]
transactionAmount
object
required
originalAmount
object
required
currencyExchange
object
Possible values: [AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYR
, BZD
, CAD
, CDF
, CHF
, CLP
, CNY
, COP
, CRC
, CUC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GGP
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, IMP
, INR
, IQD
, IRR
, ISK
, JEP
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRO
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLL
, SOS
, SPL
, SRD
, STD
, SVC
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TVD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VEF
, VND
, VUV
, WST
, XAF
, XCD
, XDR
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWD
]
ISO 4217 alphabetic currency code.
Possible values: [AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYR
, BZD
, CAD
, CDF
, CHF
, CLP
, CNY
, COP
, CRC
, CUC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GGP
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, IMP
, INR
, IQD
, IRR
, ISK
, JEP
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRO
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLL
, SOS
, SPL
, SRD
, STD
, SVC
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TVD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VEF
, VND
, VUV
, WST
, XAF
, XCD
, XDR
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWD
]
ISO 4217 alphabetic currency code.
Possible values: [AED
, AFN
, ALL
, AMD
, ANG
, AOA
, ARS
, AUD
, AWG
, AZN
, BAM
, BBD
, BDT
, BGN
, BHD
, BIF
, BMD
, BND
, BOB
, BRL
, BSD
, BTN
, BWP
, BYR
, BZD
, CAD
, CDF
, CHF
, CLP
, CNY
, COP
, CRC
, CUC
, CUP
, CVE
, CZK
, DJF
, DKK
, DOP
, DZD
, EGP
, ERN
, ETB
, EUR
, FJD
, FKP
, GBP
, GEL
, GGP
, GHS
, GIP
, GMD
, GNF
, GTQ
, GYD
, HKD
, HNL
, HRK
, HTG
, HUF
, IDR
, ILS
, IMP
, INR
, IQD
, IRR
, ISK
, JEP
, JMD
, JOD
, JPY
, KES
, KGS
, KHR
, KMF
, KPW
, KRW
, KWD
, KYD
, KZT
, LAK
, LBP
, LKR
, LRD
, LSL
, LYD
, MAD
, MDL
, MGA
, MKD
, MMK
, MNT
, MOP
, MRO
, MUR
, MVR
, MWK
, MXN
, MYR
, MZN
, NAD
, NGN
, NIO
, NOK
, NPR
, NZD
, OMR
, PAB
, PEN
, PGK
, PHP
, PKR
, PLN
, PYG
, QAR
, RON
, RSD
, RUB
, RWF
, SAR
, SBD
, SCR
, SDG
, SEK
, SGD
, SHP
, SLL
, SOS
, SPL
, SRD
, STD
, SVC
, SYP
, SZL
, THB
, TJS
, TMT
, TND
, TOP
, TRY
, TTD
, TVD
, TWD
, TZS
, UAH
, UGX
, USD
, UYU
, UZS
, VEF
, VND
, VUV
, WST
, XAF
, XCD
, XDR
, XOF
, XPF
, YER
, ZAR
, ZMW
, ZWD
]
ISO 4217 alphabetic currency code.
markupFee
object
required
cardAcceptorAddress
object
required
Possible values: <= 70 characters
Possible values: <= 2 characters
, [AF
, AX
, AL
, DZ
, AS
, AD
, AO
, AI
, AQ
, AG
, AR
, AM
, AW
, AU
, AT
, AZ
, BH
, BS
, BD
, BB
, BY
, BE
, BZ
, BJ
, BM
, BT
, BO
, BQ
, BA
, BW
, BV
, BR
, IO
, BN
, BG
, BF
, BI
, KH
, CM
, CA
, CV
, KY
, CF
, TD
, CL
, CN
, CX
, CC
, CO
, KM
, CG
, CD
, CK
, CR
, CI
, HR
, CU
, CW
, CY
, CZ
, DK
, DJ
, DM
, DO
, EC
, EG
, SV
, GQ
, ER
, EE
, ET
, FK
, FO
, FJ
, FI
, FR
, GF
, PF
, TF
, GA
, GM
, GE
, DE
, GH
, GI
, GR
, GL
, GD
, GP
, GU
, GT
, GG
, GN
, GW
, GY
, HT
, HM
, VA
, HN
, HK
, HU
, IS
, IN
, ID
, IR
, IQ
, IE
, IM
, IL
, IT
, JM
, JP
, JE
, JO
, KZ
, KE
, KI
, KP
, KR
, KW
, KG
, LA
, LV
, LB
, LS
, LR
, LY
, LI
, LT
, LU
, MO
, MK
, MG
, MW
, MY
, MV
, ML
, MT
, MH
, MQ
, MR
, MU
, YT
, MX
, FM
, MD
, MC
, MN
, ME
, MS
, MA
, MZ
, MM
, NA
, NR
, NP
, NL
, NC
, NZ
, NI
, NE
, NG
, NU
, NF
, MP
, NO
, OM
, PK
, PW
, PS
, PA
, PG
, PY
, PE
, PH
, PN
, PL
, PT
, PR
, QA
, RE
, RO
, RU
, RW
, BL
, SH
, KN
, LC
, MF
, PM
, VC
, WS
, SM
, ST
, SA
, SN
, RS
, SC
, SL
, SG
, SX
, SK
, SI
, SB
, SO
, ZA
, GS
, SS
, ES
, LK
, SD
, SR
, SJ
, SZ
, SE
, CH
, SY
, TW
, TJ
, TZ
, TH
, TL
, TG
, TK
, TO
, TT
, TN
, TR
, TM
, TC
, TV
, UG
, UA
, AE
, GB
, US
, UM
, UY
, UZ
, VU
, VE
, VN
, VG
, VI
, WF
, EH
, YE
, ZM
, ZW
]
ISO 3166-1 Alpha-2 Country Code.
Possible values: [true
, false
]
Responses
- 201
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
cardAccount
object
required
cardTransactions
object
required
booked
object[]
required
transactionAmount
object
required
originalAmount
object
required
{
"cardAccount": {
"maskedPan": "1234xxxxxxxx4321"
},
"cardTransactions": {
"booked": [
{
"cardTransactionId": "41a2078c-1772-46f8-b654-0c7454abd965",
"bookingDate": "2019-05-08",
"transactionDate": "2019-05-16",
"transactionAmount": {
"amount": 100,
"currency": "NOK"
},
"originalAmount": {
"amount": 100,
"currency": "NOK"
},
"merchantCategoryCode": "BOB"
}
],
"pending": []
}
}
{
"cardAccount": {
"maskedPan": "1234xxxxxxxx4321"
},
"cardTransactions": {
"booked": [
{
"cardTransactionId": "41a2078c-1772-46f8-b654-0c7454abd965",
"bookingDate": "2019-05-08",
"transactionDate": "2019-05-16",
"transactionAmount": {
"amount": 100,
"currency": "NOK"
},
"originalAmount": {
"amount": 100,
"currency": "NOK"
},
"merchantCategoryCode": "BOB"
}
],
"pending": []
}
}