Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ GEM
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x64-mingw-ucrt)
ffi (1.17.1-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.30.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.30.2-x64-mingw-ucrt)
bigdecimal
rake (>= 13)
google-protobuf (4.30.2-x86_64-linux)
bigdecimal
rake (>= 13)
Expand Down Expand Up @@ -78,6 +82,8 @@ GEM
safe_yaml (1.0.5)
sass-embedded (1.87.0-arm64-darwin)
google-protobuf (~> 4.30)
sass-embedded (1.87.0-x64-mingw-ucrt)
google-protobuf (~> 4.30)
sass-embedded (1.87.0-x86_64-linux-gnu)
google-protobuf (~> 4.30)
terminal-table (3.0.2)
Expand All @@ -87,6 +93,7 @@ GEM

PLATFORMS
arm64-darwin
x64-mingw-ucrt
x86_64-linux-gnu

DEPENDENCIES
Expand Down
3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Quant Flow Docs
title: Quant Flow Doc
description: The comprehensive documentation for Quant Flow, Payscript and the Sandbox.
theme: just-the-docs

Expand All @@ -9,7 +9,6 @@ url: https://just-the-docs.github.io
aux_links:
Quant: https://quant.network/
Quant Flow: https://quant.network/quant-flow/
Sandbox: https://programmable-payments.payments.quantnetwork.net


favicon_ico: "/assets/images/favicon.ico"
27 changes: 27 additions & 0 deletions docs/connect_to_bank_accounts/get_consent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Get Consent for a Bank Account
parent: Connect Your Bank Accounts
layout: default
nav_order: 1
---

# Step 1: Get Consent for a Bank Account

Providing consent is the essential first step to securely connecting your bank to Quant Flow. This process, often facilitated by Open Banking, is a regulatory requirement that gives you control and security.

## What is Consent?

Consent is your formal authorization for Quant Flow to access specific financial data from your bank, such as transaction histories and account details. This is done through a secure portal directly with your bank, meaning your login credentials are never shared with or seen by Quant Flow.

## How to Get Consent

1. Navigate to the **Bank Accounts** section in your Quant Flow dashboard.
2. Click **"Connect New Bank Account"**.
3. Select your bank from the list of supported institutions.
4. You will be securely redirected to your own bank's website or app.
5. Authenticate yourself directly with your bank (e.g., using your mobile banking app, card reader, or password).
6. Your bank will clearly show what data you are sharing and for how long. Review and confirm this request.

## Consent Expiry (UK Accounts)

For accounts based in the United Kingdom, regulations require that access consents are renewed every **90 days**. Quant Flow will notify your Admin Users well before a consent expires to ensure a seamless, uninterrupted service.
43 changes: 43 additions & 0 deletions docs/connect_to_bank_accounts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Connect Your Bank Accounts
layout: page
nav_order: 3
---

# Connect Your Bank Accounts to Quant Flow

Welcome to the heart of your financial automation. Connecting your bank accounts is a secure and straightforward process that unlocks the full power of Quant Flow for your company.

Once connected, you can automate payments, reconcile transactions, and gain real-time financial insights—all from a single dashboard.

## How It Works: A Simple Three-Step Process

Linking a new bank account to your company's Quant Flow profile is designed to be quick and compliant.

1. **Grant Consent (Authorize)**
* **What it is:** You securely provide Quant Flow with permission to access transaction data from your bank. This is a standard regulatory requirement known as Open Banking (in the UK/Europe) or similar frameworks globally.
* **Who does it:** Any Admin User for your company. The authorization is given for the entire company, not just an individual user.

2. **Link & Activate**
* **What it is:** Once consent is granted, you "activate" the bank account for use within Quant Flow. This is when the magic starts.
* **Who does it:** An Admin User decides which consented accounts to activate.
* **The Key:** The number of bank accounts you can actively **link and use** is determined by your **Quant Flow User Plan**. Think of your plan as defining how many simultaneous automation streams you can have.

3. **Manage & Automate**
* **What it is:** With an active bank account linked, you can now create powerful automations (like rule-based payments, cash flow forecasts, and reconciliation scripts) that run seamlessly.
* **You are in control:** You can view connection status, extend consents, or deactivate accounts at any time from your dashboard.

