Create consent.
POST/api/v1/consents
This method create a consent resource, defining access rights to dedicated accounts of a given PSU-ID. These accounts are addressed explicitly in the method as parameters as a core function.
Side Effects When this consent request is a request where the "recurringIndicator" equals "true", and if it exists already a former consent for recurring access on account information for the addressed PSU, then the former consent automatically expires as soon as the new consent request is authorised by the PSU.
Optional Extension: As an option, an ASPSP might optionally accept a specific access right on the access on all PSD2 related services for all available accounts.
As another option an ASPSP might optionally also accept a command, where only access rights are inserted without mentioning the addressed account. The relation to accounts is then handled afterwards between PSU and ASPSP. This option is not supported for the Embedded SCA Approach. As a last option, an ASPSP might in addition accept a command with access rights
- to see the list of available payment accounts or
- to see the list of available payment accounts with balances.
Request
Header Parameters
- GET
- POST
- PUT
- PATCH
- DELETE
ID of the request, unique to the call, as determined by the initiating party.
Is contained if and only if the OpenBankingGateway.Models.AccountInformationService.CreateConsents.CreateConsentRequestHeaders.Signature element is contained in the header of the request.
A signature of the request by the TPP on application level. This might be mandated by ASPSP.
A signature of the request by the TPP on application level. This might be mandated by ASPSP.
Client ID of the PSU in the ASPSP client interface.
Might be mandated in the ASPSP's documentation.
It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match, according to ASPSP documentation.
Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.
In this case, the mean and use are then defined in the ASPSP’s documentation.
Might be mandated in the ASPSP's documentation. Only used in a corporate context.
Might be mandated in the ASPSP's documentation. Only used in a corporate context.
If it equals "true", the TPP prefers a redirect over an embedded SCA approach. If it equals "false", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the parameter TPP-Decoupled-Preferred and the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.
If it equals "true", the TPP prefers a decoupled SCA approach. If it equals "false", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU. The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.
URI of the TPP, where the transaction flow shall be redirected to after a Redirect.
Mandated for the Redirect SCA Approach, specifically when TPP-Redirect-Preferred equals "true". It is recommended to always use this header field.
Remark for Future: This field might be changed to mandatory in the next version of the specification.
If it equals "true", the TPP prefers to start the authorisation process separately, e.g.because of the usage of a signing basket.This preference might be ignored by the ASPSP, if a signing basket is not supported as functionality.
If it equals "false" or if the parameter is not used, there is no preference of the TPP. This especially indicates that the TPP assumes a direct authorisation of the transaction in the next step, without using a signing basket.
This header might be used by TPPs to inform the ASPSP about the brand used by the TPP towards the PSU. This information is meant for logging entries to enhance communication between ASPSP and PSU or ASPSP and TPP. This header might be ignored by the ASPSP.
URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.
For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:
URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.
Wildcard definitions shall be taken into account for compliance checks by the ASPSP. ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.
The string has the form
status=X1, ..., Xn
where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:
SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.
PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.
LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.
This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.
The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.
The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. If not available, the TPP shall use the IP Address used by the TPP when submitting this request.
The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.
The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.
The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.
The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.
The forwarded Agent header field of the HTTP request between PSU and TPP, if available.
Possible values: [GET
, POST
, PUT
, PATCH
, DELETE
]
HTTP method used at the PSU ? TPP interface, if available. Valid values are:
UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID needs to be unaltered until removal from device.
The forwarded Geo Location of the corresponding http request between PSU and TPP if available.
- application/json
Body
JSON request body for a consents request.
Array [
]
Array [
]
Array [
]
Array [
]
Array [
]
access
object
required
Requested access services for a consent.
accounts
object[]
nullable
Is asking for detailed account information.
If the array is empty in a request, the TPP is asking for an accessible account list.
This may be restricted in a PSU/ASPSP authorization dialogue.
If the array is empty, also the arrays for balances, additionalInformation sub attributes or transactions shall be empty, if used.
Possible values: Value must match regular expression [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
IBAN of the account.
Basic Bank Account Number (BBAN) Identifier.
This data element can be used in the body of the consent request. Message for retrieving account access consent from this account. This data elements is used for payment accounts which have no IBAN. ISO20022: Basic Bank Account Number (BBAN).
Identifier used nationally by financial institutions, i.e., in individual countries, generally as part of a National Account Numbering Scheme(s), which uniquely identifies the account of a customer
Possible values: <= 35 characters
Primary Account Number according to ISO/IEC 7812.
Possible values: <= 35 characters
Masked Primary Account Number.
Possible values: <= 35 characters
Mobile phone number.
other
object
In cases where the specifically defined criteria (IBAN, BBAN, MSISDN) are not provided to identify an instance of the respective account type
(e.g. a savings account), the ASPSP shall include a proprietary ID of the respective account that uniquely identifies the account for this ASPSP.
Possible values: non-empty
and <= 35 characters
Proprietary identification of the account.
Possible values: <= 35 characters
An entry provided by an external ISO code list.
Possible values: <= 35 characters
A scheme name defined in a proprietary way.
Possible values: <= 35 characters
Issuer of the identification.
Possible values: Value must match regular expression [A-Z]{3}
Account Currency Code.
Possible values: Value must match regular expression [A-Z]{3}
ExternalCashAccountType1Code from ISO 20022.
balances
object[]
nullable
Is asking for balances of the addressed accounts.
If the array is empty in the request, the TPP is asking for the balances of all accessible account lists.
This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts,
additionalInformation sub attributes or transactions shall be empty, if used.
Possible values: Value must match regular expression [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
IBAN of the account.
Basic Bank Account Number (BBAN) Identifier.
This data element can be used in the body of the consent request. Message for retrieving account access consent from this account. This data elements is used for payment accounts which have no IBAN. ISO20022: Basic Bank Account Number (BBAN).
Identifier used nationally by financial institutions, i.e., in individual countries, generally as part of a National Account Numbering Scheme(s), which uniquely identifies the account of a customer
Possible values: <= 35 characters
Primary Account Number according to ISO/IEC 7812.
Possible values: <= 35 characters
Masked Primary Account Number.
Possible values: <= 35 characters
Mobile phone number.
other
object
In cases where the specifically defined criteria (IBAN, BBAN, MSISDN) are not provided to identify an instance of the respective account type
(e.g. a savings account), the ASPSP shall include a proprietary ID of the respective account that uniquely identifies the account for this ASPSP.
Possible values: non-empty
and <= 35 characters
Proprietary identification of the account.
Possible values: <= 35 characters
An entry provided by an external ISO code list.
Possible values: <= 35 characters
A scheme name defined in a proprietary way.
Possible values: <= 35 characters
Issuer of the identification.
Possible values: Value must match regular expression [A-Z]{3}
Account Currency Code.
Possible values: Value must match regular expression [A-Z]{3}
ExternalCashAccountType1Code from ISO 20022.
transactions
object[]
nullable
Is asking for transactions of the addressed accounts.
If the array is empty in the request, the TPP is asking for the balances of all accessible account lists.
This may be restricted in a PSU/ASPSP authorization dialogue. If the array is empty, also the arrays for accounts,
additionalInformation sub attributes or transactions shall be empty, if used.
Possible values: Value must match regular expression [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
IBAN of the account.
Basic Bank Account Number (BBAN) Identifier.
This data element can be used in the body of the consent request. Message for retrieving account access consent from this account. This data elements is used for payment accounts which have no IBAN. ISO20022: Basic Bank Account Number (BBAN).
Identifier used nationally by financial institutions, i.e., in individual countries, generally as part of a National Account Numbering Scheme(s), which uniquely identifies the account of a customer
Possible values: <= 35 characters
Primary Account Number according to ISO/IEC 7812.
Possible values: <= 35 characters
Masked Primary Account Number.
Possible values: <= 35 characters
Mobile phone number.
other
object
In cases where the specifically defined criteria (IBAN, BBAN, MSISDN) are not provided to identify an instance of the respective account type
(e.g. a savings account), the ASPSP shall include a proprietary ID of the respective account that uniquely identifies the account for this ASPSP.
Possible values: non-empty
and <= 35 characters
Proprietary identification of the account.
Possible values: <= 35 characters
An entry provided by an external ISO code list.
Possible values: <= 35 characters
A scheme name defined in a proprietary way.
Possible values: <= 35 characters
Issuer of the identification.
Possible values: Value must match regular expression [A-Z]{3}
Account Currency Code.
Possible values: Value must match regular expression [A-Z]{3}
ExternalCashAccountType1Code from ISO 20022.
additionalInformation
object
Optional if supported by API provider.
Is asking for additional information as added within this structured object.
The usage of this data element requires at least one of the entries "accounts", "transactions" or "balances" also to be contained in the object.
If detailed accounts are referenced, it is required in addition that any account addressed within the additionalInformation attribute
is also addressed by at least one of the attributes "accounts", "transactions" or "balances".
ownerName
object[]
nullable
Is asking for account owner name of the accounts referenced within.
If the array is empty in the request, the TPP is asking for the account owner name of all accessible accounts.
This may be restricted in a PSU/ASPSP authorization dialogue.
If the array is empty, also the arrays for accounts, balances or transactions shall be empty, if used.
The ASPSP will indicate in the consent resource after a successful authorisation,
whether the ownerName consent can be accepted by providing the accounts on which the ownerName will be delivered. This array can be empty.
Possible values: Value must match regular expression [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
IBAN of the account.
Basic Bank Account Number (BBAN) Identifier.
This data element can be used in the body of the consent request. Message for retrieving account access consent from this account. This data elements is used for payment accounts which have no IBAN. ISO20022: Basic Bank Account Number (BBAN).
Identifier used nationally by financial institutions, i.e., in individual countries, generally as part of a National Account Numbering Scheme(s), which uniquely identifies the account of a customer
Possible values: <= 35 characters
Primary Account Number according to ISO/IEC 7812.
Possible values: <= 35 characters
Masked Primary Account Number.
Possible values: <= 35 characters
Mobile phone number.
other
object
In cases where the specifically defined criteria (IBAN, BBAN, MSISDN) are not provided to identify an instance of the respective account type
(e.g. a savings account), the ASPSP shall include a proprietary ID of the respective account that uniquely identifies the account for this ASPSP.
Possible values: non-empty
and <= 35 characters
Proprietary identification of the account.
Possible values: <= 35 characters
An entry provided by an external ISO code list.
Possible values: <= 35 characters
A scheme name defined in a proprietary way.
Possible values: <= 35 characters
Issuer of the identification.
Possible values: Value must match regular expression [A-Z]{3}
Account Currency Code.
Possible values: Value must match regular expression [A-Z]{3}
ExternalCashAccountType1Code from ISO 20022.
trustedBeneficiaries
object[]
nullable
Optional if supported by API provider.
Is asking for the trusted beneficiaries related to the accounts referenced within and related to the PSU.
If the array is empty in the request, the TPP is asking for the lists of trusted beneficiaries of all accessible accounts.
This may be restricted in a PSU/ASPSP authorization dialogue by the PSU if also the account lists addressed by the tags “accounts”, “balances” or “transactions” are empty.
The ASPSP will indicate in the consent resource after a successful authorisation,
whether the trustedBeneficiaries consent can be accepted by providing the accounts on which the list of trusted beneficiaries will be delivered.
This array can be empty.
Possible values: Value must match regular expression [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
IBAN of the account.
Basic Bank Account Number (BBAN) Identifier.
This data element can be used in the body of the consent request. Message for retrieving account access consent from this account. This data elements is used for payment accounts which have no IBAN. ISO20022: Basic Bank Account Number (BBAN).
Identifier used nationally by financial institutions, i.e., in individual countries, generally as part of a National Account Numbering Scheme(s), which uniquely identifies the account of a customer
Possible values: <= 35 characters
Primary Account Number according to ISO/IEC 7812.
Possible values: <= 35 characters
Masked Primary Account Number.
Possible values: <= 35 characters
Mobile phone number.
other
object
In cases where the specifically defined criteria (IBAN, BBAN, MSISDN) are not provided to identify an instance of the respective account type
(e.g. a savings account), the ASPSP shall include a proprietary ID of the respective account that uniquely identifies the account for this ASPSP.
Possible values: non-empty
and <= 35 characters
Proprietary identification of the account.
Possible values: <= 35 characters
An entry provided by an external ISO code list.
Possible values: <= 35 characters
A scheme name defined in a proprietary way.
Possible values: <= 35 characters
Issuer of the identification.
Possible values: Value must match regular expression [A-Z]{3}
Account Currency Code.
Possible values: Value must match regular expression [A-Z]{3}
ExternalCashAccountType1Code from ISO 20022.
Possible values: [allAccounts
, allAccountsWithOwnerName
]
Possible values: [allAccounts
, allAccountsWithOwnerName
]
Possible values: [allAccounts
, allAccountsWithOwnerName
]
Possible values: [allAccounts
, allAccountsWithOwnerName
]
"true", if the consent is for recurring access to the account data.
"false", if the consent is for one access to the account data.
This parameter is defining a valid until date (including the mentioned date) for the requested consent. The content is the local ASPSP date in ISO-Date format, e.g. 2017-10-30.
Future dates might get adjusted by ASPSP.
If a maximal available date is requested, a date in far future is to be used: "9999-12-31".
In both cases the consent object to be retrieved by the get consent request will contain the adjusted date.
Possible values: >= 1
and <= 2147483647
This field indicates the requested maximum frequency for an access without PSU involvement per day. For a one-off access, this attribute is set to "1".
The frequency needs to be greater equal to one.
If not otherwise agreed bilaterally between TPP and ASPSP, the frequency is less equal to 4.
If "true" indicates that a payment initiation service will be addressed in the same "session".
Responses
- 201
- 401
- 403
Created
Response Headers
X-Request-ID
string
ID of the request, unique to the call, as determined by the initiating party.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Possible values: [received
, rejected
, valid
, revokedByPsu
, expired
, terminatedByTpp
, partiallyAuthorised
]
This is the overall lifecycle status of the consent.
ID of the corresponding consent object as returned by an account information consent request.
scaMethods
object[]
nullable
This data element might be contained, if SCA is required and if the PSU has a choice between different authentication methods.
Depending on the risk management of the ASPSP this choice might be offered before or after the PSU has been identified with the first relevant factor,
or if an access token is transported.
If this data element is contained, then there is also a hyperlink of type 'startAuthorisationWithAuthenticationMethodSelection' contained in the response body.
These methods shall be presented towards the PSU for selection by the TPP.
Possible values: [smS_OTP
, chiP_OTP
, photO_OTP
, pusH_OTP
, smtP_OTP
]
Type of the authentication method.
Depending on the "authenticationType". This version can be used by differentiating authentication tools used within performing OTP generation in the same authentication type. This version can be referred to in the ASPSP?s documentation.
Possible values: non-empty
and <= 35 characters
An identification provided by the ASPSP for the later identification of the authentication method selection.
This is the name of the authentication method defined by the PSU in the Online Banking frontend of the ASPSP. Alternatively this could be a description provided by the ASPSP like "SMS OTP on phone +49160 xxxxx 28". This name shall be used by the TPP when presenting a list of authentication methods to the PSU, if available.
Detailed information about the SCA method for the PSU.
challengeData
object
It is contained in addition to the data element 'chosenScaMethod' if challenge data is needed for SCA.
In rare cases this attribute is also used in the context of the 'startAuthorisationWithPsuAuthentication' link.
PNG data(max. 512 kilobyte) to be displayed to the PSU, Base64 encoding, cp. [RFC4648]. This attribute is used only, when PHOTO_OTP or CHIP_OTP is the selected SCA method.
A collection of strings as challenge data.
A link where the ASPSP will provides the challenge image for the TPP.
The maximal length for the OTP to be typed in by the PSU.
Possible values: [characters
, integer
]
The format type of the OTP to be typed in. The admitted values are "characters" or "integer".
Additional explanation for the PSU to explain e.g. fallback mechanism for the chosen SCA method. The TPP is obliged to show this to the PSU
chosenScaMethod
object
Authentication object.
Possible values: [smS_OTP
, chiP_OTP
, photO_OTP
, pusH_OTP
, smtP_OTP
]
Type of the authentication method.
Depending on the "authenticationType". This version can be used by differentiating authentication tools used within performing OTP generation in the same authentication type. This version can be referred to in the ASPSP?s documentation.
Possible values: non-empty
and <= 35 characters
An identification provided by the ASPSP for the later identification of the authentication method selection.
This is the name of the authentication method defined by the PSU in the Online Banking frontend of the ASPSP. Alternatively this could be a description provided by the ASPSP like "SMS OTP on phone +49160 xxxxx 28". This name shall be used by the TPP when presenting a list of authentication methods to the PSU, if available.
Detailed information about the SCA method for the PSU.
Possible values: <= 500 characters
Text to be displayed to the PSU.
_links
object
A list of hyperlinks to be recognised by the TPP.
Type of links admitted in this response (which might be extended by single ASPSPs as indicated in its XS2A documentation):
scaRedirect
object
Link to a resource.
href Entry.
scaOAuth
object
Link to a resource.
href Entry.
confirmation
object
Link to a resource.
href Entry.
startAuthorisation
object
Link to a resource.
href Entry.
startAuthorisationWithPsuIdentification
object
Link to a resource.
href Entry.
startAuthorisationWithPsuAuthentication
object
Link to a resource.
href Entry.
startAuthorisationWithEncryptedPsuAuthentication
object
Link to a resource.
href Entry.
startAuthorisationWithAuthenticationMethodSelection
object
Link to a resource.
href Entry.
startAuthorisationWithTransactionAuthorisation
object
Link to a resource.
href Entry.
self
object
Link to a resource.
href Entry.
status
object
Link to a resource.
href Entry.
scaStatus
object
Link to a resource.
href Entry.
{
"consentStatus": "received",
"consentId": "string",
"scaMethods": [
{
"authenticationType": "smS_OTP",
"authenticationVersion": "string",
"authenticationMethodId": "string",
"name": "SMS OTP on phone +49160 xxxxx 28",
"explanation": "Detailed information about the SCA method for the PSU."
}
],
"challengeData": {
"myProperty": "string",
"data": "string",
"imageLink": "string",
"otpMaxLength": 0,
"otpFormat": "characters",
"additionalInformation": "string"
},
"chosenScaMethod": {
"authenticationType": "smS_OTP",
"authenticationVersion": "string",
"authenticationMethodId": "string",
"name": "SMS OTP on phone +49160 xxxxx 28",
"explanation": "Detailed information about the SCA method for the PSU."
},
"psuMessage": "string",
"_links": {
"scaRedirect": {
"href": "string"
},
"scaOAuth": {
"href": "string"
},
"confirmation": {
"href": "string"
},
"startAuthorisation": {
"href": "string"
},
"startAuthorisationWithPsuIdentification": {
"href": "string"
},
"startAuthorisationWithPsuAuthentication": {
"href": "string"
},
"startAuthorisationWithEncryptedPsuAuthentication": {
"href": "string"
},
"startAuthorisationWithAuthenticationMethodSelection": {
"href": "string"
},
"startAuthorisationWithTransactionAuthorisation": {
"href": "string"
},
"self": {
"href": "string"
},
"status": {
"href": "string"
},
"scaStatus": {
"href": "string"
}
}
}
{
"consentStatus": "received",
"consentId": "195a5d1a-8099-46bd-af0a-87ca589d070c",
"_links": {
"scaOAuth": {
"href": "https://psd2-sandbox.bkt.com.al/identity-server/.well-known/openid-configuration"
},
"self": {
"href": "/api/v1/accounts/consent/195a5d1a-8099-46bd-af0a-87ca589d070c"
},
"status": {
"href": "/api/v1/accounts/consent/195a5d1a-8099-46bd-af0a-87ca589d070c/status"
}
}
}
Unauthorized
Forbidden