createAuthorisation
Start the authorisation process for a payment initiation
Create an authorisation sub-resource and start the authorisation process. The message might in addition transmit authentication and authorisation related data. The ASPSP might make the usage of this access method unnecessary in case of only one SCA process needed, since the related authorisation resource might be automatically created by the ASPSP after the submission of the payment data with the first *POST /api/v1/payments/{payment-product}* call. The start authorisation process is a process which is needed for creating a new authorisation. This applies in the following scenarios: - The ASPSP has indicated with a 'startAuthorisation' hyperlink in the preceding Payment initiation response that an explicit start of the authorisation process is needed by the TPP.
/api/v1/payments/{payment-product}/{payment-id}/authorisations
Usage and SDK Samples
curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
"//api/v1/payments/{payment-product}/{payment-id}/authorisations"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PaymentInitiationServicePISApi;
import java.io.File;
import java.util.*;
public class PaymentInitiationServicePISApiExample {
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");
PaymentInitiationServicePISApi apiInstance = new PaymentInitiationServicePISApi();
String xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
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 paymentProduct = paymentProduct_example; // String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
String paymentId = paymentId_example; // String | Resource identification of the generated payment initiation resource.
String pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
try {
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, tPPRedirectURI, tPPNokRedirectURI, paymentProduct, paymentId, pSUIPAddress);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentInitiationServicePISApi#createAuthorisation");
e.printStackTrace();
}
}
}
import io.swagger.client.api.PaymentInitiationServicePISApi;
public class PaymentInitiationServicePISApiExample {
public static void main(String[] args) {
PaymentInitiationServicePISApi apiInstance = new PaymentInitiationServicePISApi();
String xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
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 paymentProduct = paymentProduct_example; // String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
String paymentId = paymentId_example; // String | Resource identification of the generated payment initiation resource.
String pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
try {
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, tPPRedirectURI, tPPNokRedirectURI, paymentProduct, paymentId, pSUIPAddress);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PaymentInitiationServicePISApi#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 *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.
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.
String *paymentProduct = paymentProduct_example; // The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
String *paymentId = paymentId_example; // Resource identification of the generated payment initiation resource.
String *pSUIPAddress = pSUIPAddress_example; // The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. (optional)
PaymentInitiationServicePISApi *apiInstance = [[PaymentInitiationServicePISApi alloc] init];
// Start the authorisation process for a payment initiation
[apiInstance createAuthorisationWith:xRequestID
tPPRedirectURI:tPPRedirectURI
tPPNokRedirectURI:tPPNokRedirectURI
paymentProduct:paymentProduct
paymentId:paymentId
pSUIPAddress:pSUIPAddress
completionHandler: ^(CreateAuthorisationResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var PaymentInitiationApiPis = require('payment_initiation_api__pis');
var defaultClient = PaymentInitiationApiPis.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 PaymentInitiationApiPis.PaymentInitiationServicePISApi()
var xRequestID = xRequestID_example; // {{String}} ID of the request, unique to the call, as determined by the initiating party.
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.
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.
var paymentProduct = paymentProduct_example; // {{String}} The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
var paymentId = paymentId_example; // {{String}} Resource identification of the generated payment initiation resource.
var opts = {
'pSUIPAddress': pSUIPAddress_example // {{String}} The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createAuthorisation(xRequestID, tPPRedirectURI, tPPNokRedirectURI, paymentProduct, paymentId, 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 PaymentInitiationServicePISApi();
var xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
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.
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.
var paymentProduct = paymentProduct_example; // String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
var paymentId = paymentId_example; // String | Resource identification of the generated payment initiation resource.
var pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. (optional)
try
{
// Start the authorisation process for a payment initiation
CreateAuthorisationResponse result = apiInstance.createAuthorisation(xRequestID, tPPRedirectURI, tPPNokRedirectURI, paymentProduct, paymentId, pSUIPAddress);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PaymentInitiationServicePISApi.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\ApiPaymentInitiationServicePISApi();
$xRequestID = xRequestID_example; // String | ID of the request, unique to the call, as determined by the initiating party.
$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.
$paymentProduct = paymentProduct_example; // String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
$paymentId = paymentId_example; // String | Resource identification of the generated payment initiation resource.
$pSUIPAddress = pSUIPAddress_example; // String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
try {
$result = $api_instance->createAuthorisation($xRequestID, $tPPRedirectURI, $tPPNokRedirectURI, $paymentProduct, $paymentId, $pSUIPAddress);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PaymentInitiationServicePISApi->createAuthorisation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PaymentInitiationServicePISApi;
# 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::PaymentInitiationServicePISApi->new();
my $xRequestID = xRequestID_example; # String | ID of the request, unique to the call, as determined by the initiating party.
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 $paymentProduct = paymentProduct_example; # String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
my $paymentId = paymentId_example; # String | Resource identification of the generated payment initiation resource.
my $pSUIPAddress = pSUIPAddress_example; # String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
eval {
my $result = $api_instance->createAuthorisation(xRequestID => $xRequestID, tPPRedirectURI => $tPPRedirectURI, tPPNokRedirectURI => $tPPNokRedirectURI, paymentProduct => $paymentProduct, paymentId => $paymentId, pSUIPAddress => $pSUIPAddress);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PaymentInitiationServicePISApi->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.PaymentInitiationServicePISApi()
xRequestID = xRequestID_example # String | ID of the request, unique to the call, as determined by the initiating party.
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.
paymentProduct = paymentProduct_example # String | The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
paymentId = paymentId_example # String | Resource identification of the generated payment initiation resource.
pSUIPAddress = pSUIPAddress_example # String | The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. (optional)
try:
# Start the authorisation process for a payment initiation
api_response = api_instance.create_authorisation(xRequestID, tPPRedirectURI, tPPNokRedirectURI, paymentProduct, paymentId, pSUIPAddress=pSUIPAddress)
pprint(api_response)
except ApiException as e:
print("Exception when calling PaymentInitiationServicePISApi->createAuthorisation: %s\n" % e)
Parameters
Name | Description |
---|---|
payment-product* |
String
The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.
Required
|
payment-id* |
String
Resource identification of the generated payment initiation resource.
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.<br> **Remark for Future:** This field might be changed to mandatory in the next version of the specification.
Required
|
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.
Required
|
PSU-IP-Address |
String
The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP.
|