## Key Things to Know

* **Company-Wide Access:** All Admin Users under your `CompanyID` can view and manage your company's bank connections. This ensures transparency and collaborative financial management.
* **Your Plan, Your Capacity:** Your subscription plan defines the number of bank accounts you can have **active and automated** at once. You can always upgrade your plan to link more accounts.
* **Secure by Design:** We use robust, bank-level security and never store your online banking credentials.

---

**Ready to get started?** Explore the guides below to learn about each step in detail.
{: .note .p-3 }

* [How to Get Consent for a Bank Account](./get_consent)
* [How to Link and Activate a Bank Account](./link_account)
* [Managing Your Connected Accounts](./manage_consents)
23 changes: 23 additions & 0 deletions docs/connect_to_bank_accounts/link_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Link and Activate a Bank Account
parent: Connect Your Bank Accounts
layout: default
nav_order: 2
---

# Step 2: Link and Activate a Bank Account

After you have successfully granted consent, the next step is to activate the bank account within Quant Flow to start building automations.

## Consent vs. Activation

* **Consent:** The *permission* to access the data. A company can have consent for many bank accounts.
* **Linking/Activation:** The *action* of using that consented account within your automations. The number of accounts you can activate is limited by your User Plan.

## How to Link an Account

1. Go to **Bank Accounts**. You will see a list of all accounts for which your company has given consent. They are going to be separated in two sections **"Active bank account"s, "Inactive bank accounts"**
2. Find the account you wish to use in the **"Inactive bank accounts"** and click **"Activate"**.
3. The system will check if you have available slots in your current User Plan.
4. If you do, the account will become active and its status will change to **"Active"**. You can now create automations that use this account.
5. If you have reached your plan's limit, you will be prompted to **upgrade your plan** before you can activate the new account.
41 changes: 41 additions & 0 deletions docs/connect_to_bank_accounts/manage_consents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Manage Your Connected Accounts
parent: Connect Your Bank Accounts
layout: default
nav_order: 3
---

# Managing Consents and Connected Accounts

You have full visibility and control over all your company's bank connections from the Quant Flow dashboard.

## Viewing Connected Accounts

The **Bank Accounts** overview page shows all accounts associated with your `CompanyID`, including:
* **Account Name/Nickname**
* **Bank Name**
* **Account Number** (masked for security)
* **Status:** (e.g., `Active`, `Inactive`, `Expired`, `Authorised`, `Revoked`)
* **Consent Expiry Date**

## Extending Consent

For UK accounts, you must renew consent every 90 days.
1. The system will show an **"In X days your bank account will expire, please extend"** warning next to relevant accounts.
2. An Admin User can click **"Extend"** button.
3. You will be guided through the same secure authentication process with your bank to grant a new 90-day consent. Your existing automations will continue to run without interruption.

## Deactivating an Account

You can deactivate an account at any time.
1. Find the active account and select **"Deactivate"**.
2. **Important Consideration:** Deactivating an account will pause **all automations** associated with it. This may disrupt scheduled payments, data feeds, or reconciliation processes. You will be asked to confirm this action.
3. The account will move to an **"Inactive"** state but will retain its consent, allowing you to easily reactivate it later without going through the full bank authorization again (as long as the consent is still valid).

## Revoking Consent Entirely

If you wish to permanently remove Quant Flow's access to an account:
1. You can **"Revoke Consent"** from either an Active or Inactive account.
2. This action is irreversible and severs the connection to your bank.
3. All automations for this account will be permanently halted.
4. To use this account again in the future, you will need to start from the beginning of the consent process.
23 changes: 0 additions & 23 deletions docs/payscript/example_scripts/automatedTransfer.groovy

This file was deleted.

16 changes: 0 additions & 16 deletions docs/payscript/example_scripts/automated_transfer.md

This file was deleted.

29 changes: 29 additions & 0 deletions docs/payscript/example_scripts/cashflow_optimisation.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger = "time";

var savingsAccount = ${savingsAccount:AccountInfo};
var minAmount = ${minimumAccountBalance:decimal};
var maxAmount = ${maximumAccountBalance:decimal};

