Skip to main content
Create VRP Consent
curl --request POST \
  --url https://api.yapily.com/hosted/vrp/consent-requests \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --header 'sub-application: <sub-application>' \
  --data '
{
  "applicationUserId": "45cf7ffe-6350-11ee-8c99-0242ac120002",
  "institutionIdentifiers": {
    "institutionId": "modelo-sandbox",
    "institutionCountryCode": "GB"
  },
  "userSettings": {
    "language": "en",
    "location": "GB"
  },
  "redirectUrl": "https://tpp-application.com",
  "vrpSetup": {
    "payee": {
      "name": "Merchant Doe",
      "accountIdentifications": [
        {
          "identification": "401016",
          "type": "SORT_CODE"
        },
        {
          "identification": "71518920",
          "type": "ACCOUNT_NUMBER"
        }
      ]
    },
    "reference": "Test Payment",
    "limits": {
      "periodicLimits": [
        {
          "maxAmount": {
            "amount": 100,
            "currency": "GBP"
          },
          "frequency": "MONTHLY",
          "alignment": "CALENDAR"
        }
      ],
      "maxAmountPerPayment": {
        "amount": 10,
        "currency": "GBP"
      }
    },
    "validFrom": "2023-10-04T16:41:17.870Z",
    "validTo": "2024-10-04T16:41:17.870Z",
    "recurringPaymentCategory": "ONGOING",
    "risk": {
      "contextType": "ECOMMERCE_MERCHANT"
    }
  }
}
'
{
  "meta": {
    "tracingId": "2dbfd85b4f2940c6a206e96dd90e52d0"
  },
  "data": {
    "id": "ad4bfe58-6352-11ee-8c99-0242ac120002",
    "applicationUserId": "45cf7ffe-6350-11ee-8c99-0242ac120002",
    "applicationId": "ea4cdf01ee-278f-4e3e-8b30-695515aa4cdf01d64",
    "institutionIdentifiers": {
      "institutionId": "modelo-sandbox",
      "institutionCountryCode": "GB"
    },
    "userSettings": {
      "language": "en",
      "location": "GB"
    },
    "redirectUrl": "https://tpp-application.com",
    "vrpSetup": {
      "payee": {
        "name": "Merchant Doe",
        "accountIdentifications": [
          {
            "identification": "401016",
            "type": "SORT_CODE"
          },
          {
            "identification": "71518920",
            "type": "ACCOUNT_NUMBER"
          }
        ]
      },
      "reference": "Test Payment",
      "limits": {
        "periodicLimits": [
          {
            "maxAmount": {
              "amount": 100,
              "currency": "GBP"
            },
            "frequency": "MONTHLY",
            "alignment": "CALENDAR"
          }
        ],
        "maxAmountPerPayment": {
          "amount": 10,
          "currency": "GBP"
        }
      },
      "validFrom": "2023-10-04T16:41:17.870Z",
      "validTo": "2024-10-04T16:41:17.870Z",
      "risk": {
        "contextType": "ECOMMERCE_MERCHANT"
      }
    },
    "hostedUrl": "https://payments.yapily.com/vrp?authToken=eyJra&applicationId=e5515aee-278f-4e3e-8b30-69a4cdf01d64",
    "authToken": "eyJraWQiOiIwNmViZTQ1Yy1OiJFUzI1NiJ9.eyJhdWQiOiJwcm9kdWN0aW9uIiwic3ViIjoiZTU1MTVhZWUtMjc4Zi00ZTNlLThiMzAtNjlhNGNkZjAxZDY0Iiwib3JnIjoiYTUwZmEwNWUtNWIwYy00MGIxLTk0NWUtOTcxM2JkOGQzODk4IiwiY29uc2VudFJlcXVlc3RJZCI6IjdkMmMzZjU5LTU3NDgtNDhlNS1hODdjLWVkZmRkODJiMzQxZCIsImlzcyI6Imhvc3RlZC12cjgwMDE2NCwiaWF0IjoxNzA2Nzk5NTY0LCJqdGkiOiJjMTFkNTBkNy0wMjkxLTRhNTktYmFhNy1jZDhhYWIzMmYzOWIifQ.xa38HzD6phhFiR069E9nMrzvQ9GCmNZMQ",
    "createdAt": "2024-02-01T14:59:25.007193Z"
  }
}

Authorizations

Authorization
string
header
required

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

sub-application
string
required

Mandatory. The unique identifier of the sub application the request is being submitted on behalf of (e.g. an underlying merchant)

Body

application/json;charset=UTF-8
institutionIdentifiers
object
required

Specifies the institution requirements for making the payment. Skips the bank selection screen in payment flow if the institutionId and institutionCountryCode are provided.

redirectUrl
string
required

URL of client's server to redirect the PSU after completion of the consent authorisation.

Example:

"https://tpp-application.com"

vrpSetup
object
required
userId
string<uuid>

Conditional. Yapily Identifier for the User returned by the create user step POST /users. Clients must either provide userId or applicationUserId.

applicationUserId
string

Conditional. Client's own User reference. If the client wants to work with their own unique references for individual PSUs then they can use the applicationUserId property to provide that value. Where Yapily does not already have a Yapily userId that matches the supplied applicationUserId, then a new Yapily userId is created automatically and linked to the applicationUserId value. Clients must either provide userId or applicationUserId.

userSettings
object

Specifies the language and location preferences of the user.

oneTimeToken
boolean

Used to receive a oneTimeToken rather than a consentToken at the redirectUrl for additional security. This can only be used when the redirectUrl is set.

Example:

"false"

Response

Created

meta
object
data
object