createDomesticPaymentConsents
Create Domestic Payment Consents
/domestic-payment-consents
                        
Usage and SDK Samples
curl -X POST\
\
\
-H "Accept: application/json; charset=utf-8,application/json,application/jose+jwe"\
-H "Content-Type: application/json; charset=utf-8,application/json,application/jose+jwe"\
"https://api.ob.alrayanbank.co.uk/pisp/v3.1/domestic-payment-consents"
                          import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DomesticPaymentsApi;
import java.io.File;
import java.util.*;
public class DomesticPaymentsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure OAuth2 access token for authorization: TPPOAuth2Security
        OAuth TPPOAuth2Security = (OAuth) defaultClient.getAuthentication("TPPOAuth2Security");
        TPPOAuth2Security.setAccessToken("YOUR ACCESS TOKEN");
        // Configure OAuth2 access token for authorization: default
        OAuth default = (OAuth) defaultClient.getAuthentication("default");
        default.setAccessToken("YOUR ACCESS TOKEN");
        DomesticPaymentsApi apiInstance = new DomesticPaymentsApi();
        OBWriteDomesticConsent4 body = ; // OBWriteDomesticConsent4 | Default
        String authorization = authorization_example; // String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
        String xIdempotencyKey = xIdempotencyKey_example; // String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
        String xJwsSignature = xJwsSignature_example; // String | A detached JWS signature of the body of the payload.
        String xFapiAuthDate = xFapiAuthDate_example; // String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
        String xFapiCustomerIpAddress = xFapiCustomerIpAddress_example; // String | The PSU's IP address if the PSU is currently logged in with the TPP.
        String xFapiInteractionId = xFapiInteractionId_example; // String | An RFC4122 UID used as a correlation id.
        String xCustomerUserAgent = xCustomerUserAgent_example; // String | Indicates the user-agent that the PSU is using.
        try {
            OBWriteDomesticConsentResponse5 result = apiInstance.createDomesticPaymentConsents(body, authorization, xIdempotencyKey, xJwsSignature, xFapiAuthDate, xFapiCustomerIpAddress, xFapiInteractionId, xCustomerUserAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomesticPaymentsApi#createDomesticPaymentConsents");
            e.printStackTrace();
        }
    }
}
                          import io.swagger.client.api.DomesticPaymentsApi;
public class DomesticPaymentsApiExample {
    public static void main(String[] args) {
        DomesticPaymentsApi apiInstance = new DomesticPaymentsApi();
        OBWriteDomesticConsent4 body = ; // OBWriteDomesticConsent4 | Default
        String authorization = authorization_example; // String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
        String xIdempotencyKey = xIdempotencyKey_example; // String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
        String xJwsSignature = xJwsSignature_example; // String | A detached JWS signature of the body of the payload.
        String xFapiAuthDate = xFapiAuthDate_example; // String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
        String xFapiCustomerIpAddress = xFapiCustomerIpAddress_example; // String | The PSU's IP address if the PSU is currently logged in with the TPP.
        String xFapiInteractionId = xFapiInteractionId_example; // String | An RFC4122 UID used as a correlation id.
        String xCustomerUserAgent = xCustomerUserAgent_example; // String | Indicates the user-agent that the PSU is using.
        try {
            OBWriteDomesticConsentResponse5 result = apiInstance.createDomesticPaymentConsents(body, authorization, xIdempotencyKey, xJwsSignature, xFapiAuthDate, xFapiCustomerIpAddress, xFapiInteractionId, xCustomerUserAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DomesticPaymentsApi#createDomesticPaymentConsents");
            e.printStackTrace();
        }
    }
}
                          Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: TPPOAuth2Security)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
