Skip to main content
Create Sweeping Variable Recurring Payment Authorisation
curl --request POST \
  --url https://api.yapily.com/variable-recurring-payments/sweeping/consents \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '
{
  "applicationUserId": "string",
  "institutionId": "modelo-sandbox",
  "callback": "https://display-parameters.com/",
  "controlParameters": {
    "psuAuthenticationMethods": [
      "SCA_NOT_REQUIRED"
    ],
    "periodicLimits": [
      {
        "totalMaxAmount": {
          "amount": 100,
          "currency": "GBP"
        },
        "frequency": "DAILY",
        "alignment": "CONSENT"
      }
    ],
    "maxAmountPerPayment": {
      "amount": 10,
      "currency": "GBP"
    }
  },
  "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"
        }
      ]
    }
  },
  "complianceData": {
    "payer": {
      "type": "INDIVIDUAL",
      "individual": {
        "name": "John Doe",
        "birthDate": "2000-08-12"
      }
    }
  }
}
'
{
  "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_DOMESTIC_VARIABLE_RECURRING_PAYMENT_SWEEPING",
      "VARIABLE_RECURRING_PAYMENT_FUNDS_CONFIRMATION",
      "INITIATE_DOMESTIC_VARIABLE_RECURRING_PAYMENT_SWEEPING"
    ],
    "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",
    "controlParameters": {
      "psuAuthenticationMethods": [
        "SCA_NOT_REQUIRED"
      ],
      "periodicLimits": [
        {
          "totalMaxAmount": {
            "amount": 100,
            "currency": "GBP"
          },
          "frequency": "DAILY",
          "alignment": "CONSENT"
        }
      ],
      "maxAmountPerPayment": {
        "amount": 10,
        "currency": "GBP"
      }
    },
    "payer": {
      "name": "John Doe",
      "accountIdentifications": [
        {
          "type": "ACCOUNT_NUMBER",
          "identification": "87654321"
        },
        {
          "type": "SORT_CODE",
          "identification": "654321"
        }
      ]
    },
    "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"
          }
        ]
      }
    }
  }
}

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.

Body

application/json;charset=UTF-8
institutionId
string
required

Mandatory. The reference to the Institution which identifies which institution the authorisation request is sent to.

Example:

"yapily-mock"

controlParameters
object
required

Define the restrictions and limits for payment orders as part of Sweeping VRP consent

initiationDetails
object
required

Mandatory. The payment initiation object defining the details of the payment under the Variable Recurring Payment consent.

userUuid
string<uuid>

This is the Yapily user identifier for the user returned by the create user step POST ../users

applicationUserId
string

A 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 userUuid that matches the supplied applicationUserId, then a new Yapily userUuid is created automatically and linked to the applicationUserId value. Clients can then use either their own applicationUserId or the Yapily userId to reference the same user in future calls.

forwardParameters
string[]

Extra parameters the TPP may want to get forwarded in the callback request after the PSU redirect.

callback
string

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.

Example:

"https://display-parameters.com"

redirect
object

Optional. The server to redirect the user to after the user complete the authorisation at the Institution.

oneTimeToken
boolean

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.

Example:

false

complianceData
object

Conditional. Information needed to complete compliance checks. Mandatory for Yapily Connect customers.

Response

Created

meta
object
data
object
forwardedData
object[]
raw
object[]
deprecated