Variable Recurring Payments
Note: Variable Recurring Payments feature is only available to approved integrators with the VRP Sweeping
upgrade. If you're interested in trying it out - please contact support.
Variable Recurring Payments (VRPs) are a powerful new capability for Open Banking in the UK. With VRPs, you are able to create a single consent with a customer that enables you to charge multiple real-time payments within agreed parameters. VRPs enable innovation in payment experiences and the creation of new types of financial services.
VRPs vs Direct Debit
There is a fundamental difference in these mechanisms, Variable Recurring Payments are ‘push’ payments, initiated by the payer (the customer) while Direct Debits are ‘pull’ payments, initiated by the payee (a business) to the payer.
The OBIE is yet to mandate VRP as a direct replacement for DirectDebit, but for many use cases, VRP will be a more flexible, faster, and more secure alternative to DD.
What are the key benefits of VRPs?
Secure Payers use banking app/online banking for providing consent so as to secure as that.
Fast Confirmation can be provided within seconds. While funds are also transferred within seconds, due to GC being in the flow of funds, we will pay out the next business day i.e. D+1
No Fraud/Chargeback Risk
Slick user experience As payer uses a banking app (or online banking) to approve the transaction. It could be a very slick, friction-free payments experience. Payers can also review and cancel any mandates directly from their banking app, which gives them a lot of control on their recurring payments
A note on definitions: the OBIE uses the term “consent” to refer to the contract between the GoCardless customer and the end-customer. This concept matches that of the “mandate” so, for consistency, we use this term in the API and documentation instead. Please be aware that the terms are synonymous and that the end-customer will see the term “consent” in the payment flow.
Goal - Create a Variable Recurring Payments (VRP) mandate
Engineering complexity - Easy
Time taken - 15 minutes
The mandate (the OBIE refers to this as “consent”) is the agreement that you create with a customer and use to create future payments against. Most integrators will use Billing Requests to create a mandate alongside a new customer, so we’ll use that as our example. To set up a mandate, use the mandate_request
field when creating your Billing Request.
Please keep in mind that the requirements below should be met to create a VRPs mandate successfully:
the scheme is stated as
faster_payments
the
sweeping
attribute is set totrue
the
constraints
object is passed
Sweeping
This attribute is required to create a Variable Recurring Payment mandate that will be used solely for moving (or sweeping) money from one of the payer's accounts to another of the payer's accounts.
If this value is not set, we assume the billing request was created for a more generalised variable recurring payment use-case that we do not currently support, resulting in a validation error.
Constraints
constraints specify the limits on recurring payments. We can continue to take payments without the payer needing to provide consent every time as long as they are within the constraints stated during the set up of the VRP mandate.
You can set the following parameters:
start_date
- the date from which the consent will be valid. It will be shown to a payer to confirm and hence should be considered in the payer timezone. This date cannot be older than the date when the payer authorises the consent. Therefore if you want to specify it, make sure that it is not in the past and that the payer has enough time to complete the flow before the date will come.end_date
- the date after which we will not be able to collect payments, as the consent stops being valid. It will be shown to a payer to confirm and hence should be considered in the payer timezone. This date cannot be in the past or older than the start date.max_amount_per_payment
- maximum amount that can be charged for a single payment.periodic_limits
- frequency configurationperiod
- repeating time frame presented as "year", "month", "week" or "day".max_total_amount
- maximum total amount that can be charged for all payments in the period.max_payments
- maximum amount of payments that can be taken within a periodalignment
- Specifies whether the period starts when the mandate is created or lines up with a calendar date. When the period alignment is calendar based, the first payment is pro-rated to the number of remaining days from the start of the period. By default, this is set to mandatecreation_date
.
Use the Create a Billing Request endpoint:
1POST https://api.gocardless.com/billing_requests HTTP/1.1
2{
3 "billing_requests": {
4 "mandate_request": {
5 "scheme": "faster_payments",
6 "sweeping": true,
7 "constraints": {
8 "start_date": "2030-06-27",
9 "max_amount_per_payment": 500,
10 "periodic_limits": [{
11 "period": "month",
12 "max_total_amount": 10000,
13 "max_payments": 2,
14 "alignment": "creation_date"
15 }]
16 }
17 }
18 }
19}
You’ll receive a full Billing Request object, including things like actions and resources.
It will look like this:
1{
2 "billing_requests": {
3 "id": "BR123",
4 "status": "pending",
5 "mandate_request": {
6 "currency": "GBP",
7 "scheme": "faster_payments",
8 },
9 "payment_request": null,
10 "metadata": null,
11 "links": {
12 "customer": "CU123",
13 "customer_billing_detail": "CBD123",
14 "creditor": "CR123",
15 "organisation": "OR123",
16 "mandate_request": "MRQ123"
17 },
18 "creditor_name": "Hotel Park Grand",
19 "actions": [
20 {
21 "type": "collect_customer_details",
22 "required": true,
23 "status": "pending",
24 },
25 {
26 "type": "collect_bank_account",
27 "required": true,
28 "status": "pending"
29 },
30 {
31 "type": "bank_authorisation",
32 "required": true,
33 "status": "pending",
34 }
35 ],
36
37 }
38}
The Billing Request is currently pending
, meaning we need to complete the outstanding actions before it can be fulfilled. We can use Billing Request Flows to generate a checkout flow that guides the payer through these actions.
Goal - Create a Billing Request Flow that can be used for your customer to authorise payments
Engineering complexity - Easy
Time taken - 15 minutes
Billing Request Flows can be created against Billing Requests, and provide an entry into a hosted GoCardless flow that completes whatever actions remain against the request.
Create a Billing Request Flow to retrieve a link that can be provided to your customer to complete the request:
1$client = new \GoCardlessPro\Client(array(
2 'access_token' => 'your_access_token_here',
3 'environment' => \GoCardlessPro\Environment::SANDBOX
4));
5
6$client->billingRequestFlows()->create([
7 "params" => [
8 "redirect_uri" => "https://my-company.com/landing",
9 "exit_uri" => "https://my-company.com/exit",
10 "links" => [
11 "billing_request" => "BRQ000010NMDMH2"
12 ]
13 ]
14]);
This returns a new flow, which has an authorisation_url
you should send to your customer:
1{
2 "billing_request_flows": {
3 "authorisation_url": "https://pay.gocardless.com/billing/static/flow?id=<brf_id>",
4 "lock_customer_details": false,
5 "lock_bank_account": false,
6 "auto_fulfil": true,
7 "created_at": "2021-03-30T16:23:10.679Z",
8 "expires_at": "2021-04-06T16:23:10.679Z",
9 "redirect_uri": "https://my-company.com/completed",
10 "links": {
11 "billing_request": "BRQ123"
12 }
13 }
14}
15
Share your authorisation link from the response in Step 02, via a button on your website, SMS, email, or any other way you like.
Preview what your customer will see by following the steps below.
Goal - Retain your customers with an Exit URI
Engineering complexity - Easy
Time taken - 5 minutes
Some customers may not be able to authorise the VRP mandate through the Billing Request Flow. Their bank may not support VRP yet, for instance.
To retain these customers and let them pay another way, you may pass an Exit URI which will send them wherever you choose in order to complete the transaction. It’s as simple as providing the address you’d like us to return the customer to.
Provide an Exit URI when creating the Billing Request Flow
You may pass a exit_uri
when creating the Billing Request Flow, the same way you pass the redirect_uri
.
Note: We recommend that you return customers to your checkout page, at the point of choosing a payment method.
1$client = new \GoCardlessPro\Client(array(
2 'access_token' => 'your_access_token_here',
3 'environment' => \GoCardlessPro\Environment::SANDBOX
4));
5
6$client->billingRequestFlows()->create([
7 "params" => [
8 "redirect_uri" => "https://my-company.com/landing",
9 "exit_uri" => "https://my-company.com/exit",
10 "links" => [
11 "billing_request" => "BRQ000010NMDMH2"
12 ]
13 ]
14]);
This returns a new flow which includes the exit_uri being passed:
1{
2 "billing_request_flows": {
3 "authorisation_url": "https://pay.gocardless.com/billing/static/flow?id=<brf_id>",
4 "lock_customer_details": false,
5 "lock_bank_account": false,
6 "auto_fulfil": true,
7 "created_at": "2021-03-30T16:23:10.679Z",
8 "expires_at": "2021-04-06T16:23:10.679Z",
9 "redirect_uri": "https://my-company.com/completed",
10 "links": {
11 "billing_request": "BRQ123"
12 }
13 }
14}
15
Customers will be sent to this URI when they click on the Exit URI in the Billing Request Flow.
Customer uses the Exit URL to return to your checkout
The Exit URL is shown if the customer’s bank isn’t supported for VRP.
If you are creating a new mandate or real-time payment for an existing customer, you may let the customer skip some steps.
If you’ve seen this customer before, you may specify the customer ID in links.customer
field of the Billing Request. This will result in the CollectCustomerDetails page being skipped. The user may be allowed to edit these details unless the customer has been locked (see locking components below).
A Bank account already exists- in this case, we do not show the CollectBankAccount page however the user may be allowed to create a new bank account and use that for the payment unless the bank account has been locked (see locking components)
Existing customers or banks can be attached to the Billing Request when it is created, an example of this might be when creating a “top-up” single payment for a customer you already have a relationship with.
Along with knowing the customer's details and the bank account you may wish to “lock” the request to only allow the customer to use those details. This allows you to ensure the payment is taken using details you have already collected for this customer in your own systems.
You can lock the customer, the bank account or both. This is done when creating the Billing Request Flow by setting lock_customer_details
or lock_bank_account
to true.
If a linked resource is locked the following happens:
Customer locked - The CollectCustomerDetails page is not shown and the customer cannot open them for editing
Bank account locked - The CollectBankAccount page is not shown and the customer cannot add another bank account to use instead
If both are locked then we skip almost every page and go directly to the confirmation page within the BankHandoff component. All the payer needs to do is confirm and possibly authenticate with the bank if it is required.
For mandate only requests, you may also "lock" the currency and scheme that the customer pays in. By default, mandate only requests have the currency/scheme "unlocked" so that the customer can set up their mandate in any of your available schemes. If you lock the currency, however, they will only be able to pay with the scheme you specified when creating the Billing Request. This can be useful if you only want to allow a customer to pay in one specific scheme.
This can be achieved by setting lock_currency
to true on the Billing Request Flow. In this case a currency selector will not show in the payment page UI for the payer, and they will be unable to change currency.
What the customer will see
The customer provides their personal details on the first screen.
This screen is skipped if the details already exist, or the customer details have been locked
The customer selects their institution in order to complete this step.
This screen is skipped if the details already exist or the bank account is locked.
The customer has provided enough information for the transaction to be initiated with their bank. They are prompted to complete the process in their banking application. Depending on the bank they are with, they may also get a push notification to their device or an SMS.
Go to their bank to complete the authorisation. Customers can use the QR code to jump directly into their mobile banking app (this is the best UX in most cases) or opt to continue on their desktop.
Once the payer has completed the authorisation process, there is a confirmation page. All the required actions have been completed and the Billing Request is fulfilled.
Done!
The VRP consent has now been created and is ready to create payments against. The Billing Request is fulfilled, and cannot be modified.
What’s next?
Responding to Billing Requests events
Get started
First instant payment with mandate Direct Debit set up
For partners
Go to Partner PortalTo learn more about technical and UX requirements