// Configure OAuth2 access token for authorization: (authentication scheme: default)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
OBWriteDomesticConsent4 *body = ; // Default
String *authorization = authorization_example; // An Authorisation Token as per https://tools.ietf.org/html/rfc6750
String *xIdempotencyKey = xIdempotencyKey_example; // Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
String *xJwsSignature = xJwsSignature_example; // A detached JWS signature of the body of the payload.
String *xFapiAuthDate = xFapiAuthDate_example; // The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC (optional)
String *xFapiCustomerIpAddress = xFapiCustomerIpAddress_example; // The PSU's IP address if the PSU is currently logged in with the TPP. (optional)
String *xFapiInteractionId = xFapiInteractionId_example; // An RFC4122 UID used as a correlation id. (optional)
String *xCustomerUserAgent = xCustomerUserAgent_example; // Indicates the user-agent that the PSU is using. (optional)
DomesticPaymentsApi *apiInstance = [[DomesticPaymentsApi alloc] init];
// Create Domestic Payment Consents
[apiInstance createDomesticPaymentConsentsWith:body
    authorization:authorization
    xIdempotencyKey:xIdempotencyKey
    xJwsSignature:xJwsSignature
    xFapiAuthDate:xFapiAuthDate
    xFapiCustomerIpAddress:xFapiCustomerIpAddress
    xFapiInteractionId:xFapiInteractionId
    xCustomerUserAgent:xCustomerUserAgent
              completionHandler: ^(OBWriteDomesticConsentResponse5 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
                            var PaymentInitiationApi = require('payment_initiation_api');
var defaultClient = PaymentInitiationApi.ApiClient.instance;
// Configure OAuth2 access token for authorization: TPPOAuth2Security
var TPPOAuth2Security = defaultClient.authentications['TPPOAuth2Security'];
TPPOAuth2Security.accessToken = "YOUR ACCESS TOKEN"
// Configure OAuth2 access token for authorization: default
var default = defaultClient.authentications['default'];
default.accessToken = "YOUR ACCESS TOKEN"
var api = new PaymentInitiationApi.DomesticPaymentsApi()
var body = ; // {{OBWriteDomesticConsent4}} Default
var authorization = authorization_example; // {{String}} An Authorisation Token as per https://tools.ietf.org/html/rfc6750
var xIdempotencyKey = xIdempotencyKey_example; // {{String}} Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
var xJwsSignature = xJwsSignature_example; // {{String}} A detached JWS signature of the body of the payload.
var opts = { 
  'xFapiAuthDate': xFapiAuthDate_example // {{String}} The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
  'xFapiCustomerIpAddress': xFapiCustomerIpAddress_example // {{String}} The PSU's IP address if the PSU is currently logged in with the TPP.
  'xFapiInteractionId': xFapiInteractionId_example // {{String}} An RFC4122 UID used as a correlation id.
  'xCustomerUserAgent': xCustomerUserAgent_example // {{String}} Indicates the user-agent that the PSU is using.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createDomesticPaymentConsents(bodyauthorizationxIdempotencyKeyxJwsSignature, opts, callback);
                            using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
    public class createDomesticPaymentConsentsExample
    {
        public void main()
        {
            // Configure OAuth2 access token for authorization: TPPOAuth2Security
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: default
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            var apiInstance = new DomesticPaymentsApi();
            var body = new OBWriteDomesticConsent4(); // OBWriteDomesticConsent4 | Default
            var authorization = authorization_example;  // String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
            var xIdempotencyKey = xIdempotencyKey_example;  // String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
            var xJwsSignature = xJwsSignature_example;  // String | A detached JWS signature of the body of the payload.
            var xFapiAuthDate = xFapiAuthDate_example;  // String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC (optional) 
            var xFapiCustomerIpAddress = xFapiCustomerIpAddress_example;  // String | The PSU's IP address if the PSU is currently logged in with the TPP. (optional) 
            var xFapiInteractionId = xFapiInteractionId_example;  // String | An RFC4122 UID used as a correlation id. (optional) 
            var xCustomerUserAgent = xCustomerUserAgent_example;  // String | Indicates the user-agent that the PSU is using. (optional) 
            try
            {
                // Create Domestic Payment Consents
                OBWriteDomesticConsentResponse5 result = apiInstance.createDomesticPaymentConsents(body, authorization, xIdempotencyKey, xJwsSignature, xFapiAuthDate, xFapiCustomerIpAddress, xFapiInteractionId, xCustomerUserAgent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DomesticPaymentsApi.createDomesticPaymentConsents: " + e.Message );
            }
        }
    }
}
                            <?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: TPPOAuth2Security
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: default
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\ApiDomesticPaymentsApi();
$body = ; // OBWriteDomesticConsent4 | Default
$authorization = authorization_example; // String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
$xIdempotencyKey = xIdempotencyKey_example; // String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
$xJwsSignature = xJwsSignature_example; // String | A detached JWS signature of the body of the payload.
$xFapiAuthDate = xFapiAuthDate_example; // String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
$xFapiCustomerIpAddress = xFapiCustomerIpAddress_example; // String | The PSU's IP address if the PSU is currently logged in with the TPP.
$xFapiInteractionId = xFapiInteractionId_example; // String | An RFC4122 UID used as a correlation id.
$xCustomerUserAgent = xCustomerUserAgent_example; // String | Indicates the user-agent that the PSU is using.
try {
    $result = $api_instance->createDomesticPaymentConsents($body, $authorization, $xIdempotencyKey, $xJwsSignature, $xFapiAuthDate, $xFapiCustomerIpAddress, $xFapiInteractionId, $xCustomerUserAgent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DomesticPaymentsApi->createDomesticPaymentConsents: ', $e->getMessage(), PHP_EOL;
}
?>
                            use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DomesticPaymentsApi;
# Configure OAuth2 access token for authorization: TPPOAuth2Security
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: default
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api_instance = WWW::SwaggerClient::DomesticPaymentsApi->new();
my $body = WWW::SwaggerClient::Object::OBWriteDomesticConsent4->new(); # OBWriteDomesticConsent4 | Default
my $authorization = authorization_example; # String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
my $xIdempotencyKey = xIdempotencyKey_example; # String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
my $xJwsSignature = xJwsSignature_example; # String | A detached JWS signature of the body of the payload.
my $xFapiAuthDate = xFapiAuthDate_example; # String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
my $xFapiCustomerIpAddress = xFapiCustomerIpAddress_example; # String | The PSU's IP address if the PSU is currently logged in with the TPP.
my $xFapiInteractionId = xFapiInteractionId_example; # String | An RFC4122 UID used as a correlation id.
my $xCustomerUserAgent = xCustomerUserAgent_example; # String | Indicates the user-agent that the PSU is using.
eval { 
    my $result = $api_instance->createDomesticPaymentConsents(body => $body, authorization => $authorization, xIdempotencyKey => $xIdempotencyKey, xJwsSignature => $xJwsSignature, xFapiAuthDate => $xFapiAuthDate, xFapiCustomerIpAddress => $xFapiCustomerIpAddress, xFapiInteractionId => $xFapiInteractionId, xCustomerUserAgent => $xCustomerUserAgent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DomesticPaymentsApi->createDomesticPaymentConsents: $@\n";
}
                            from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: TPPOAuth2Security
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: default
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.DomesticPaymentsApi()
body =  # OBWriteDomesticConsent4 | Default
authorization = authorization_example # String | An Authorisation Token as per https://tools.ietf.org/html/rfc6750
xIdempotencyKey = xIdempotencyKey_example # String | Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
xJwsSignature = xJwsSignature_example # String | A detached JWS signature of the body of the payload.
xFapiAuthDate = xFapiAuthDate_example # String | The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC (optional)
xFapiCustomerIpAddress = xFapiCustomerIpAddress_example # String | The PSU's IP address if the PSU is currently logged in with the TPP. (optional)
xFapiInteractionId = xFapiInteractionId_example # String | An RFC4122 UID used as a correlation id. (optional)
xCustomerUserAgent = xCustomerUserAgent_example # String | Indicates the user-agent that the PSU is using. (optional)
try: 
    # Create Domestic Payment Consents
    api_response = api_instance.create_domestic_payment_consents(body, authorization, xIdempotencyKey, xJwsSignature, xFapiAuthDate=xFapiAuthDate, xFapiCustomerIpAddress=xFapiCustomerIpAddress, xFapiInteractionId=xFapiInteractionId, xCustomerUserAgent=xCustomerUserAgent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DomesticPaymentsApi->createDomesticPaymentConsents: %s\n" % e)
                            Parameters
| Name | Description | 
|---|---|
| x-fapi-auth-date | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                          
                                                          The time when the PSU last logged in with the TPP. 
All dates in the HTTP headers are represented as RFC 7231 Full Dates. An example is below: 
Sun, 10 Sep 2017 19:43:31 UTC
                                                       
                                               | 
                                  
| x-fapi-customer-ip-address | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                          
                                                          The PSU's IP address if the PSU is currently logged in with the TPP.
                                                       
                                               | 
                                  
| x-fapi-interaction-id | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                          
                                                          An RFC4122 UID used as a correlation id.
                                                       
                                               | 
                                  
| Authorization* | |
| x-idempotency-key* | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                                  
                                                          Every request will be processed only once per x-idempotency-key.  The
Idempotency Key will be valid for 24 hours.
                                                       
                                              
                                                      Required
                                                   
                                           | 
                                  
| x-jws-signature* | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                                  
                                                          A detached JWS signature of the body of the payload.
                                                       
                                              
                                                      Required
                                                   
                                           | 
                                  
| x-customer-user-agent | 
                                  
                                  
                                       
                                                  
                                                      String
                                                  
                                  
                                                       
                                          
                                                          Indicates the user-agent that the PSU is using.
                                                       
                                               | 
                                  
| Name | Description | 
|---|---|
| body * | 
Responses
Status: 201 - Domestic Payment Consents Created
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | ||
| x-jws-signature | String | 
Status: 400 - Bad request
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | ||
| x-jws-signature | String | 
Status: 401 - Unauthorized
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | 
Status: 403 - Forbidden
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | ||
| x-jws-signature | String | 
Status: 405 - Method Not Allowed
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | 
Status: 406 - Not Acceptable
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | 
Status: 415 - Unsupported Media Type
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | 
Status: 429 - Too Many Requests
| Name | Type | Format | Description | 
|---|---|---|---|
| Retry-After | Integer | ||
| x-fapi-interaction-id | String | 
Status: 500 - Internal Server Error
| Name | Type | Format | Description | 
|---|---|---|---|
| x-fapi-interaction-id | String | ||
| x-jws-signature | String |