Skip to main content
Version: 1.0.0

Example: Short links

A Payment Link URL carries the customer's details, so it is long and awkward to send in an email or text message. A short link is a short code that redirects to that full URL. Zenith does not provide short links: this page shows one way to build and run your own.

The Shortlinks template is a ready-made link shortener for Cloudflare Workers. It includes:

  • an admin screen where your team creates, copies and deletes links, protected by Cloudflare Access;
  • an API so your own systems can create links with an admin token;
  • a list of allowed sites, so links can only point to your payment pages, for example pay.schooleasypay.com.au;
  • a limit on how often each visitor can open links.

The Deploy to Cloudflare button copies the template into your GitHub or GitLab account and deploys it to your Cloudflare account. The template's README walks through the remaining steps: choosing your allowed sites, adding a domain, and protecting the admin screen.

Install with an AI agent​

Paste this prompt into Claude Code, Codex, Cursor or any other AI coding agent:

Install Shortlinks on my Cloudflare account by following the instructions here:
https://raw.githubusercontent.com/ianmenethil/cf-templates-shortlinks/main/.claude/INSTALLER.md

A full payment URL carries the customer's details and is long. A short link stores the full URL against a unique code, then redirects the customer to that URL. You can build your own system using the same approach.

The full URL becomes visible after the redirect. Shortening it does not stop customers changing its values.

Example​

Open the example short link. It redirects to a School EasyPay payment page with customer details, a reference and an amount of $123.45 already filled in.

The full payment URL the short link opens, part by part:

Full payment URL, labelled
https://pay.schooleasypay.com.au ← the program's payment site
/menethil ← the merchant
?customerName=Ian%20Menethil ← customer name
&paymentAmount=123.45 ← amount, $123.45
&customerReference=Test%20Reference ← customer reference
&customerEmail=menethil@zenpay.com.au ← customer email
&contactNumber=0400000000 ← contact number
&additionalReference=Additional%20Test%20Reference ← second reference
&state=disabled ← greys out the filled-in fields