curl --request PUT \
--url https://api.yapily.com/payment-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'consent: <consent>' \
--data '
{
"applicationUserId": "string",
"institutionId": "n26",
"paymentRequest": {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
},
"amount": {
"amount": 1,
"currency": "EUR"
},
"reference": "Bill Payment",
"type": "DOMESTIC_PAYMENT",
"payee": {
"name": "Jane Doe",
"address": {
"country": "BE"
},
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
}
}
}
'import requests
url = "https://api.yapily.com/payment-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "n26",
"paymentRequest": {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
},
"amount": {
"amount": 1,
"currency": "EUR"
},
"reference": "Bill Payment",
"type": "DOMESTIC_PAYMENT",
"payee": {
"name": "Jane Doe",
"address": { "country": "BE" },
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
}
}
}
headers = {
"consent": "<consent>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
consent: '<consent>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
applicationUserId: 'string',
institutionId: 'n26',
paymentRequest: {
paymentIdempotencyId: '234g87t58tgeuo848wudjew489',
payer: {
name: 'John Doe',
accountIdentifications: [{type: 'IBAN', identification: 'DE12345678901234567890'}]
},
amount: {amount: 1, currency: 'EUR'},
reference: 'Bill Payment',
type: 'DOMESTIC_PAYMENT',
payee: {
name: 'Jane Doe',
address: {country: 'BE'},
accountIdentifications: [{type: 'IBAN', identification: 'BE12345678901234'}]
}
}
})
};
fetch('https://api.yapily.com/payment-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-auth-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'applicationUserId' => 'string',
'institutionId' => 'n26',
'paymentRequest' => [
'paymentIdempotencyId' => '234g87t58tgeuo848wudjew489',
'payer' => [
'name' => 'John Doe',
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'DE12345678901234567890'
]
]
],
'amount' => [
'amount' => 1,
'currency' => 'EUR'
],
'reference' => 'Bill Payment',
'type' => 'DOMESTIC_PAYMENT',
'payee' => [
'name' => 'Jane Doe',
'address' => [
'country' => 'BE'
],
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'BE12345678901234'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json;charset=UTF-8",
"consent: <consent>"
],
]);
$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-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("consent", "<consent>")
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.put("https://api.yapily.com/payment-auth-requests")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/payment-auth-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "54ec0645a5b444c4a70c61357e9ad887"
},
"data": {
"id": "53ff00d0-91dd-417d-880b-cdd7c50090ed",
"userUuid": "e2578545-27a4-4edf-983f-5d33c2d7b559",
"applicationUserId": "string",
"institutionId": "n26",
"state": "4399535ee4de46238fce108a95669848",
"status": "AWAITING_DECOUPLED_AUTHORIZATION",
"createdAt": "2021-06-10T09:54:46.669Z",
"featureScope": [
"INITIATE_PRE_AUTHORISATION",
"CREATE_DOMESTIC_SINGLE_PAYMENT",
"EXISTING_PAYMENTS_DETAILS"
],
"authorizedAt": "2021-06-10T09:55:22.359Z",
"institutionConsentId": "a9582f8e-08be-4cca-9f01-1ad3be96532d"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Update Payment Pre-authorisation
Used to continue the authorisation process and for any Institution that contains the INITIATE_PRE_AUTHORISATION feature and direct user to the login screen of their financial institution in order to give consent to initiate a payment. Feature: INITIATE_PRE_AUTHORISATION
curl --request PUT \
--url https://api.yapily.com/payment-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'consent: <consent>' \
--data '
{
"applicationUserId": "string",
"institutionId": "n26",
"paymentRequest": {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
},
"amount": {
"amount": 1,
"currency": "EUR"
},
"reference": "Bill Payment",
"type": "DOMESTIC_PAYMENT",
"payee": {
"name": "Jane Doe",
"address": {
"country": "BE"
},
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
}
}
}
'import requests
url = "https://api.yapily.com/payment-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "n26",
"paymentRequest": {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "IBAN",
"identification": "DE12345678901234567890"
}
]
},
"amount": {
"amount": 1,
"currency": "EUR"
},
"reference": "Bill Payment",
"type": "DOMESTIC_PAYMENT",
"payee": {
"name": "Jane Doe",
"address": { "country": "BE" },
"accountIdentifications": [
{
"type": "IBAN",
"identification": "BE12345678901234"
}
]
}
}
}
headers = {
"consent": "<consent>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
consent: '<consent>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
applicationUserId: 'string',
institutionId: 'n26',
paymentRequest: {
paymentIdempotencyId: '234g87t58tgeuo848wudjew489',
payer: {
name: 'John Doe',
accountIdentifications: [{type: 'IBAN', identification: 'DE12345678901234567890'}]
},
amount: {amount: 1, currency: 'EUR'},
reference: 'Bill Payment',
type: 'DOMESTIC_PAYMENT',
payee: {
name: 'Jane Doe',
address: {country: 'BE'},
accountIdentifications: [{type: 'IBAN', identification: 'BE12345678901234'}]
}
}
})
};
fetch('https://api.yapily.com/payment-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-auth-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'applicationUserId' => 'string',
'institutionId' => 'n26',
'paymentRequest' => [
'paymentIdempotencyId' => '234g87t58tgeuo848wudjew489',
'payer' => [
'name' => 'John Doe',
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'DE12345678901234567890'
]
]
],
'amount' => [
'amount' => 1,
'currency' => 'EUR'
],
'reference' => 'Bill Payment',
'type' => 'DOMESTIC_PAYMENT',
'payee' => [
'name' => 'Jane Doe',
'address' => [
'country' => 'BE'
],
'accountIdentifications' => [
[
'type' => 'IBAN',
'identification' => 'BE12345678901234'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json;charset=UTF-8",
"consent: <consent>"
],
]);
$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-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("consent", "<consent>")
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.put("https://api.yapily.com/payment-auth-requests")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/payment-auth-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"n26\",\n \"paymentRequest\": {\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"payer\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"DE12345678901234567890\"\n }\n ]\n },\n \"amount\": {\n \"amount\": 1,\n \"currency\": \"EUR\"\n },\n \"reference\": \"Bill Payment\",\n \"type\": \"DOMESTIC_PAYMENT\",\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"address\": {\n \"country\": \"BE\"\n },\n \"accountIdentifications\": [\n {\n \"type\": \"IBAN\",\n \"identification\": \"BE12345678901234\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "54ec0645a5b444c4a70c61357e9ad887"
},
"data": {
"id": "53ff00d0-91dd-417d-880b-cdd7c50090ed",
"userUuid": "e2578545-27a4-4edf-983f-5d33c2d7b559",
"applicationUserId": "string",
"institutionId": "n26",
"state": "4399535ee4de46238fce108a95669848",
"status": "AWAITING_DECOUPLED_AUTHORIZATION",
"createdAt": "2021-06-10T09:54:46.669Z",
"featureScope": [
"INITIATE_PRE_AUTHORISATION",
"CREATE_DOMESTIC_SINGLE_PAYMENT",
"EXISTING_PAYMENTS_DETAILS"
],
"authorizedAt": "2021-06-10T09:55:22.359Z",
"institutionConsentId": "a9582f8e-08be-4cca-9f01-1ad3be96532d"
}
}{
"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. Represents the user's login ID for the Institution to a personal account.
See PSU identifiers to see if this header is required.
Conditional. Represents the user's login ID for the Institution to a business account.
See PSU identifiers to see if this header is required.
Conditional. The IP address of the PSU.
See PSU identifiers to see if this header is required.
Body
The request body containing an PaymentAuthorisationRequest json payload
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"
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?