curl --request POST \
--url https://api.yapily.com/payment-pre-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"applicationUserId": "string",
"institutionId": "n26",
"callback": "https://display-parameters.com/",
"scope": "PIS",
"reference": "Bill Payment",
"amount": {
"amount": 1,
"currency": "EUR"
},
"payee": {
"name": "Jane Doe",
"country": "BE",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
},
"payer": {
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
}
}
'import requests
url = "https://api.yapily.com/payment-pre-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "n26",
"callback": "https://display-parameters.com/",
"scope": "PIS",
"reference": "Bill Payment",
"amount": {
"amount": 1,
"currency": "EUR"
},
"payee": {
"name": "Jane Doe",
"country": "BE",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
},
"payer": { "accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
] }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
applicationUserId: 'string',
institutionId: 'n26',
callback: 'https://display-parameters.com/',
scope: 'PIS',
reference: 'Bill Payment',
amount: {amount: 1, currency: 'EUR'},
payee: {
name: 'Jane Doe',
country: 'BE',
accountIdentifications: [{type: 'IBAN', identification: 'BE12345678901234'}]
},
payer: {
accountIdentifications: [{type: 'IBAN', identification: 'DE12345678901234567890'}]
}
})
};
fetch('https://api.yapily.com/payment-pre-auth-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yapily.com/payment-pre-auth-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'applicationUserId' => 'string',
'institutionId' => 'n26',
'callback' => 'https://display-parameters.com/',
'scope' => 'PIS',
'reference' => 'Bill Payment',
'amount' => [
'amount' => 1,
'currency' => 'EUR'
],
'payee' => [
'name' => 'Jane Doe',
'country' => 'BE',
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'BE12345678901234'
]
]
],
'payer' => [
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'DE12345678901234567890'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yapily.com/payment-pre-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yapily.com/payment-pre-auth-requests")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/payment-pre-auth-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "ba79c56773de42129dbf8164b202276c"
},
"data": {
"id": "53ff00d0-91dd-417d-880b-cdd7c50090ed",
"userUuid": "e2578545-27a4-4edf-983f-5d33c2d7b559",
"applicationUserId": "string",
"institutionId": "n26",
"state": "4399535ee4de46238fce108a95669848",
"status": "AWAITING_PRE_AUTHORIZATION",
"createdAt": "2021-06-10T09:54:46.669Z",
"featureScope": [
"INITIATE_ONETIME_PRE_AUTHORISATION_PAYMENTS"
],
"authorisationUrl": "https://app.n26.com/open-banking?requestId=2e2b2efd-82bb-4a2b-8f67-ced1a93511b8&state=4399535ee4de46238fce108a95669848&authType=XS2A&scope=DEDICATED_PISP",
"qrCodeUrl": "https://images.yapily.com/image/7384ad3b-5eb1-4304-9cfa-7aa6fcc5e0c7/1623318888?size=0"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Create Payment Pre-authorisation
Used to initiate the pre-authorisation process for payments for CBI Globe institutions that contain the INITIATE_ONETIME_PRE_AUTHORISATION_PAYMENTS feature to authenticate the user.
Feature: INITIATE_ONETIME_PRE_AUTHORISATION_PAYMENTS
curl --request POST \
--url https://api.yapily.com/payment-pre-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"applicationUserId": "string",
"institutionId": "n26",
"callback": "https://display-parameters.com/",
"scope": "PIS",
"reference": "Bill Payment",
"amount": {
"amount": 1,
"currency": "EUR"
},
"payee": {
"name": "Jane Doe",
"country": "BE",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
},
"payer": {
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
}
}
'import requests
url = "https://api.yapily.com/payment-pre-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "n26",
"callback": "https://display-parameters.com/",
"scope": "PIS",
"reference": "Bill Payment",
"amount": {
"amount": 1,
"currency": "EUR"
},
"payee": {
"name": "Jane Doe",
"country": "BE",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
},
"payer": { "accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
] }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
applicationUserId: 'string',
institutionId: 'n26',
callback: 'https://display-parameters.com/',
scope: 'PIS',
reference: 'Bill Payment',
amount: {amount: 1, currency: 'EUR'},
payee: {
name: 'Jane Doe',
country: 'BE',
accountIdentifications: [{type: 'IBAN', identification: 'BE12345678901234'}]
},
payer: {
accountIdentifications: [{type: 'IBAN', identification: 'DE12345678901234567890'}]
}
})
};
fetch('https://api.yapily.com/payment-pre-auth-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yapily.com/payment-pre-auth-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'applicationUserId' => 'string',
'institutionId' => 'n26',
'callback' => 'https://display-parameters.com/',
'scope' => 'PIS',
'reference' => 'Bill Payment',
'amount' => [
'amount' => 1,
'currency' => 'EUR'
],
'payee' => [
'name' => 'Jane Doe',
'country' => 'BE',
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'BE12345678901234'
]
]
],
'payer' => [
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'DE12345678901234567890'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yapily.com/payment-pre-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yapily.com/payment-pre-auth-requests")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/payment-pre-auth-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"callback\": \"https://display-parameters.com/\",\n \"scope\": \"PIS\",\n \"reference\": \"Bill Payment\",\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"country\": \"BE\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n },\n \"payer\": {\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "ba79c56773de42129dbf8164b202276c"
},
"data": {
"id": "53ff00d0-91dd-417d-880b-cdd7c50090ed",
"userUuid": "e2578545-27a4-4edf-983f-5d33c2d7b559",
"applicationUserId": "string",
"institutionId": "n26",
"state": "4399535ee4de46238fce108a95669848",
"status": "AWAITING_PRE_AUTHORIZATION",
"createdAt": "2021-06-10T09:54:46.669Z",
"featureScope": [
"INITIATE_ONETIME_PRE_AUTHORISATION_PAYMENTS"
],
"authorisationUrl": "https://app.n26.com/open-banking?requestId=2e2b2efd-82bb-4a2b-8f67-ced1a93511b8&state=4399535ee4de46238fce108a95669848&authType=XS2A&scope=DEDICATED_PISP",
"qrCodeUrl": "https://images.yapily.com/image/7384ad3b-5eb1-4304-9cfa-7aa6fcc5e0c7/1623318888?size=0"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Authorizations
Use HTTP Basic Authentication with your Application ID as username and Application Secret as password. Manage credentials in the Yapily Console. See Authentication for details.
Headers
Conditional. The IP address of the PSU.
See PSU identifiers to see if this header is required.
The sub-application ID to which event type is being subscribed to
Query Parameters
Optional. Used to obtain the raw request and response to and from the Institution.
Body
Mandatory. The payment pre authorisation request object defining the details of the payment and pre auth.
Mandatory. The reference to the Institution which identifies which institution the authorisation request is sent to.
"yapily-mock"
Mandatory. Defines the scope of the pre-authorisation request.
"AIS"
Mandatory. Details of the beneficiary [person or business].
Show child attributes
Show child attributes
Conditional. Details of the benefactor [person or business].
Show child attributes
Show child attributes
Mandatory. Monetary Amount.
Show child attributes
Show child attributes
Mandatory. The payment reference or description. Limited to a maximum of 18 characters long.
"Bill payment"
Conditional. The user-friendly reference to the User that will authorise the authorisation request. If a User with the specified applicationUserId exists, it will be used otherwise, a new User with the specified applicationUserId will be created and used. Either the userUuid or applicationUserId must be provided.
"user-234562290"
Extra parameters to be forwarded in the redirect back to the client after the user authorisation flow has been completed.
Optional. The server to redirect the user to after the user complete the authorisation at the Institution.
See Using a callback (Optional) for more information.
"https://display-parameters.com"
Optional. The server to redirect the user to after the user complete the authorisation at the Institution.
Show child attributes
Show child attributes
Conditional. Used to receive a oneTimeToken rather than a consentToken at the callback for additional security. This can only be used when the callback is set.
See Using a callback with an OTT (Optional) for more information.
false
Was this page helpful?