AIS Consents

The time for which an AIS connection consent can live for, and for how far in the past it can access transactions from can be specified as part of the mh:consent claims value.

To set these values in the claims, they need to be set in the mh:consent value in the claims, with these properties:

  • expirationDateTime - the date time at which the banking connection will expire with the banking provider (maximum 90 days in the future)
  • transactionFromDateTime - the date time at which transactions will be pulled from (maximum 24 months in the past)

When making a connection without specifying a user ID (Use Case 1 scenario) the default time for the expiration date time will be 24 hours in the future.

  "id_token": {
    "sub": {
      "essential": true
    "mh:con_id": {
      "essential": true
    "mh:consent": {
      "essential": true,
      "value": {
        "expirationDateTime": "2022-05-02T00:00:00+00:00",
        "transactionFromDateTime": "2021-05-02T00:00:00+00:00"

NodeJS Library



You will need v4.17.0 of the Moneyhub API Client to make use of this feature

If you use our NodeJS client library, you can make connections with these claims by specifying expirationDateTime and/or transactionFromDateTime in the authorisation URL generating methods.

const url = await moneyhub.getAuthorizeUrl({
  scope: "openid id:api",
  state: " your state value",
  nonce: "your nonce value",
  expirationDateTime: "2022-09-01T00:00:00.000Z",
  transactionFromDateTime: "2020-09-01T00:00:00.000Z",