diff --git a/docs/payscript/example_scripts/tax_optimisation.groovy b/docs/payscript/example_scripts/tax_optimisation.groovy
new file mode 100644
index 0000000..7a116ec
--- /dev/null
+++ b/docs/payscript/example_scripts/tax_optimisation.groovy
@@ -0,0 +1,27 @@
+trigger = "transaction"; // Trigger definition - The automation will trigger on specified transactions.
+
+// Define the parameters required
+def reserveId = ${reserveId:String}; // The reserve where tax will be sent to
+def taxFactor = ${taxFactor:decimal}; // What portion of the payment is owed in taxes
+
+
+// Basic validation
+if (taxFactor <= BigDecimal.ZERO || taxFactor > BigDecimal.ONE) {
+ throw new IllegalArgumentException("Invalid taxFactor: ${taxFactor}. Must be > 0 and ≤ 1.");
+}
+
+
+// Unpack values from the payment event that triggered this script.
+def eventPaymentId = event[paymentId:string];
+def eventPaymentInfo = getPaymentInfo(eventPaymentId);
+def eventPaymentAmount = eventPaymentInfo.amountInfo.amount;
+
+
+// Calculate the tax amount to be saved
+def saveTaxAmount = eventPaymentAmount.multiply(taxFactor);
+
+// Add funds to reserve
+addFundsToReserve(eventPaymentInfo.payee.identifier, reserveId, saveTaxAmount, "Automated tax optimisation");
+
+// Log useful information
+println("Saving tax completed successfully to reserve: ${reserveId}");
diff --git a/docs/payscript/example_scripts/tax_optimisation.md b/docs/payscript/example_scripts/tax_optimisation.md
new file mode 100644
index 0000000..fc1be4c
--- /dev/null
+++ b/docs/payscript/example_scripts/tax_optimisation.md
@@ -0,0 +1,16 @@
+---
+title: Tax Optimisation
+parent: Example Scripts
+layout: page
+---
+
+# Reserve Funds
+This script triggers on incoming transactions to set aside a percentage of the transaction into a reserve, for the purposes of saving it for tax payments.
+
+
+[Download](tax_optimisation.groovy){: .btn }
+
+
+{% highlight groovy %}
+{% include_relative tax_optimisation.groovy %}
+{% endhighlight %}
diff --git a/docs/payscript/example_scripts/topup.groovy b/docs/payscript/example_scripts/topup.groovy
index f02bc05..2b08464 100644
--- a/docs/payscript/example_scripts/topup.groovy
+++ b/docs/payscript/example_scripts/topup.groovy
@@ -4,7 +4,7 @@ def account_parent = ${account_parent:scan};
def account_child = ${account_child:scan};
def topUpGoal = ${topUpGoal:decimal};
-balance = getBalance(account_child);
+balance = getBalance(account_child).getAvailableBalance();
if (balance < topUpGoal) {
def payment = PaymentInfo.builder()
diff --git a/docs/tutorials/tutorial_reserves.md b/docs/tutorials/tutorial_reserves.md
index 383ea36..8c8322e 100644
--- a/docs/tutorials/tutorial_reserves.md
+++ b/docs/tutorials/tutorial_reserves.md
@@ -6,10 +6,13 @@ nav_order: 4
---
# Reserves
-Reserves are an abstract segregation of funds that can be used to help manage an account's funds. Funds that are moved to a reserve are still in that acconut, and count toward its total balance, however they won't count towards their available balance and won't be able to be used until it is moved out of the reserve.
+Reserves are an abstract segregation of funds that can be used to help manage an account's funds. Funds that are moved to a reserve are still in that acconut, and count toward its total balance, however they won't count towards their available balance and won't be able to be used until they are moved out of the reserve. Reserves also keep a history of the transactions made to and from them.
+
-Reserves also keep a history of the transactions made to and from them.
\ No newline at end of file
+{% highlight groovy %}
+{% include payscript/example_scripts/tax_optimisation.groovy %}
+{% endhighlight %}