Skip to content

VRP Payments Periodic Limit Breach simulator for TPP testing

Dan Badham edited this page Jun 14, 2022 · 7 revisions

Overview

VRP payments support Periodic Limits whereby a configurable maximum amount of money can be transferred within a given time period, e.g. there could be a limit of £200 per calendar month. When a payment is made that would result in more than the configured amount of money being transferred within a certain time period, then an error will be returned and the payment will not be done.

For testing purposes, TPPs would like to be able to exercise the Periodic Limit breach scenario. As the sandbox does not implement real bank logic, then a simulator is provided to achieve this.

This functionality is available in OBRI version: 4.7.0+ and open-banking api v3.1.8+

See the following issue for a full description: https://github.com/OpenBankingToolkit/openbanking-toolkit/issues/50

How to simulate a Periodic Limit breach

A custom HTTP header: x-vrp-limit-breach-response-simulation has been added to the POST /domestic-vrps API endpoint. If this header is supplied, then the simulator functionality will be invoked, this header should only be supplied when testing.

The header supports string values with the following pattern: "$ControlParameters.PeriodicLimits.PeriodType-$ControlParameters.PeriodicLimits.PeriodAlignment", examples: "Month-Calendar", "Year-Consent"

The header value must match one of the ControlParameters.PeriodicLimits objects specified on the consent.

  1. Complete the VRP Consent flow as normal, specifying one or more Periodic Limits in the Control Parameters
  2. Submit the payment to domestic-vrps endpoint suppling the x-vrp-limit-breach-response-simulation header with a value which matches a PeriodicLimit in the Consent
  3. Process the Error response from the API, a HTTP 400 will be returned with a json body containing the error code UK.OBIE.Rules.FailsControlParameters and a message

Example response

<-- 400 https://example-server/open-banking/v3.1.9/pisp/domestic-vrps
Response : Bad Request
Length : -1
Body : {
   "Code":"OBRI.Request.Filter",
   "Id":"39d7636c9ff207e0",
   "Message":"An error happened when filtering your request before accessing the resource",
   "Errors":[
      {
         "ErrorCode":"UK.OBIE.Rules.FailsControlParameters",
         "Message":"Unable to complete payment due to payment limit breach, periodic limit of '10.01' 'GBP' for period 'Month' 'Calendar' has been breached",
         "Url":"https://example-server/errors#UK.OBIE.Rules.FailsControlParameters"
      }
   ]
}