Quickstart
- Get a test keyDevelopers → API keys
- Create a link
POST /v1/payment_links - Pay itCard
4242 4242 4242 4242
1. Get your test key
Section titled “1. Get your test key”Every account starts with a test key pair, under Developers → API keys at app.tuppence.ai. Test mode moves no money. When you’re signed in, the examples on these pages use your keys.
export TUPPENCE_SECRET_KEY=sk_test_…2. Create a payment link
Section titled “2. Create a payment link”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"}'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": "usd"}'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": "eur"}'npm install @tuppence/nodeimport { 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 the currency's minor unit currency: "gbp",});console.log(link.url);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 the currency's minor unit currency: "usd",});console.log(link.url);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 the currency's minor unit currency: "eur",});console.log(link.url);pip install tuppenceimport osfrom 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)import osfrom tuppence import Tuppence
tuppence = Tuppence(os.environ["TUPPENCE_SECRET_KEY"])link = tuppence.payment_links.create(name="Research report", amount=2000, currency="usd")print(link.url)import osfrom tuppence import Tuppence
tuppence = Tuppence(os.environ["TUPPENCE_SECRET_KEY"])link = tuppence.payment_links.create(name="Research report", amount=2000, currency="eur")print(link.url)The response includes a url. For a link, that’s the whole integration.
3. Pay it
Section titled “3. Pay it”Open the url and pay with a test card, any future expiry date and any CVC:
| Card | Result |
|---|---|
4242 4242 4242 4242 | Succeeds (US Visa) |
4000 0582 6000 0005 | Succeeds (UK Visa) |
4000 0000 0000 0002 | Declined |
The payment appears in your dashboard immediately, and the link’s payments_count goes up.
Build it with Claude or Codex
Give your coding agent Tuppence's rules and recipes. It can then add checkout, subscriptions and webhooks to your app, and create payment links through our MCP server.
Install it as a skill. Claude uses it whenever you ask about payments, in any project.
mkdir -p ~/.claude/skills/tuppence && curl -fsSL https://tuppence.ai/skill.md -o ~/.claude/skills/tuppence/SKILL.mdAdd it to your project's AGENTS.md, which Codex reads on every task.
curl -fsS https://docs.tuppence.ai/docs/AGENTS.md >> AGENTS.mdCopy the guide and paste it into your agent's instructions, rules or project knowledge.
Payment links are one way of many
Section titled “Payment links are one way of many”A link is the fastest way to start. Other options:
| To… | Use |
|---|---|
| Charge on a page we host, from your own flow | Payments → approval_url |
| Keep the payer in your own checkout | Payments + @tuppence/js |
| Charge every month | Subscriptions |
| Pull from a UK bank account | Direct Debit (UK businesses only; US bank debits come later) (SEPA Direct Debit in Europe, by application) |
| Take bookings with deposits | Bookings |
| Charge per API call | HTTP 402 |
| Take payments in person | Point of sale |
| Take payments for other businesses | Connect |
Not sure which fits? See Use cases.
- Take a payment in your own checkout.
- Get told when it happens with a signed webhook.
- Stuck? Ask the docs assistant. It can see your test account.