createAuthorisation
Start the authorisation process for a consent
Create an authorisation sub-resource and start the authorisation process of a consent. The message might in addition transmit authentication and authorisation related data. his method is iterated n times for a n times SCA authorisation in a corporate context, each creating an own authorisation sub-endpoint for the corresponding PSU authorising the consent. The ASPSP might make the usage of this access method unnecessary, since the related authorisation resource will be automatically created by the ASPSP after the submission of the consent data with the first POST consents call. The start authorisation process is a process which is needed for creating a new authorisation or cancellation sub-resource. This applies in the following scenarios: * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding Payment initiation response that an explicit start of the authorisation process is needed by the TPP. The 'startAuthorisation' hyperlink can transport more information about data which needs to be uploaded by using the extended forms: * 'startAuthorisationWithPsuIdentfication', * 'startAuthorisationWithPsuAuthentication' * 'startAuthorisationWithEncryptedPsuAuthentication' * 'startAuthorisationWithAuthentciationMethodSelection' * The related payment initiation cannot yet be executed since a multilevel SCA is mandated. * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding payment cancellation response that an explicit start of the authorisation process is needed by the TPP. The 'startAuthorisation' hyperlink can transport more information about data which needs to be uploaded by using the extended forms as indicated above. * The related payment cancellation request cannot be applied yet since a multilevel SCA is mandate for executing the cancellation. * The signing basket needs to be authorised yet.
/api/v1/consents/{consentId}/authorisations
Usage and SDK Samples
curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json,*/*,application/problem+json"\
"//api/v1/consents/{consentId}/authorisations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountInformationServiceAISApi;
import java.io.File;
import java.util.*;
public class AccountInformationServiceAISApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: Bearer
ApiKeyAuth Bearer = (ApiKeyAuth) defaultClient.getAuthentication("Bearer");
Bearer.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.setApiKeyPrefix("Token");
AccountInformationServiceAISApi apiInstance = new AccountInformationServiceAISApi();
String xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
String consentId = consentId_example; // String | ID of the corresponding consent object as returned by an account information consent request.
String tPPRedirectURI = tPPRedirectURI_example; // String | 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.
String tPPNokRedirectURI = tPPNokRedirectURI_example; // String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
String pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
try {
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, consentId, tPPRedirectURI, tPPNokRedirectURI, pSUIPAddress);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountInformationServiceAISApi#createAuthorisation");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AccountInformationServiceAISApi;
public class AccountInformationServiceAISApiExample {
public static void main(String[] args) {
AccountInformationServiceAISApi apiInstance = new AccountInformationServiceAISApi();
String xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
String consentId = consentId_example; // String | ID of the corresponding consent object as returned by an account information consent request.
String tPPRedirectURI = tPPRedirectURI_example; // String | 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.
String tPPNokRedirectURI = tPPNokRedirectURI_example; // String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
String pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
try {
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, consentId, tPPRedirectURI, tPPNokRedirectURI, pSUIPAddress);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountInformationServiceAISApi#createAuthorisation");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: Bearer)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];
String *xRequestID = xRequestID_example; // ID of the request, unique to the call, as determined by the initiating party.
String *consentId = consentId_example; // ID of the corresponding consent object as returned by an account information consent request.
String *tPPRedirectURI = tPPRedirectURI_example; // 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. (optional)
String *tPPNokRedirectURI = tPPNokRedirectURI_example; // If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP. (optional)
String *pSUIPAddress = pSUIPAddress_example; // The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU. (optional)
AccountInformationServiceAISApi *apiInstance = [[AccountInformationServiceAISApi alloc] init];
// Start the authorisation process for a consent
[apiInstance createAuthorisationWith:xRequestID
consentId:consentId
tPPRedirectURI:tPPRedirectURI
tPPNokRedirectURI:tPPNokRedirectURI
pSUIPAddress:pSUIPAddress
completionHandler: ^(CreateAuthorisationResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AccountInformationApiAis = require('account_information_api__ais');
var defaultClient = AccountInformationApiAis.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"
var api = new AccountInformationApiAis.AccountInformationServiceAISApi()
var xRequestID = xRequestID_example; // {{String}} ID of the request, unique to the call, as determined by the initiating party.
var consentId = consentId_example; // {{String}} ID of the corresponding consent object as returned by an account information consent request.
var opts = {
'tPPRedirectURI': tPPRedirectURI_example, // {{String}} 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.
'tPPNokRedirectURI': tPPNokRedirectURI_example, // {{String}} If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
'pSUIPAddress': pSUIPAddress_example // {{String}} The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createAuthorisation(xRequestID, consentId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createAuthorisationExample
{
public void main()
{
// Configure API key authorization: Bearer
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new AccountInformationServiceAISApi();
var xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
var consentId = consentId_example; // String | ID of the corresponding consent object as returned by an account information consent request.
var tPPRedirectURI = tPPRedirectURI_example; // String | 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. (optional)
var tPPNokRedirectURI = tPPNokRedirectURI_example; // String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP. (optional)
var pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU. (optional)
try
{
// Start the authorisation process for a consent
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, consentId, tPPRedirectURI, tPPNokRedirectURI, pSUIPAddress);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AccountInformationServiceAISApi.createAuthorisation: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Bearer
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$api_instance = new Swagger\Client\ApiAccountInformationServiceAISApi();
$xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
$consentId = consentId_example; // String | ID of the corresponding consent object as returned by an account information consent request.
$tPPRedirectURI = tPPRedirectURI_example; // String | 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.
$tPPNokRedirectURI = tPPNokRedirectURI_example; // String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
$pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
try {
$result = $api_instance->createAuthorisation($xRequestID, $consentId, $tPPRedirectURI, $tPPNokRedirectURI, $pSUIPAddress);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountInformationServiceAISApi->createAuthorisation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountInformationServiceAISApi;
# Configure API key authorization: Bearer
$WWW::SwaggerClient::Configuration::api_key->{'Authorization'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Authorization'} = "Bearer";
my $api_instance = WWW::SwaggerClient::AccountInformationServiceAISApi->new();
my $xRequestID = xRequestID_example; # String | ID of the request, unique to the call, as determined by the initiating party.
my $consentId = consentId_example; # String | ID of the corresponding consent object as returned by an account information consent request.
my $tPPRedirectURI = tPPRedirectURI_example; # String | 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.
my $tPPNokRedirectURI = tPPNokRedirectURI_example; # String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
my $pSUIPAddress = pSUIPAddress_example; # String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
eval {
my $result = $api_instance->createAuthorisation(xRequestID => $xRequestID, consentId => $consentId, tPPRedirectURI => $tPPRedirectURI, tPPNokRedirectURI => $tPPNokRedirectURI, pSUIPAddress => $pSUIPAddress);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AccountInformationServiceAISApi->createAuthorisation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: Bearer
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.AccountInformationServiceAISApi()
xRequestID = xRequestID_example # String | ID of the request, unique to the call, as determined by the initiating party.
consentId = consentId_example # String | ID of the corresponding consent object as returned by an account information consent request.
tPPRedirectURI = tPPRedirectURI_example # String | 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. (optional)
tPPNokRedirectURI = tPPNokRedirectURI_example # String | If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP. (optional)
pSUIPAddress = pSUIPAddress_example # String | The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU. (optional)
try:
# Start the authorisation process for a consent
api_response = api_instance.create_authorisation(xRequestID, consentId, tPPRedirectURI=tPPRedirectURI, tPPNokRedirectURI=tPPNokRedirectURI, pSUIPAddress=pSUIPAddress)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountInformationServiceAISApi->createAuthorisation: %s\n" % e)
Parameters
Name | Description |
---|---|
consentId* |
String
ID of the corresponding consent object as returned by an account information consent request.
Required
|
Name | Description |
---|---|
X-Request-ID* |
String
ID of the request, unique to the call, as determined by the initiating party.
Required
|
TPP-Redirect-URI |
String
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.
|
TPP-Nok-Redirect-URI |
String
If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.
|
PSU-IP-Address |
String
The forwarded IP Address header field consists of the corresponding HTTP request IP Address field between PSU and TPP. It shall be contained if and only if this request was actively initiated by the PSU.
|