subkit· Subscriptions & invoices

Subscriptions that bill themselves.

subkit brings plans, trials, proration and invoices into your TypeScript app. Your customers pay by TWINT, card or QR-bill; subkit renews, sends reminders and matches payments with your bank. The data stays in your database.

Try the demo
$npm i @agentkit.ch/subkit
MonthlyYearly

Pro

CHF 19.00

/ month

14 days free
Choose Pro
TWINTVISAMASTERCARDQR
3
Payment methods: TWINT, card and QR-bill
4
Languages for portal, emails and invoices
CHF 0
Fee per transaction to us
MIT
Open source on GitHub, packages on npm

Who it is for

For everything that is paid every month or every year.

subkit handles recurring payments – from the SaaS with teams and limits to the club whose members pay in e-banking.

01

SaaS

Plans with features and limits, trials and prorated upgrades. hasFeature() and getLimit() decide in your code what a team may do.

02

Memberships

Monthly or yearly subscriptions with TWINT or card, saved once and renewed automatically. Receipts and reminders in four languages.

03

Club fees

An invoice with QR-bill instead of a card: members pay in e-banking, the camt.054 of your bank marks the invoice as paid.

Self-service

The billing page is already built.

With <BillingPortal /> your customers change their plan, save TWINT or a card and download their invoices. Every payment lands as a row in your database.

acme.ch/account/billing
Your app<BillingPortal />

Plan & invoices

Acme AG

Basic

active

CHF 9.00 / month

Pro

CHF 19.00 / month

Switch to Pro
Payment methodTWINT

Invoices

2026-0142

15.10.2026 · TWINT

CHF 9.00paid

2026-0141

15.09.2026 · QR

CHF 9.00paid

Features

Everything a subscription needs.

From code that runs in production at Membear: plans, payments, invoices and the cases that only show up in production.

Plans & trials

Monthly or yearly, with a trial and a free plan. Hidden plans stay with their subscribers but are no longer sold.

Proration to the Rappen

When a team moves to a bigger plan mid-month, subkit works out the difference and charges it right away.

TWINT, card or invoice

Save a payment method once and charge it every period – or let customers pay by invoice with QR-bill.

Reminders & retries

Payment terms, automatic retries and reminder emails. Dunning levels with fees come next.

Entitlements & limits

hasFeature() and getLimit() read the current plan – no table of your own for features.

Bank reconciliation

Import camt.053 and camt.054 from your bank, match QR references to open invoices, mark them paid.

Emails & invoices

Receipts, reminders and renewals as HTML and text, printable invoices with QR payment part – in four languages.

VAT on every invoice

VAT line and CHE number on every invoice, worked out in whole Rappen instead of floating point.

MCP for your team

Find customers, change plans, cancel, mark invoices paid – from Claude or ChatGPT, behind your own sign-in.

Webhooks that count once

Idempotent webhooks and compare-and-set updates: if the same payment arrives twice, it is still booked only once.

When

A TWINT payment arrives

CHF 19.00 · 2026-0143

Then

  • Mark the invoice as paid
  • Unlock the Pro plan
  • Send the receipt in French
200The same webhook, againignored, already booked

Every email, in four languages

Receipts, reminders and order confirmations as HTML and text, with your mailer.

de

Deine Quittung für Pro

Acme AG

fr

Votre commande #1042 est confirmée

Boutique Léman

it

Promemoria: fattura 2026-0142

FC Lugano Nord

46° 48′ N · 8° 14′ E

Swiss by default

Not localised later. Swiss from the first line.

Generic billing libraries think in Stripe, cents and one language. Swiss customers pay by QR-bill and TWINT, expect VAT on every invoice and read it in German, French or Italian. agentkit starts there.

Payment part

Currency

CHF

Amount

228.00

Account / Payable to

CH44 3199 9123 0008 8901 2
Acme AG
Bahnhofstrasse 1
8001 Zürich

Reference

21 00000 00003 13947 14300 09017

Additional information

Invoice 2026-0142 · Club Pro, annual plan
incl. 8.1 % VAT CHF 17.08 · CHE-123.456.789 VAT

Payable by

FC Seebach
Dorfstrasse 12
8052 Zürich
paid
nextReminders, Swiss style

For developers

Billing in five minutes.

Plans, payment provider and VAT in one file, one route for API and webhook, one component for the billing page.

Install

$ npm i @agentkit.ch/subkit
Setup prompt for your coding agent

Add subscriptions with QR-bill and TWINT using @agentkit.ch/subkit. Read https://agentkit.ch/llms.txt first.

import { createSubscriptions } from '@agentkit.ch/subkit';
import { drizzleAdapter } from '@agentkit.ch/subkit/drizzle';
import { zahlsProvider } from '@agentkit.ch/subkit/zahls';
import { db, env } from './db';

export const billing = createSubscriptions({
  // your Postgres, your tables
  database: drizzleAdapter(db),
  provider: zahlsProvider({ instance: 'acme', apiKey: env.ZAHLS_KEY }),
  plans: [
    { id: 'free', name: 'Free', features: [], limits: {}, prices: {} },
    {
      id: 'pro',
      name: 'Pro',
      features: ['export'],
      limits: {},
      prices: { month: { amount: 1900, currency: 'CHF' } },
    },
  ],
  defaultPlanId: 'free',
  tax: { rateBps: 810 }, // Swiss VAT 8.1 %
});

The other kit

shopkit

Commerce

For club shops, SMEs, merch and gift cards

Products with variants, cart and checkout with TWINT or on invoice. shopkit reserves stock, works out shipping and VAT per product and sends the order confirmation.

Cart

Club scarf29.00
Home jersey, M89.00
Shipping9.00
TotalCHF 127.00
Pay with TWINT

Questions

Asked often.

Still unsure? The demos show the kits with their real options.

01What products is subkit for?

For anything paid on a recurring basis: SaaS subscriptions, memberships, club fees, courses on subscription. For selling products there is shopkit.

02How do my customers pay?

By TWINT or card through zahls.ch – the payment method is saved once and charged every period – or by invoice with a Swiss QR-bill. collectionMethods sets which ones you offer.

03What happens when a payment fails?

subkit retries automatically and sends a reminder email. While an invoice is overdue, subkit sells the customer nothing new until it is paid.

04Where does my customers’ data live?

In your database. subkit runs as a library in your app and writes to your Postgres tables through the Drizzle adapter. There is no agentkit backend and no extra data processor.

05What does subkit cost?

Nothing. subkit is open source under MIT, with no fee per transaction. You only pay your payment provider.

Subscriptions in your app, today.

Copy the setup prompt into your coding agent – or try subkit in the browser first.

Setup prompt for your coding agent

Add subscriptions with QR-bill and TWINT using @agentkit.ch/subkit. Read https://agentkit.ch/llms.txt first.

Try the demo · sub.agentkit.ch