{
  "$schema": "https://plus.solberg.is/schema/manifest.json",
  "site": "arionbanki.is",
  "title": "Arion Banki",
  "description": "Debit and savings transactions, VISA credit card transactions, mortgage details and unpaid bills from netbanki.arionbanki.is.",
  "version": "0.1.0",
  "author": "jokull <https://github.com/jokull>",
  "license": "MIT",
  "tags": [
    "banking",
    "finance",
    "transactions"
  ],
  "identities": [
    "household"
  ],
  "auth": [
    {
      "id": "browser-cookie",
      "type": "cookie",
      "description": "Session-only cookies (FedAuth, .N5SESSION, .SOSAUTH) extracted from a logged-in Firefox session (sessionstore-backups/recovery.jsonlz4, mozLz40). ~15 min TTL — re-login often.",
      "default": true,
      "ttl": "15m",
      "probe": "POST a known endpoint; 403 = expired",
      "credentials": [
        "ARION_FIREFOX_PROFILE"
      ]
    },
    {
      "id": "form",
      "type": "form",
      "refuse": "Automated login was flagged as fraud (2026-08-14). Use the Firefox session import or the Auðkennisapp (Icelandic eID) path instead."
    }
  ],
  "ops": [
    {
      "id": "transactions",
      "kind": "rest",
      "title": "Debit/savings transactions",
      "description": "DataTables-style POST to /nb5/Accounts/Transactions/TransactionList; rows are JSON arrays with HTML fragments (Icelandic number formats). Merges and dedups by {date_ref_amount}.",
      "tags": [
        "transactions",
        "accounts"
      ],
      "risk": "read-only",
      "input": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string",
            "description": "e.g. 0323-26-022009 (default: all active cash accounts)"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "output": {
        "$ref": "#/schemas/ArionTransaction"
      },
      "lastVerified": "2026-08-14"
    },
    {
      "id": "visa-transactions",
      "kind": "rest",
      "title": "VISA credit card transactions",
      "description": "POST /nb5/CreditCards/GetTransactions with panId and billing period. Same data as the old manual XLSX export, with FX detail.",
      "tags": [
        "transactions",
        "credit-card"
      ],
      "risk": "read-only",
      "input": {
        "type": "object",
        "properties": {
          "panId": {
            "type": "string"
          },
          "period": {
            "type": "string",
            "description": "YYYYMM billing period"
          }
        }
      },
      "output": {
        "$ref": "#/schemas/VisaTransaction"
      },
      "lastVerified": "2026-08-14"
    },
    {
      "id": "mortgages",
      "kind": "rest",
      "title": "Mortgage loans",
      "description": "GetLoanDetails + GetLoanPayments — balance, APR, remaining months, per-payment principal/interest/indexation history.",
      "tags": [
        "mortgage",
        "loans"
      ],
      "risk": "read-only",
      "input": {
        "type": "object",
        "properties": {
          "masterLoanId": {
            "type": "string",
            "description": "e.g. 240028"
          }
        }
      },
      "output": {
        "$ref": "#/schemas/MortgageLoan"
      },
      "lastVerified": "2026-08-14"
    },
    {
      "id": "bills",
      "kind": "rest",
      "title": "Unpaid bills",
      "description": "Bills due in the next N days (default 30).",
      "tags": [
        "bills"
      ],
      "risk": "read-only",
      "input": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "minimum": 1,
            "default": 30
          }
        }
      },
      "output": {
        "$ref": "#/schemas/Bill"
      },
      "lastVerified": "2026-08-14"
    }
  ],
  "schemas": {
    "ArionTransaction": {
      "type": "object",
      "properties": {
        "txn_id": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date"
        },
        "description": {
          "type": "string"
        },
        "ref": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "arion_txn_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "balance_after": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "VisaTransaction": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string"
        },
        "merchant": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "fxRate": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "MortgageLoan": {
      "type": "object",
      "properties": {
        "masterLoanId": {
          "type": "string"
        },
        "balance": {
          "type": [
            "number",
            "null"
          ]
        },
        "apr": {
          "type": [
            "number",
            "null"
          ]
        },
        "remainingMonths": {
          "type": [
            "integer",
            "null"
          ]
        },
        "payments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string"
              },
              "principal": {
                "type": "number"
              },
              "interest": {
                "type": "number"
              },
              "indexation": {
                "type": "number"
              },
              "fees": {
                "type": "number"
              },
              "total": {
                "type": "number"
              },
              "remainingBalance": {
                "type": "number"
              }
            }
          }
        }
      }
    },
    "Bill": {
      "type": "object",
      "properties": {
        "dueDate": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "description": {
          "type": "string"
        }
      }
    }
  },
  "origins": [
    "https://netbanki.arionbanki.is"
  ]
}
