Skip to content

Quickstart

You need a Tuppence account (sign up at app.tuppence.ai) and its test secret key from Developers → API keys. Test mode moves no money.

Terminal window
export TUPPENCE_SECRET_KEY=sk_test_…

A link takes a payment from anyone you send it to. Pick your language:

Terminal window
curl -sS https://api.tuppence.ai/v1/payment_links \
-H "Authorization: Bearer $TUPPENCE_SECRET_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "Research report", "amount": 2000, "currency": "gbp"}'
Terminal window
npm install @tuppence/node
import { Tuppence } from "@tuppence/node";
const tuppence = new Tuppence(process.env.TUPPENCE_SECRET_KEY);
const link = await tuppence.paymentLinks.create({
name: "Research report",
amount: 2000, // £20.00, in pence
currency: "gbp",
});
console.log(link.url);
Terminal window
pip install tuppence
import os
from tuppence import Tuppence
tuppence = Tuppence(os.environ["TUPPENCE_SECRET_KEY"])
link = tuppence.payment_links.create(name="Research report", amount=2000, currency="gbp")
print(link.url)

Open the URL. In test mode the page offers Stripe’s test cards — 4242 4242 4242 4242, or 4000 0582 6000 0005 for a UK card — any future expiry, any CVC. The payment appears in your dashboard at once, and the link’s payments_count goes up.