README
Air::Plugin::Donate
A plugin for the Raku Air web framework that renders a donation panel linking to a Stripe-hosted payment page.
Synopsis
#!/usr/bin/env raku
use Air::Functional :BASE;
use Air::Base;
use Air::Plugin::Donate;
my $site =
site
page
main [
donate(:key<abc123XYZ>);
]
;
$site.serve;Description
Air::Plugin::Donate renders a small Pico-styled donation panel β heading, Stripe wordmark, and a donate link. The link goes straight to a Stripe-hosted Payment Link page at https://donate.stripe.com/<key>.
No card data, API calls, or webhooks touch this plugin or your server. Stripe's own hosted page handles the payment, and the Stripe Dashboard handles receipts and reporting. The :key is just the public URL slug of your Payment Link β it is not a secret, so it is safe to commit in source (the same convention as the Umami website id in Air's Analytics tool).
The panel is fully customizable:
donate
:key<abc123XYZ>,
:heading('Credit Card and others'),
:label('Donate via Stripe'),
:methods[
'Credit Card', 'Klarna', 'Revolut Pay', 'SOFORT', 'Przelewy24',
'Bancontact', 'MobilePay', 'eps-Γberweisung', 'iDEAL',
],
:note('This costs us some fees, but works worldwide in all currencies.');| Attribute | Default | Rendered as |
|---|---|---|
:key | (required) | href="https://donate.stripe.com/<key>" on the link |
:heading | Support this project | <h3> |
:blurb | (omitted) | <p> above the link |
:logo | True | inline Stripe wordmark SVG above the link text (:!logo to disable) |
:label | Donate | link text |
:methods | (omitted) | Payment Methods: <ul> below the link |
:note | (omitted) | <p><em> footnote |
Since the plugin registers no routes, it needs no site :register[...] entry β just use donate(...) inline anywhere in a page tree.
Stripe Account Setup
Create a free account at dashboard.stripe.com/register.
In the Dashboard, go to Payment Links β + New. Configure the donation β a fixed amount, a preset list, or "customer chooses amount" β then create it.
Stripe gives you a URL like
https://donate.stripe.com/abc123XYZ(while your account is unactivated, test mode gives ahttps://donate.stripe.com/test/...-style link). Copy the part afterhttps://donate.stripe.com/.Pass that as
:key<...>, e.g.donate(:key<abc123XYZ>).To go live: complete Stripe's business/tax/bank-account verification under Settings β Business settings, switch the Dashboard to Live mode, and create a live Payment Link (this is a new key β update your
:keyaccordingly).Optional: under Settings β Emails, enable "Successful payments" so donors automatically receive an email receipt β no code needed.
Installation
If you already have Air working, then:
zef install Air::Plugin::Donate
Otherwise, follow the Air::Examples Getting Started
Author
librasteve [email protected]
Copyright and License
Copyright 2026 Stephen Roe.
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.