Consent and PIR Management API V.003-11-Nov-2022
Consent and PIR Management API V.003-11-Nov-2022
Consent Management
REST API Specification
V3.0
2. Overview
Transacting via PISP requires an explicit consent of account holder, which is kept with Payer Person
FI. Before executing any instruction Payer Person submits over PISP Payer Person FI must check if
sufficient consent is both in place and valid.
Consent management operations include: consent issuance (3 through 6) and revocation (7). In its
turn, consent issuance is a multistep procedure, which is made of: requesting (3), authenticating (4),
granting (5) and finalizing (6). Note, that certain steps can be executed in slightly different ways
depending on what channel is used for consent Payer Person authentication, that is, Web or OTP.
Note that whenever FIDO (Fast IDentity Online) is referred to in this document FIDO 2 is assumed.
3.1.1. Flow
Note: At step 5, on receiving the Consent Request, the Payer Person FI needs to
6. In case Authentication is successful the redirect URL will contain following parameters
a. authenticationResponse=1
b. authenticationToken = Secret
7. In case Authentication is unsuccessful the redirect URL will indicate failure using following
parameters
a. authenticationResponse=0
Method POST
URL /consentRequests
Body {
"consentRequestID": "11111111-0000-0000-0000-000000000000",
"uid":
{
"type": "mobile",
"value": "+12345678901"
},
"authChannels": ["Web", "OTP"],
"callBackURI”: "pisp-
app://callback?authenticationResponse=1&authenticationToken=xxxxxxx”
}
Method PUT
URL /consentRequests/<consentRequestID>
Body {
"authChannels": ["Web"],
"authURI”: "fi.com/authorize?consentRequestID=11111111-0000-
0000-0000-000000000000"
}
Description Person FI responds with error to a PISP request for a new consent
Method PUT
URL /consentRequests/<consentRequestID>/error
Body {
errorInformation : {
errorCode: "1",
errorDescription: "Consent request error. Customer
not found or has invalid status"
}
3.2.1. Flow
Note: for OTP Generation, Payer Person FI must follow these guidelines.
1. OTP Length is 6 digits
Method PUT
URL /consentRequests/<consentRequestID>
Body {
"authChannels":["OTP"]
}
Description Person FI responds with error to a PISP request for a new consent
Method PUT
URL /consentRequests/<consentRequestID>/error
Body {
errorInformation : {
errorCode: "1",
errorDescription: "Consent request error. Customer
not found or has invalid status"
}
4.1.1. Flow
2. PISP will design its user interface such that in case Challenge is validated and it receives Grant
Consent within 1 minute it will prompt customer for next step, otherwise the process will
terminate.
1. In case FI identifies that the Consent Request has already been fulfilled then it will immediately
decline.
Description PISP delivers to Payer Person FI the secret resulted from Payer Person
authentication along with Payer Person public key
Method PATCH
URL /consentRequests/<consentRequestID>
4.2.1. Flow
3. OTP value provided by customer should not be stored in clear by PISP. It should be only captured
and used to create Challenge.
4. PISP will design its user interface such that in case Challenge is validated and it receives Grant
Consent within 1 minute it will prompt customer for next step, otherwise the process will
terminate.
2. In case FI identifies that the Consent Request has already been fulfilled then it will immediately
decline.
5. Granting Consent
5.1. Flow
Method POST
URL /consents
Body {
"consentRequestID": "1111111-0000-0000-0000-000000000000",
"consentID": "22222222-0000-0000-0000-000000000000",
"scopes":
[{
"accountNo": "PK26AIIN9234567890000003",
"actions": ["ACCOUNTS_TRANSFER"]
}]
}
Description Person FI responds with error to a PISP request for a new consent
Method PUT
URL /consentRequests/<consentRequestID>/error
Body {
errorInformation : {
errorCode: "3",
errorDescription: " Authentication error. Customer
public key not recognized"
}
}
Method PUT
URL /consents/<consentID>
Body {
"scopes":
[{
"accountNo": "PK26AIIN9234567890000003",
"actions": ["ACCOUNTS_TRANSFER"]
}],
"fidoPublicKeyCredentialAssertion":
{
"id": "5C1VIOMZf_20lXL3VLrHZoIxDsQsErKdr9Mi6v-…",
"response":
{
"authenticatorData": "SZYN5YgOjGh0NBcPZHZgW4_kr…",
"clientDataJSON": "MEQCIAEoNafIT4gUb9Xx…",
"signature": "IAEoNMEQCafIT4gUb9Xx…",
"userHandle": "BUKjEd1Ff0dx_S8NYTlSjcMh7G9…"
}
}
}
Method PATCH
URL /consents/<consentID>
Body {
Description Person FI responds with error to a PISP request for a new consent
Method PATCH
URL /consents/<consentID>/error
Body {
errorInformation : {
7. Revoking Consent
7.1. Revocation from PISP Side
7.1.1. Flow
Method DELETE
Method PATCH
URL /consents/<consentID>
Authorization Basic
Body {
"status":"REVOKED",
"revokedAt":"2022-06-20T13:00:00.000"
}
Description Person FI responds with error to a PISP request for a new consent
Method PATCH
URL /consents/<consentID>/error
Authorization Basic
Body {
errorInformation : {
errorCode: "10",
errorDescription: " Consent revocation error.
Consent does not exist or has invalid status"
}
}
7.2.1. Flow
9. Composing a Challenge
9.1. Challenge for Credentials Generation
11. Authentication
Authentication is carried out using an access token in JWT format. To obtain an access token, participant
needs to request it specifying Client token.
In response, Access server performs password-based authentication and issues an access token with short
lifetime and refresh token with long lifetime.
Refresh token is used to obtain additional access tokens on demand without sending user’s password.
Participant can send request to Access server for a new access token based on a previously issued and valid
refresh token without specifying user's password.
Refer to “IPS Messaging REST API specification”, chapter 4 ‘Authentication’ for detailed description of
methods to retrieve token.