curl --request POST \
--url https://api.yapily.com/bulk-payment-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"callback": "https://display-parameters.com/",
"paymentRequest": {
"payments": [
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "d78fy48uh8f9odhde68dfi38di9",
"reference": "payment1",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 2,
"currency": "GBP"
},
"payee": {
"name": "Jane Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
],
"accountType": "BUSINESS_SAVING"
}
},
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "4279gdy8t63dg73gd8gx87738dg",
"reference": "payment2",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 5,
"currency": "GBP"
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
],
"accountType": "BUSINESS_SAVING"
}
}
]
}
}
'import requests
url = "https://api.yapily.com/bulk-payment-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"callback": "https://display-parameters.com/",
"paymentRequest": { "payments": [
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "d78fy48uh8f9odhde68dfi38di9",
"reference": "payment1",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 2,
"currency": "GBP"
},
"payee": {
"name": "Jane Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
],
"accountType": "BUSINESS_SAVING"
}
},
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "4279gdy8t63dg73gd8gx87738dg",
"reference": "payment2",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 5,
"currency": "GBP"
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
],
"accountType": "BUSINESS_SAVING"
}
}
] }
}
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: 'modelo-sandbox',
callback: 'https://display-parameters.com/',
paymentRequest: {
payments: [
{
type: 'DOMESTIC_PAYMENT',
paymentIdempotencyId: 'd78fy48uh8f9odhde68dfi38di9',
reference: 'payment1',
contextType: 'BILL_IN_ARREARS',
purposeCode: 'COMT',
amount: {amount: 2, currency: 'GBP'},
payee: {
name: 'Jane Doe',
accountIdentifications: [
{type: 'ACCOUNT_NUMBER', identification: '12345678'},
{type: 'SORT_CODE', identification: '123456'}
],
accountType: 'BUSINESS_SAVING'
}
},
{
type: 'DOMESTIC_PAYMENT',
paymentIdempotencyId: '4279gdy8t63dg73gd8gx87738dg',
reference: 'payment2',
contextType: 'BILL_IN_ARREARS',
purposeCode: 'COMT',
amount: {amount: 5, currency: 'GBP'},
payee: {
name: 'John Doe',
accountIdentifications: [
{type: 'ACCOUNT_NUMBER', identification: '87654321'},
{type: 'SORT_CODE', identification: '654321'}
],
accountType: 'BUSINESS_SAVING'
}
}
]
}
})
};
fetch('https://api.yapily.com/bulk-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/bulk-payment-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' => 'modelo-sandbox',
'callback' => 'https://display-parameters.com/',
'paymentRequest' => [
'payments' => [
[
'type' => 'DOMESTIC_PAYMENT',
'paymentIdempotencyId' => 'd78fy48uh8f9odhde68dfi38di9',
'reference' => 'payment1',
'contextType' => 'BILL_IN_ARREARS',
'purposeCode' => 'COMT',
'amount' => [
'amount' => 2,
'currency' => 'GBP'
],
'payee' => [
'name' => 'Jane Doe',
'accountIdentifications' => [
[
'type' => 'ACCOUNT_NUMBER',
'identification' => '12345678'
],
[
'type' => 'SORT_CODE',
'identification' => '123456'
]
],
'accountType' => 'BUSINESS_SAVING'
]
],
[
'type' => 'DOMESTIC_PAYMENT',
'paymentIdempotencyId' => '4279gdy8t63dg73gd8gx87738dg',
'reference' => 'payment2',
'contextType' => 'BILL_IN_ARREARS',
'purposeCode' => 'COMT',
'amount' => [
'amount' => 5,
'currency' => 'GBP'
],
'payee' => [
'name' => 'John Doe',
'accountIdentifications' => [
[
'type' => 'ACCOUNT_NUMBER',
'identification' => '87654321'
],
[
'type' => 'SORT_CODE',
'identification' => '654321'
]
],
'accountType' => 'BUSINESS_SAVING'
]
]
]
]
]),
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/bulk-payment-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\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/bulk-payment-auth-requests")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/bulk-payment-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\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "96169af01d394ad39658f17d53b49a5d"
},
"data": {
"id": "a2a9ec77-a479-4996-9896-4568e1968e7a",
"userUuid": "5350782b-60f3-489e-aae5-a24d8d679a07",
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"status": "AWAITING_AUTHORIZATION",
"createdAt": "2021-06-09T13:48:25.138Z",
"featureScope": [
"EXISTING_PAYMENTS_DETAILS",
"EXISTING_PAYMENT_INITIATION_DETAILS",
"CREATE_BULK_PAYMENT"
],
"state": "80052c03007f41d589f64377eef4d620",
"institutionConsentId": "sdp-6-25ff5bd8-d01c-422d-aa9e-8e68808bc899",
"authorisationUrl": "https://ob19-auth1-ui.o3bank.co.uk/auth?client_id=e7f6b95b-5f35-419b-b301-8b08bcd946de&response_type=code+id_token&state=80052c03007f41d589f64377eef4d620&nonce=80052c03007f41d589f64377eef4d620&scope=openid+payments&redirect_uri=https%3A%2F%2Fauth.yapily.com%2F&request=eyJraWQiOiJnRTRvU3VaZDl4TVpUNXZDdTNWYy1mdktNak0iLCJhbGciOiJQUzI1NiJ9.eyJhdWQiOiJodHRwczovL29iMTktYXV0aDEtdWkubzNiYW5rLmNvLnVrIiwic2NvcGUiOiJvcGVuaWQgcGF5bWVudHMiLCJpc3MiOiJlN2Y2Yjk1Yi01ZjM1LTQxOWItYjMwMS04YjA4YmNkOTQ2ZGUiLCJjbGllbnRfaWQiOiJlN2Y2Yjk1Yi01ZjM1LTQxOWItYjMwMS04YjA4YmNkOTQ2ZGUiLCJyZXNwb25zZV90eXBlIjoiY29kZSBpZF90b2tlbiIsInJlZGlyZWN0X3VyaSI6Imh0dHBzOi8vYXV0aC55YXBpbHkuY29tLyIsInN0YXRlIjoiODAwNTJjMDMwMDdmNDFkNTg5ZjY0Mzc3ZWVmNGQ2MjAiLCJjbGFpbXMiOnsiaWRfdG9rZW4iOnsiYWNyIjp7InZhbHVlIjoidXJuOm9wZW5iYW5raW5nOnBzZDI6c2NhIiwiZXNzZW50aWFsIjp0cnVlfSwib3BlbmJhbmtpbmdfaW50ZW50X2lkIjp7InZhbHVlIjoic2RwLTYtMjVmZjViZDgtZDAxYy00MjJkLWFhOWUtOGU2ODgwOGJjODk5IiwiZXNzZW50aWFsIjp0cnVlfX0sInVzZXJpbmZvIjp7Im9wZW5iYW5raW5nX2ludGVudF9pZCI6eyJ2YWx1ZSI6InNkcC02LTI1ZmY1YmQ4LWQwMWMtNDIyZC1hYTllLThlNjg4MDhiYzg5OSIsImVzc2VudGlhbCI6dHJ1ZX19fSwibm9uY2UiOiI4MDA1MmMwMzAwN2Y0MWQ1ODlmNjQzNzdlZWY0ZDYyMCIsImp0aSI6ImUxYjZmMWM4LTQ1ZTktNGM0NS05NGE0LWExMTY1Nzk2NjZiNiIsImlhdCI6MTYyMzI0NjUwNSwiZXhwIjoxNjIzMjQ4MzA1fQ.C5YkClHiDOWl1CKnmEY0gM_JizUuELp2-k7sDjsWV5T-mgTWviO-jM7iVfCf4MsU6batLSBmeUFLco1b3S8PTQkAzwM3laHIgbfDAb_6bYkSBTbPriyzKcC8xAwhX3VdvWtb9qqdrn9zXSmIIITBhJdMzk1cgIjyETD7WNPln839eGP1-w8iB8yDOJOkYGRHJ850mQY-lk61GegmKs5kaxtYPIhrG2gygIi3JsN-uQJ6YOl2-5pylTEcJbuwhFiyeePdqHZdabqW2BSA6lDKQbMV_Zow_zhSWoFFv6RZdXCQpt4TBRj1W7tzZQKin-MC-TpzaF1q07RpSy0NtlN85w",
"qrCodeUrl": "https://images.yapily.com/image/2bbb79b8-2c4a-4c8e-9132-0636879437da/1623246505?size=0"
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Create Bulk Payment Authorisation
Used to initiate the authorisation process and direct users to the login screen of their financial Institution in order to give their consent for a bulk payment.
Feature: INITIATE_BULK_PAYMENT
curl --request POST \
--url https://api.yapily.com/bulk-payment-auth-requests \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"callback": "https://display-parameters.com/",
"paymentRequest": {
"payments": [
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "d78fy48uh8f9odhde68dfi38di9",
"reference": "payment1",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 2,
"currency": "GBP"
},
"payee": {
"name": "Jane Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
],
"accountType": "BUSINESS_SAVING"
}
},
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "4279gdy8t63dg73gd8gx87738dg",
"reference": "payment2",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 5,
"currency": "GBP"
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
],
"accountType": "BUSINESS_SAVING"
}
}
]
}
}
'import requests
url = "https://api.yapily.com/bulk-payment-auth-requests"
payload = {
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"callback": "https://display-parameters.com/",
"paymentRequest": { "payments": [
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "d78fy48uh8f9odhde68dfi38di9",
"reference": "payment1",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 2,
"currency": "GBP"
},
"payee": {
"name": "Jane Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
],
"accountType": "BUSINESS_SAVING"
}
},
{
"type": "DOMESTIC_PAYMENT",
"paymentIdempotencyId": "4279gdy8t63dg73gd8gx87738dg",
"reference": "payment2",
"contextType": "BILL_IN_ARREARS",
"purposeCode": "COMT",
"amount": {
"amount": 5,
"currency": "GBP"
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
],
"accountType": "BUSINESS_SAVING"
}
}
] }
}
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: 'modelo-sandbox',
callback: 'https://display-parameters.com/',
paymentRequest: {
payments: [
{
type: 'DOMESTIC_PAYMENT',
paymentIdempotencyId: 'd78fy48uh8f9odhde68dfi38di9',
reference: 'payment1',
contextType: 'BILL_IN_ARREARS',
purposeCode: 'COMT',
amount: {amount: 2, currency: 'GBP'},
payee: {
name: 'Jane Doe',
accountIdentifications: [
{type: 'ACCOUNT_NUMBER', identification: '12345678'},
{type: 'SORT_CODE', identification: '123456'}
],
accountType: 'BUSINESS_SAVING'
}
},
{
type: 'DOMESTIC_PAYMENT',
paymentIdempotencyId: '4279gdy8t63dg73gd8gx87738dg',
reference: 'payment2',
contextType: 'BILL_IN_ARREARS',
purposeCode: 'COMT',
amount: {amount: 5, currency: 'GBP'},
payee: {
name: 'John Doe',
accountIdentifications: [
{type: 'ACCOUNT_NUMBER', identification: '87654321'},
{type: 'SORT_CODE', identification: '654321'}
],
accountType: 'BUSINESS_SAVING'
}
}
]
}
})
};
fetch('https://api.yapily.com/bulk-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/bulk-payment-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' => 'modelo-sandbox',
'callback' => 'https://display-parameters.com/',
'paymentRequest' => [
'payments' => [
[
'type' => 'DOMESTIC_PAYMENT',
'paymentIdempotencyId' => 'd78fy48uh8f9odhde68dfi38di9',
'reference' => 'payment1',
'contextType' => 'BILL_IN_ARREARS',
'purposeCode' => 'COMT',
'amount' => [
'amount' => 2,
'currency' => 'GBP'
],
'payee' => [
'name' => 'Jane Doe',
'accountIdentifications' => [
[
'type' => 'ACCOUNT_NUMBER',
'identification' => '12345678'
],
[
'type' => 'SORT_CODE',
'identification' => '123456'
]
],
'accountType' => 'BUSINESS_SAVING'
]
],
[
'type' => 'DOMESTIC_PAYMENT',
'paymentIdempotencyId' => '4279gdy8t63dg73gd8gx87738dg',
'reference' => 'payment2',
'contextType' => 'BILL_IN_ARREARS',
'purposeCode' => 'COMT',
'amount' => [
'amount' => 5,
'currency' => 'GBP'
],
'payee' => [
'name' => 'John Doe',
'accountIdentifications' => [
[
'type' => 'ACCOUNT_NUMBER',
'identification' => '87654321'
],
[
'type' => 'SORT_CODE',
'identification' => '654321'
]
],
'accountType' => 'BUSINESS_SAVING'
]
]
]
]
]),
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/bulk-payment-auth-requests"
payload := strings.NewReader("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\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/bulk-payment-auth-requests")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"applicationUserId\": \"string\",\n \"institutionId\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/bulk-payment-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\": \"modelo-sandbox\",\n \"callback\": \"https://display-parameters.com/\",\n \"paymentRequest\": {\n \"payments\": [\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"d78fy48uh8f9odhde68dfi38di9\",\n \"reference\": \"payment1\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 2,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"Jane Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"12345678\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"123456\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n },\n {\n \"type\": \"DOMESTIC_PAYMENT\",\n \"paymentIdempotencyId\": \"4279gdy8t63dg73gd8gx87738dg\",\n \"reference\": \"payment2\",\n \"contextType\": \"BILL_IN_ARREARS\",\n \"purposeCode\": \"COMT\",\n \"amount\": {\n \"amount\": 5,\n \"currency\": \"GBP\"\n },\n \"payee\": {\n \"name\": \"John Doe\",\n \"accountIdentifications\": [\n {\n \"type\": \"ACCOUNT_NUMBER\",\n \"identification\": \"87654321\"\n },\n {\n \"type\": \"SORT_CODE\",\n \"identification\": \"654321\"\n }\n ],\n \"accountType\": \"BUSINESS_SAVING\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "96169af01d394ad39658f17d53b49a5d"
},
"data": {
"id": "a2a9ec77-a479-4996-9896-4568e1968e7a",
"userUuid": "5350782b-60f3-489e-aae5-a24d8d679a07",
"applicationUserId": "string",
"institutionId": "modelo-sandbox",
"status": "AWAITING_AUTHORIZATION",
"createdAt": "2021-06-09T13:48:25.138Z",
"featureScope": [
"EXISTING_PAYMENTS_DETAILS",
"EXISTING_PAYMENT_INITIATION_DETAILS",
"CREATE_BULK_PAYMENT"
],
"state": "80052c03007f41d589f64377eef4d620",
"institutionConsentId": "sdp-6-25ff5bd8-d01c-422d-aa9e-8e68808bc899",
"authorisationUrl": "https://ob19-auth1-ui.o3bank.co.uk/auth?client_id=e7f6b95b-5f35-419b-b301-8b08bcd946de&response_type=code+id_token&state=80052c03007f41d589f64377eef4d620&nonce=80052c03007f41d589f64377eef4d620&scope=openid+payments&redirect_uri=https%3A%2F%2Fauth.yapily.com%2F&request=eyJraWQiOiJnRTRvU3VaZDl4TVpUNXZDdTNWYy1mdktNak0iLCJhbGciOiJQUzI1NiJ9.eyJhdWQiOiJodHRwczovL29iMTktYXV0aDEtdWkubzNiYW5rLmNvLnVrIiwic2NvcGUiOiJvcGVuaWQgcGF5bWVudHMiLCJpc3MiOiJlN2Y2Yjk1Yi01ZjM1LTQxOWItYjMwMS04YjA4YmNkOTQ2ZGUiLCJjbGllbnRfaWQiOiJlN2Y2Yjk1Yi01ZjM1LTQxOWItYjMwMS04YjA4YmNkOTQ2ZGUiLCJyZXNwb25zZV90eXBlIjoiY29kZSBpZF90b2tlbiIsInJlZGlyZWN0X3VyaSI6Imh0dHBzOi8vYXV0aC55YXBpbHkuY29tLyIsInN0YXRlIjoiODAwNTJjMDMwMDdmNDFkNTg5ZjY0Mzc3ZWVmNGQ2MjAiLCJjbGFpbXMiOnsiaWRfdG9rZW4iOnsiYWNyIjp7InZhbHVlIjoidXJuOm9wZW5iYW5raW5nOnBzZDI6c2NhIiwiZXNzZW50aWFsIjp0cnVlfSwib3BlbmJhbmtpbmdfaW50ZW50X2lkIjp7InZhbHVlIjoic2RwLTYtMjVmZjViZDgtZDAxYy00MjJkLWFhOWUtOGU2ODgwOGJjODk5IiwiZXNzZW50aWFsIjp0cnVlfX0sInVzZXJpbmZvIjp7Im9wZW5iYW5raW5nX2ludGVudF9pZCI6eyJ2YWx1ZSI6InNkcC02LTI1ZmY1YmQ4LWQwMWMtNDIyZC1hYTllLThlNjg4MDhiYzg5OSIsImVzc2VudGlhbCI6dHJ1ZX19fSwibm9uY2UiOiI4MDA1MmMwMzAwN2Y0MWQ1ODlmNjQzNzdlZWY0ZDYyMCIsImp0aSI6ImUxYjZmMWM4LTQ1ZTktNGM0NS05NGE0LWExMTY1Nzk2NjZiNiIsImlhdCI6MTYyMzI0NjUwNSwiZXhwIjoxNjIzMjQ4MzA1fQ.C5YkClHiDOWl1CKnmEY0gM_JizUuELp2-k7sDjsWV5T-mgTWviO-jM7iVfCf4MsU6batLSBmeUFLco1b3S8PTQkAzwM3laHIgbfDAb_6bYkSBTbPriyzKcC8xAwhX3VdvWtb9qqdrn9zXSmIIITBhJdMzk1cgIjyETD7WNPln839eGP1-w8iB8yDOJOkYGRHJ850mQY-lk61GegmKs5kaxtYPIhrG2gygIi3JsN-uQJ6YOl2-5pylTEcJbuwhFiyeePdqHZdabqW2BSA6lDKQbMV_Zow_zhSWoFFv6RZdXCQpt4TBRj1W7tzZQKin-MC-TpzaF1q07RpSy0NtlN85w",
"qrCodeUrl": "https://images.yapily.com/image/2bbb79b8-2c4a-4c8e-9132-0636879437da/1623246505?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. 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
Mandatory. The reference to the Institution which identifies which institution the authorisation request is sent to.
"yapily-mock"
Conditional. The reference to the User that will authorise the authorisation request using the Yapily generated UUID. Either the userUuid or applicationUserId must be provided.
"e006a012-c306-4355-a6a1-99bf69ae5171"
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 the TPP may want to get forwarded in the callback request after the PSU redirect.
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
The payment request object defining the details of the bulk payment
Show child attributes
Show child attributes
Was this page helpful?