--- swagger: "2.0" info: title: Mock Data Card Account API x-ibm-name: mock-data-card-account-api version: 1.0.0 contact: name: openbanking@dssbank.no license: name: Copyright © 2018-2019 LILLESANDS SPAREBANK. All rights reserved. url: https://openbanking.lillesands-sparebank.no/terms description: "API for manipulating mock data. \nAll endpoints here are only meant for testing. \nAll endpoints here are only available in sandbox and not in production.\n[**Read the developer documentation before using this API** ](https://openbanking.lillesands-sparebank.no/portal-sandbox/documentation/)\n" basePath: / schemes: - https paths: /v1/sandbox/card-accounts: post: description: | Create a card account for use with testing in the sandbox api. *customerNumber* connects a customer as a owner to this account. However creating an account has different implications for private and corporate users. > Private customers will have this account automatically added to their agreement so it will show up in the account list for the user. > Corporate customers needs to add accounts to agreements explicitly through POST /v1/sandbox/agreements to see the account in the account list. summary: /v1/sandbox/card-accounts tags: - /v1/sandbox/card-accounts operationId: CardAccountsPost deprecated: false produces: - application/json;charset=utf-8 parameters: - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/Digest' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' - name: Body in: body required: true description: "" schema: $ref: '#/definitions/card-accountsRequest' responses: 201: description: "" schema: $ref: '#/definitions/v1SandboxCardAccounts' examples: application/json;charset=utf-8: resourceId: enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0= customerNumber: 01085800481 maskedPan: 1234xxxxxxxx4321 currency: NOK creditLimit: amount: 1000 currency: NOK balances: - balanceAmount: amount: 0 currency: NOK balanceType: expected referenceDate: "2020-01-01" lastChangeDateTime: "2019-05-16T14:41:09.824Z" lastCommittedTransaction: test - balanceAmount: amount: 0 currency: NOK balanceType: closingBooked referenceDate: "2020-01-01" lastChangeDateTime: "2019-05-16T14:41:09.824Z" lastCommittedTransaction: test 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 get: description: | 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. summary: /v1/sandbox/card-accounts tags: - /v1/sandbox/card-accounts operationId: CardAccountsGet deprecated: false produces: - application/json;charset=utf-8 parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 200: description: "" schema: $ref: '#/definitions/v1SandboxCardAccounts1' examples: application/json;charset=utf-8: 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 /v1/sandbox/card-accounts/{mockCardAccountId}: get: description: |- Only for managing sandbox data, not part of the production API. Get a single card account created using POST /v1/sandbox/card-accounts. summary: /v1/sandbox/card-accounts/:id tags: - /v1/sandbox/card-accounts operationId: CardAccountsByMockCardAccountIdGet deprecated: false produces: - application/json;charset=utf-8 parameters: - name: mockCardAccountId in: path required: true type: string description: "" - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 200: description: "" schema: $ref: '#/definitions/v1SandboxCardAccountswId' examples: application/json;charset=utf-8: cardAccount: 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 delete: description: Delete card account previously created using POST /v1/sandbox/card-accounts. summary: /v1/sandbox/card-accounts/:id tags: - /v1/sandbox/card-accounts operationId: CardAccountsByMockCardAccountIdDelete deprecated: false produces: - application/json parameters: - name: mockCardAccountId in: path required: true type: string description: "" - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 204: description: "" schema: type: object /v1/sandbox/card-accounts/{mockCardAccountId}/transactions: post: description: |- 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** summary: /v1/sandbox/card-accounts/:id/transactions tags: - /v1/sandbox/card-accounts operationId: CardAccountsTransactionsByMockCardAccountIdPost deprecated: false produces: - application/json;charset=utf-8 parameters: - name: mockCardAccountId in: path required: true type: string description: "" - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/Digest' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' - name: Body in: body required: true description: "" schema: type: array items: $ref: '#/definitions/transactionsRequest' responses: 201: description: "" schema: $ref: '#/definitions/v1SandboxCardAccountsIdTransactions' examples: application/json;charset=utf-8: 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: [] get: description: | Only for managing sandbox data, not part of the production API. Get all card transactions on a card account created using POST /v1/sandbox/card-accounts. Only includes transactions created using POST /v1/sandbox/card-accounts/{mockCardAccountId}/transactions summary: /v1/sandbox/card-accounts/:id/transactions tags: - /v1/sandbox/card-accounts operationId: CardAccountsTransactionsByMockCardAccountIdGet deprecated: false produces: - application/json;charset=utf-8 parameters: - name: bookingStatus in: query required: true type: string x-example: both enum: - booked - pending - both - name: fromDate in: query description: Advertises which date the client wishes to receive transactions from. required: false type: string format: date x-example: "2019-03-01" - name: toDate in: query description: Advertises which date the client wishes to receive transactions to. required: false type: string format: date x-example: "2019-04-01" - name: offset in: query type: number minimum: 0 format: Int32 description: Advertises how many transactions should be skipped before starting to count the limit. required: false x-example: 0 - name: limit in: query minimum: 1 format: Int32 type: number required: false description: Advertises how many transactions should be returned. x-example: 10 - name: mockCardAccountId in: path required: true type: string description: "" - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 200: description: "" schema: $ref: '#/definitions/v1SandboxCardAccountsIdTransactions' examples: application/json;charset=utf-8: 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: [] delete: description: Delete all transactions from a card account created using POST /v1/sandbox/card-accounts summary: /v1/sandbox/card-accounts/:id/transactions tags: - /v1/sandbox/card-accounts operationId: CardAccountsTransactionsByMockCardAccountIdDelete deprecated: false produces: - application/json parameters: - name: mockCardAccountId in: path required: true type: string description: "" - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 204: description: "" schema: type: object /v1/sandbox/card-accounts/{mockCardAccountId}/transactions/{mockTransactionId}: delete: description: Delete a specific transaction from a card account created using POST /v1/sandbox/card-accounts summary: /v1/sandbox/card-accounts/:id/transactions/:id tags: - /v1/sandbox/card-accounts operationId: CardAccountsTransactionsByMockCardAccountIdAndMockTransactionIdDelete deprecated: false produces: - application/json parameters: - name: mockCardAccountId in: path required: true type: string description: "" - name: mockTransactionId in: path required: true type: string description: "" - name: Body in: body required: true description: "" schema: type: string - $ref: '#/parameters/Accept' - $ref: '#/parameters/Accept-Charset' - $ref: '#/parameters/Accept-Encoding' - $ref: '#/parameters/Accept-Language' - $ref: '#/parameters/Host' - $ref: '#/parameters/X-Request-ID' - $ref: '#/parameters/TPP-Signature-Certificate' - $ref: '#/parameters/Signature' responses: 204: description: "" schema: type: object parameters: Accept: name: Accept in: header type: string required: false description: 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. x-example: application/json Accept-Charset: name: Accept-Charset in: header type: string required: false description: 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. x-example: utf-8 Accept-Encoding: name: Accept-Encoding in: header required: false type: string description: 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. x-example: deflate, gzip;q=1.0, *;q=0.5 Accept-Language: name: Accept-Language in: header description: 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. required: false type: string x-example: en-US,en;q=0.7,nb;q=0.3 Host: name: Host in: header type: string required: false description: The domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening. x-example: http://lbxp02vip.unix.cosng.net:20100/secesb/rest/era-psd2 Content-Type: name: Content-Type in: header required: false type: string description: Advertises what type of data is actually sent. X-Request-ID: name: X-Request-ID in: header type: string required: true description: Request identifier, unique to the call, as determined by the TPP. x-example: 4eba4445-1a4b-47b8-bdd5-4e56ef026b19 Digest: name: Digest in: header type: string required: true description: "Base64 encoded sha256 or sha512 hash of the message body, used with the signature.\n>\nThe Digest header is defined by RFC3230 and sha256/sha512 si defined by RFC5843. " x-example: MIFFTzCCAzegAkIBAgMJANnQVDLqktJUMA0GCS....8WLZOabcX3YxNoH4k== TPP-Signature-Certificate: name: TPP-Signature-Certificate in: header type: string required: true description: The certificate used for signing the request in base64 encoding. x-example: MIFFTzCCAzegAkIBAgMJANnQVDLqktJUMA0GCS....8WLZOX3YxNoH4k== Signature: name: Signature in: header type: string required: true description: | 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. - *keyId* must be formatted as `keyId="SN=XXX,CA=YYY"` where `XXX` is the serial number of the signing certificate in hexadecimal encoding and `YYY` is the ful 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`, and `tpp-redirect-uri` when available - *signature* must be computed as `Base64(RSA-SHA256(signingString))` 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))); } ``` x-example: keyId="SN=6AEB4444FBAAD267,CA=O=PSDNO-FSA-ABCA,L=Trondheim,C=NO", algorithm="rsa-sha256", headers="date x-request-id tpp-redirect-uri psu-id", signature="***************" definitions: Self: title: Self example: href: /v1/sandbox/agreements/enc!!9LnOfAAQ-HgKXsU61DSZc0b1M9k-2FkJ4Hunsoe4mfTD3AOU_Evq91NkmNgd1lK9RRT6jE7MV7aAPxm7gMrQLg== verbs: - GET - DELETE type: object properties: href: type: string verbs: type: array items: type: string required: - href - verbs card-accountsRequest: title: /v1/sandbox/card-accountsRequest example: customerNumber: 01085800481 maskedPan: 1234xxxxxxxx4321 currency: NOK creditLimit: currency: NOK amount: 1000 balances: - balanceAmount: currency: NOK amount: 0 balanceType: EXPECTED referenceDate: "2020-01-01" lastChangeDateTime: "2018-06-07" lastCommittedTransaction: test - balanceAmount: currency: NOK amount: 0 balanceType: closingBooked referenceDate: "2020-01-01" lastChangeDateTime: "2018-06-07" lastCommittedTransaction: test cardId: "1" cardIdVNo: "2" accountNumber: "123412341234" expiry: "2020-01-01" name: Test product: TEST-kort status: enabled type: object properties: customerNumber: type: string maskedPan: type: string currency: type: string creditLimit: $ref: '#/definitions/CreditLimit' balances: type: array items: $ref: '#/definitions/Balance' cardId: type: string cardIdVNo: type: string accountNumber: type: string expiry: type: string name: type: string product: type: string status: type: string enum: - enabled - deleted - blocked required: - customerNumber - maskedPan - currency - creditLimit - balances - cardId - cardIdVNo - accountNumber - expiry - name - product - status CreditLimit: title: CreditLimit example: amount: 1000 currency: NOK type: object properties: currency: type: string amount: type: integer format: int32 required: - currency - amount Balance: title: Balance type: object properties: balanceAmount: $ref: '#/definitions/BalanceAmount' balanceType: example: closingBooked type: string enum: - closingBooked - expected referenceDate: example: "2020-01-01" type: string lastChangeDateTime: example: "2018-06-07 00:00:00" type: string lastCommittedTransaction: example: test type: string required: - balanceAmount - balanceType - referenceDate - lastChangeDateTime - lastCommittedTransaction BalanceAmount: title: BalanceAmount example: currency: NOK amount: 0 type: object properties: currency: example: NOK type: string amount: example: 0 type: integer format: int32 required: - currency - amount v1SandboxCardAccounts: title: /v1/sandbox/card-accounts example: resourceId: enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0= customerNumber: 01085800481 maskedPan: 1234xxxxxxxx4321 currency: NOK creditLimit: amount: 1000 currency: NOK balances: - balanceAmount: amount: 0 currency: NOK balanceType: expected referenceDate: "2020-01-01" lastChangeDateTime: "2019-05-16T14:41:09.824Z" lastCommittedTransaction: test - balanceAmount: amount: 0 currency: NOK balanceType: closingBooked referenceDate: "2020-01-01" lastChangeDateTime: "2019-05-16T14:41:09.824Z" lastCommittedTransaction: test 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 type: object properties: resourceId: type: string customerNumber: type: string maskedPan: type: string currency: type: string creditLimit: $ref: '#/definitions/CreditLimit' balances: type: array items: $ref: '#/definitions/Balance' cardId: type: string cardIdVNo: type: string accountNumber: type: string expiry: type: string name: type: string product: type: string status: type: string _links: $ref: '#/definitions/Links4' required: - resourceId - customerNumber - maskedPan - currency - creditLimit - balances - cardId - cardIdVNo - accountNumber - expiry - name - product - status - _links Links4: title: Links4 example: 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 type: object properties: self: $ref: '#/definitions/Self' transactions: $ref: '#/definitions/Transactions' required: - self - transactions Transactions: title: Transactions type: object properties: href: type: string verbs: type: array items: type: string required: - href - verbs v1SandboxCardAccounts1: title: /v1/sandbox/card-accounts1 example: 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 type: object properties: cardAccounts: type: array items: $ref: '#/definitions/CardAccount' required: - cardAccounts CardAccount: title: CardAccount type: object properties: resourceId: example: enc!!M5MQTDLY3RnbIjLCnqo8HFapV73e7PSqio3iv7FrR0Y-J_hxh33lth6UEU4yq3a5rwENWfNrZWQ-BesB8lBwEcKP9Sd4-1MotV9QAz_MSv0= type: string maskedPan: example: 1234xxxxxxxx4321 type: string currency: example: NOK type: string creditLimit: $ref: '#/definitions/CreditLimit' balances: example: - balanceAmount: amount: 0 currency: NOK balanceType: expected - balanceAmount: amount: 0 currency: NOK balanceType: closingBooked type: array items: $ref: '#/definitions/Balance2' cardId: example: "1" type: string cardIdVNo: example: "2" type: string accountNumber: example: "123412341234" type: string expiry: example: "2020-01-01" type: string name: example: Test type: string product: example: TEST-kort type: string status: example: enabled type: string enum: - enabled - deleted - blocked _links: $ref: '#/definitions/Links4' required: - resourceId - maskedPan - currency - creditLimit - balances - cardId - cardIdVNo - accountNumber - expiry - name - product - status - _links Balance2: title: Balance2 example: balanceAmount: amount: 0 currency: NOK balanceType: expected type: object properties: balanceAmount: $ref: '#/definitions/BalanceAmount' balanceType: example: expected type: string enum: - closingBooked - expected required: - balanceAmount - balanceType v1SandboxCardAccountswId: title: /v1/sandbox/card-accounts/:id example: cardAccount: 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 type: object properties: cardAccount: $ref: '#/definitions/CardAccount' required: - cardAccount transactionsRequest: title: /v1/sandbox/card-accounts/:id/transactionsRequest example: cardTransactionId: test terminalId: tid bookingDate: "2019-05-08" transactionDate: "2018-06-07" transactionAmount: currency: NOK amount: 100 originalAmount: currency: NOK amount: 100 merchantCategoryCode: BOB markupFee: currency: NOK amount: 10 markupFeePercentage: "20" cardAcceptorId: "" cardAcceptorAddress: street: Street buildingNumber: "56" postalCode: "7014" city: Trondheim country: "NO" maskedPan: "" transactionDetails: "" invoiced: "true" proprietaryBankTransactionCode: "" type: object properties: cardTransactionId: example: test type: string terminalId: example: tid type: string bookingDate: example: "2019-05-08" type: string transactionDate: example: "2018-06-07" type: string transactionAmount: $ref: '#/definitions/TransactionAmount' originalAmount: $ref: '#/definitions/OriginalAmount' merchantCategoryCode: example: BOB type: string currencyExchange: $ref: '#/definitions/ReportExchangeRate' markupFee: $ref: '#/definitions/MarkupFee' markupFeePercentage: example: "20" type: string cardAcceptorId: type: string cardAcceptorAddress: $ref: '#/definitions/Address' maskedPan: type: string transactionDetails: type: string invoiced: type: string example: "true" enum: - "true" - "false" proprietaryBankTransactionCode: type: string required: - cardTransactionId - terminalId - bookingDate - transactionDate - transactionAmount - originalAmount - merchantCategoryCode - markupFee - markupFeePercentage - cardAcceptorId - cardAcceptorAddress - maskedPan - transactionDetails - invoiced - proprietaryBankTransactionCode Address: type: object required: - country properties: street: type: string minLength: 0 maxLength: 70 example: Street buildingNumber: type: string example: "56" postalCode: type: string example: "7014" city: type: string example: Trondheim country: type: string description: ISO 3166-1 Alpha-2 Country Code. minLength: 0 maxLength: 2 example: "NO" enum: - 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 ReportExchangeRate: type: object required: - exchangeRate - quotationDate - sourceCurrency - targetCurrency - unitCurrency properties: sourceCurrency: type: string description: ISO 4217 alphabetic currency code. example: NOK enum: - 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 TransactionAmount: title: TransactionAmount example: currency: NOK amount: 100 type: object properties: currency: example: NOK type: string amount: example: 100 type: integer format: int32 required: - currency - amount OriginalAmount: title: OriginalAmount example: currency: NOK amount: 100 type: object properties: currency: example: NOK type: string amount: example: 100 type: integer format: int32 required: - currency - amount MarkupFee: title: MarkupFee example: currency: NOK amount: 10 type: object properties: currency: example: NOK type: string amount: example: 10 type: integer format: int32 required: - currency - amount v1SandboxCardAccountsIdTransactions: title: /v1/sandbox/card-accounts/:id/transactions example: 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: [] type: object properties: cardAccount: $ref: '#/definitions/CardAccount2' cardTransactions: $ref: '#/definitions/CardTransactions' required: - cardAccount - cardTransactions CardAccount2: title: CardAccount2 type: object properties: maskedPan: type: string required: - maskedPan CardTransactions: title: CardTransactions type: object properties: booked: type: array items: $ref: '#/definitions/Booked' pending: type: array items: type: string required: - booked - pending Booked: title: Booked type: object properties: cardTransactionId: example: 41a2078c-1772-46f8-b654-0c7454abd965 type: string bookingDate: example: "2019-05-08" type: string transactionDate: example: "2019-05-16" type: string transactionAmount: $ref: '#/definitions/TransactionAmount' originalAmount: $ref: '#/definitions/OriginalAmount' merchantCategoryCode: example: BOB type: string required: - cardTransactionId - bookingDate - transactionDate - transactionAmount - originalAmount - merchantCategoryCode tags: - name: /v1/sandbox/card-accounts x-ibm-configuration: enforced: true testable: true phase: realized x-ibm-endpoints: - endpointUrl: https://openbanking.lillesands-sparebank.no/api-sandbox type: - production - development ...