v1

latestOpenAPI 3.0.02026-07-2412592575.3 KB
auth-requests

Create an auth request

Requires auth_requests:write scope.

post/auth-requests

Request body

redirectUristring

One of the redirect uri that is set up under your API client. Required until separate bank registration is complete

userIdstring

The id of the user. Required for second use case - account access.

scopestring required

The scope for the auth request

connectionIdstring

The connection id. Required when scope has 'reauth' or 'refresh'

categorisationType'personal' | 'business'

Type of transaction categorisation to use. Defaults to personal categories

benefitsCheckboolean

If you require the connection to check for benefits payments, set this to true

counterpartiesCheckstring[]

If set, will check the connection for transactions with these counterparties. Will return true if one exists.

permissionsstring[]

Defines permissions, which can enable functionalities like standing orders or beneficiaries. Can also be used to apply a lighter set of permissions than the default set. The behavior depends on 'permissionsAction'.

permissionsAction'add' | 'replace'

Dictates how 'permissions' function. 'add' (default) to increment, or 'replace' to substitute default permissions.

expirationDateTimestring date-time

The date time that an AIS consent will expire at. If no user ID is provided, expiry will default to 24 hours. Maximum allowed 90 days from now.

transactionFromDateTimestring date-time

The date time transactions will be retrieved from. Maximum allowed depends on the connection. Use /well-known/openid-configuration to get the maximum allowed time period for the connection.

customerIpAddressstring ipv4

This field could be used to pass the custom customer's IP address to the bank.

customerLastLoggedTimestring

The time when the customer last logged in represented as an ISO 8601 date-time format including timezone

accountTypesstring[]

Filter which accounts to store based on their type

accountIdentificationstring[]

Filter which accounts to store by providing either sort code and account number (concatenated), IBAN or PAN

Example request

{
  "redirectUri": "https://api-client/callback",
  "userId": "5f4e26b2f05339b101e7afe8",
  "scope": "openid payment id:1ffe704d39629a929c8e293880fb449a",
  "connectionId": "1ffe704d39629a929c8e293880fb449a:48315090-b022-4716-8c08-5ba176f8fa5a",
  "payment": {
    "amount": 1500,
    "payee": {
      "accountNumber": "12345678",
      "sortCode": "123456",
      "name": "Payee 1"
    },
    "payer": {
      "accountNumber": "12345678",
      "sortCode": "123456",
      "name": "Payer name"
    },
    "payeeId": "bb1c7ebf-24a3-4e06-afc7-599de43b7bad",
    "payeeType": "api-payee",
    "payerId": "5f50bf05ab5bf185d5c94fb5:0bcdf548-24e7-4ebe-bee5-ab4fd2b6b22b",
    "payerRef": "Payer ref",
    "payerName": "John Smith",
    "payerEmail": "john.smith@gmail.com",
    "context": "PartyToParty",
    "endToEndId": "moneyhub-2023"
  },
  "standingOrder": {
    "payee": {
      "accountNumber": "12345678",
      "sortCode": "123456",
      "name": "Payee 1"
    },
    "payeeId": "bb1c7ebf-24a3-4e06-afc7-599de43b7bad",
    "payeeType": "api-payee",
    "payerId": "5f50bf05ab5bf185d5c94fb5:0bcdf548-24e7-4ebe-bee5-ab4fd2b6b22b",
    "context": "PartyToParty",
    "frequency": {
      "repeat": "Daily",
      "day": 1,
      "week": 1,
      "month": 1
    },
    "numberOfPayments": 5,
    "firstPaymentDate": "2020-11-02T00:00:00.000Z",
    "recurringPaymentDate": "2020-12-02T00:00:00.000Z",
    "finalPaymentDate": "2021-01-02T00:00:00.000Z",
    "firstPaymentAmount": 2000,
    "recurringPaymentAmount": 1000,
    "finalPaymentAmount": 999,
    "currency": "GBP"
  },
  "recurringPayment": {
    "payee": {
      "accountNumber": "12345678",
      "sortCode": "123456",
      "name": "Payee 1"
    },
    "payeeId": "bb1c7ebf-24a3-4e06-afc7-599de43b7bad",
    "payeeType": "api-payee",
    "payerId": "5f50bf05ab5bf185d5c94fb5:0bcdf548-24e7-4ebe-bee5-ab4fd2b6b22b",
    "context": "PartyToParty",
    "validFromDate": "2020-12-02T00:00:00.000Z",
    "validToDate": "2021-01-02T00:00:00.000Z",
    "maximumIndividualAmount": 2000,
    "currency": "GBP",
    "periodicLimits": [
      {
        "amount": 100,
        "currency": "GBP"
      }
    ]
  },
  "reversePayment": {
    "paymentId": "c390a94f-2309-4cdf-8d02-b0c5304d9f66",
    "amount": 1500,
    "payerId": "5f50bf05ab5bf185d5c94fb5:0bcdf548-24e7-4ebe-bee5-ab4fd2b6b22b"
  },
  "categorisationType": "personal",
  "counterpartiesCheck": [
    "c4dd4648-6de0-420c-8f56-ddd665707d57"
  ],
  "permissions": [
    "ReadStandingOrdersBasic"
  ],
  "permissionsAction": "replace",
  "expirationDateTime": "2020-07-10T12:00:00+00:00",
  "transactionFromDateTime": "2020-07-10T12:00:00+00:00",
  "sync": {
    "enableAsync": true
  },
  "customerIpAddress": "123.123.123.123",
  "accountVerification": {
    "accVerification": true
  },
  "customerLastLoggedTime": "2017-04-05T10:43:07.000Z",
  "accountTypes": [
    "cash"
  ],
  "accountIdentification": [
    "12345678"
  ]
}

Response

Successful Auth Request Response

metaobject

Example response

{
  "data": {
    "id": "c390a94f-2309-4cdf-8d02-b0c5304d9f66",
    "redirectUri": "https://api-client/callback",
    "createdAt": "2018-07-10T12:00:00+00:00",
    "bankId": "1ffe704d39629a929c8e293880fb449a",
    "userId": "5f4e26b2f05339b101e7afe8",
    "scope": "openid payment id:1ffe704d39629a929c8e293880fb449a",
    "paymentId": "950308a4-7dfe-4ac9-9df5-3957dfe056ac",
    "status": "complete",
    "redirectParams": {
      "authUrl": "http://obmockaspsp.moneyhub.co.uk/op/auth?client_id=0de1e813-bf37-4fa8-9943-1aeedbc83360&nonce=c98bee434855511961e47a5b5cfd5213&redirect_uri=http%3A%2F%2Finvite.moneyhub.co.uk%2Foauth%2Fcallback&response_type=code&scope=openid%20accounts&request=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlBsOHZPNWlGYW1WOXdnQTk2ZmxzMEtJQ0Y0MCJ9.eyJjbGllbnRfaWQiOiIwZGUxZTgxMy1iZjM3LTRmYTgtOTk0My0xYWVlZGJjODMzNjAiLCJub25jZSI6ImM5OGJlZTQzNDg1NTUxMTk2MWU0N2E1YjVjZmQ1MjEzIiwicmVkaXJlY3RfdXJpIjoiaHR0cDovL2Nvbm5lY3Rpb25zLmRldi4xMjcuMC4wLjEubmlwLmlvL29hdXRoL2NhbGxiYWNrIiwicmVzcG9uc2VfdHlwZSI6ImNvZGUiLCJzY29wZSI6Im9wZW5pZCBhY2NvdW50cyIsInN0YXRlIjoib2Jtb2Nr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