var bankAccount = getAutomationOwnerAccountInfo();
var bankAccountBalance = getBalance(bankAccount);
var bankAccountBalanceAmount = bankAccountBalance.availableBalance;

if (bankAccountBalanceAmount.compareTo(minAmount) > 0) {
def transferAmount = bankAccountBalanceAmount.subtract(minAmount);
if (transferAmount.compareTo(maxAmount) > 0) {
transferAmount = maxAmount;
}
var transferFromCurrentToSaving = PaymentInfo.builder()
.payer(bankAccount)
.payee(savingsAccount)
.amount(AmountInfo.builder()
.currency(Currency.GBP)
.amount(transferAmount)
.build())
.reason("Cash-flow management")
.build();
var payment = createPayment("502652ac-8643-40ee-8275-fd89d449e88f", transferFromCurrentToSaving);
logMessage("Cash-flow management completed successfully with amount" + transferAmount + "with payment ID: " + payment.paymentId);
} else {
logMessage("Cash-flow management: the balance (" + bankAccountBalanceAmount + ") doesn't meet the threshold (" + minAmount + ")");
}
18 changes: 18 additions & 0 deletions docs/payscript/example_scripts/cashflow_optimisation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Cash-Flow Optimisation
parent: Example Scripts
layout: page
---

# Cash-Flow Optimisation
This automation ensures that funds are always available in the right accounts at the right time - helping corporate customers cover upcoming expenses, avoid overdrafts, and maintain optimal liquidity without manual intervention.

Automatically detect surplus cash above a certain threshold. Transfer surplus into high-interest savings or investment accounts. Trigger cash movement based on account balance thresholds.

<div style="text-align: center;" markdown="1">
[Download](cashflow_optimisation.groovy){: .btn }
</div>

{% highlight groovy %}
{% include_relative cashflow_optimisation.groovy %}
{% endhighlight %}
25 changes: 25 additions & 0 deletions docs/payscript/example_scripts/credit_optimisation.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
trigger = "transaction";

var savingsAccount = ${savingsAccount:AccountInfo};
var percentageToTransfer = ${percentageToTransfer:decimal};
var saveOnTransactionsOver = ${saveOnTransactionsOver:decimal};

var incomingPaymentAmount = getTriggerTransactionDetails().getAmount().getAmount();

if (incomingPaymentAmount.compareTo(saveOnTransactionsOver) < 0) {
return;
}

var amountToTransfer = incomingPaymentAmount.multiply(percentageToTransfer).divide(100);
var currentAccount = getAutomationOwnerAccountInfo();
var transfer = PaymentInfo.builder()
.payer(currentAccount)
.payee(savingsAccount)
.amount(AmountInfo.builder()
.currency(Currency.GBP)
.amount(amountToTransfer)
.build())
.reason("Credit Optimisation")
.build();

createPayment("e70fefd2-c52a-46c2-848d-cd7a6d9bcacd",transfer);
18 changes: 18 additions & 0 deletions docs/payscript/example_scripts/credit_optimisation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Credit Optimisation
parent: Example Scripts
layout: page
---

# Credit Optimisation
This automation ensures that funds are always available in the right accounts at the right time - helping corporate customers cover upcoming expenses, avoid overdrafts, and maintain optimal liquidity without manual intervention.

Continuously track an account for surplus cash beyond regular business needs. When surplus funds are available, automatically apply extra payments towards any credit account. Turn spare cash into smart repayments - no effort required.

<div style="text-align: center;" markdown="1">
[Download](credit_optimisation.groovy){: .btn }
</div>

{% highlight groovy %}
{% include_relative cashflow_optimisation.groovy %}
{% endhighlight %}
2 changes: 0 additions & 2 deletions docs/payscript/example_scripts/helloWorld.groovy

This file was deleted.

16 changes: 0 additions & 16 deletions docs/payscript/example_scripts/hello_world.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/payscript/example_scripts/reserveFunds.groovy

This file was deleted.

16 changes: 0 additions & 16 deletions docs/payscript/example_scripts/reserve_funds.md

This file was deleted.

Loading