curl --request POST \
--url https://api.yapily.com/variable-recurring-payments/payments \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'consent: <consent>' \
--data '
{
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"psuAuthenticationMethod": "SCA_NOT_REQUIRED",
"psuInteractionType": "PSU_PRESENT",
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
}
'import requests
url = "https://api.yapily.com/variable-recurring-payments/payments"
payload = {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"psuAuthenticationMethod": "SCA_NOT_REQUIRED",
"psuInteractionType": "PSU_PRESENT",
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
}
headers = {
"consent": "<consent>",
"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: {
consent: '<consent>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
paymentIdempotencyId: '234g87t58tgeuo848wudjew489',
psuAuthenticationMethod: 'SCA_NOT_REQUIRED',
psuInteractionType: 'PSU_PRESENT',
paymentAmount: {amount: 10, currency: 'GBP'}
})
};
fetch('https://api.yapily.com/variable-recurring-payments/payments', 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/variable-recurring-payments/payments",
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([
'paymentIdempotencyId' => '234g87t58tgeuo848wudjew489',
'psuAuthenticationMethod' => 'SCA_NOT_REQUIRED',
'psuInteractionType' => 'PSU_PRESENT',
'paymentAmount' => [
'amount' => 10,
'currency' => 'GBP'
]
]),
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/variable-recurring-payments/payments"
payload := strings.NewReader("{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.yapily.com/variable-recurring-payments/payments")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/variable-recurring-payments/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "0f14e900011b445fa6b6c2c4272d7321"
},
"data": {
"id": "a9582f8e-08be-4cca-9f01-1ad3be96532d",
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"institutionConsentId": "PF23232222DD",
"status": "COMPLETED",
"statusDetails": {
"status": "COMPLETED",
"isoStatus": {
"code": "ACCP",
"name": "AcceptedCustomerProfile"
}
},
"initiationDetails": {
"reference": "Own Account Sweeping",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
]
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
]
}
},
"submissionDetails": {
"reference": "Own Account Sweeping",
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
]
},
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
},
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
]
},
"refundAccount": {
"accountIdentifications": [
{
"identification": "400400",
"type": "SORT_CODE"
},
{
"identification": "99999999",
"type": "ACCOUNT_NUMBER"
}
],
"name": "Refund Account"
},
"expectedSettlementTime": "2022-03-02T12:00:00.000Z",
"expectedExecutionTime": "2022-03-02T12:00:00.000Z"
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 401,
"status": "UNAUTHORIZED",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "CREDENTIALS",
"code": "CREDENTIALS_MISSING",
"message": "Authentication header not present"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 400,
"status": "BAD_REQUEST",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "BAD_REQUEST",
"code": "BAD_REQUEST",
"message": "The server could not understand the request due to invalid syntax"
}
]
}
}Create VRP Payment
Submit payment on the VRP consent.
Required feature: CREATE_DOMESTIC_VARIABLE_RECURRING_PAYMENT_SWEEPING or CREATE_DOMESTIC_VARIABLE_RECURRING_PAYMENT_COMMERCIAL
curl --request POST \
--url https://api.yapily.com/variable-recurring-payments/payments \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'consent: <consent>' \
--data '
{
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"psuAuthenticationMethod": "SCA_NOT_REQUIRED",
"psuInteractionType": "PSU_PRESENT",
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
}
'import requests
url = "https://api.yapily.com/variable-recurring-payments/payments"
payload = {
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"psuAuthenticationMethod": "SCA_NOT_REQUIRED",
"psuInteractionType": "PSU_PRESENT",
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
}
headers = {
"consent": "<consent>",
"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: {
consent: '<consent>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
paymentIdempotencyId: '234g87t58tgeuo848wudjew489',
psuAuthenticationMethod: 'SCA_NOT_REQUIRED',
psuInteractionType: 'PSU_PRESENT',
paymentAmount: {amount: 10, currency: 'GBP'}
})
};
fetch('https://api.yapily.com/variable-recurring-payments/payments', 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/variable-recurring-payments/payments",
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([
'paymentIdempotencyId' => '234g87t58tgeuo848wudjew489',
'psuAuthenticationMethod' => 'SCA_NOT_REQUIRED',
'psuInteractionType' => 'PSU_PRESENT',
'paymentAmount' => [
'amount' => 10,
'currency' => 'GBP'
]
]),
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/variable-recurring-payments/payments"
payload := strings.NewReader("{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.yapily.com/variable-recurring-payments/payments")
.header("consent", "<consent>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/variable-recurring-payments/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["consent"] = '<consent>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"paymentIdempotencyId\": \"234g87t58tgeuo848wudjew489\",\n \"psuAuthenticationMethod\": \"SCA_NOT_REQUIRED\",\n \"psuInteractionType\": \"PSU_PRESENT\",\n \"paymentAmount\": {\n \"amount\": 10,\n \"currency\": \"GBP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "0f14e900011b445fa6b6c2c4272d7321"
},
"data": {
"id": "a9582f8e-08be-4cca-9f01-1ad3be96532d",
"paymentIdempotencyId": "234g87t58tgeuo848wudjew489",
"institutionConsentId": "PF23232222DD",
"status": "COMPLETED",
"statusDetails": {
"status": "COMPLETED",
"isoStatus": {
"code": "ACCP",
"name": "AcceptedCustomerProfile"
}
},
"initiationDetails": {
"reference": "Own Account Sweeping",
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
]
},
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
]
}
},
"submissionDetails": {
"reference": "Own Account Sweeping",
"payee": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "12345678"
},
{
"type": "SORT_CODE",
"identification": "123456"
}
]
},
"paymentAmount": {
"amount": 10,
"currency": "GBP"
}
},
"payer": {
"name": "John Doe",
"accountIdentifications": [
{
"type": "ACCOUNT_NUMBER",
"identification": "87654321"
},
{
"type": "SORT_CODE",
"identification": "654321"
}
]
},
"refundAccount": {
"accountIdentifications": [
{
"identification": "400400",
"type": "SORT_CODE"
},
{
"identification": "99999999",
"type": "ACCOUNT_NUMBER"
}
],
"name": "Refund Account"
},
"expectedSettlementTime": "2022-03-02T12:00:00.000Z",
"expectedExecutionTime": "2022-03-02T12:00:00.000Z"
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 401,
"status": "UNAUTHORIZED",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "CREDENTIALS",
"code": "CREDENTIALS_MISSING",
"message": "Authentication header not present"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 400,
"status": "BAD_REQUEST",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "BAD_REQUEST",
"code": "BAD_REQUEST",
"message": "The server could not understand the request due to invalid syntax"
}
]
}
}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
The user's VRP Consent Token
Body
Mandatory. The payment request object defining the details of the payment for execution under the Variable Recurring Payment consent.
Mandatory. A unique identifier for the payment.
This can be any alpha-numeric string but is limited to a maximum of 35 characters.
Mandatory. Monetary Amount.
Show child attributes
Show child attributes
Conditional. This value is mandatory for Commercial VRP payments. It is one of PSU_PRESENT (ie. the PSU oversees the payment) or PSU_NOT_PRESENT (eg. the payment is async).
Was this page helpful?