Test modeDucat runs on Stripe's test mode for now, so no real card is charged.

Features

Customers Available in test mode

A customer is the person or company that pays you. Ducat keeps the list of your team's customers, and nobody else's: another team asking for one of yours gets a 404, as if it didn't exist.

What it does

Your team's alone

Every object your keys make is owned by your team, written into Stripe's metadata where callers can't set it. Every key of your team sees the same data; no other team sees it.

Idempotent creation

Make the customer the first time someone opens checkout, with Idempotency-Key, and keep its id on your own row.

Listed, oldest first

GET /v1/customers pages through your customers with a cursor.

Addresses and tax IDs

Set where tax is worked out, and VAT, GST or ABN numbers, refused when malformed, with Stripe's verification status.

Your metadata

Keep your own ids (a team, an account) on the customer and find it again from any event.

Ducat never sees your users

Your sign-in stays yours. Ducat sees a Stripe customer with whatever you give it.

In code

Make a team's one customer, safely retried

TypeScript

// ducat(): the small fetch helper from the quickstart (/docs/quickstart)
const customer = await ducat("POST", "/v1/customers", {
  email: "owner@acme.test",
  name: "Acme",
  metadata: { team: "org_acme" },
}, "team:org_acme");

await db.teams.update("org_acme", { customer: customer.id });

Python

# ducat(): the small helper from the quickstart (/docs/quickstart)
customer = ducat("POST", "/v1/customers", {
    "email": "owner@acme.test",
    "name": "Acme",
    "metadata": {"team": "org_acme"},
}, idempotency_key="team:org_acme")
db.teams.update("org_acme", customer=customer["id"])

curl

curl -s https://api.ducatpay.dev/v1/customers \
  -H "authorization: Bearer $DUCAT_TOKEN" \
  -H "content-type: application/json" \
  -H "idempotency-key: team:org_acme" \
  -d '{"email": "owner@acme.test", "name": "Acme",
       "metadata": {"team": "org_acme"}}'
Customers endpoints
EndpointWhat
POST /v1/customersemail, name, metadata, address, tax_ids
GET /v1/customers/{id}one customer
GET /v1/customers?after&limityour customers, oldest first
PUT /v1/customers/{id}/addresswhere tax is worked out
POST | GET /v1/customers/{id}/tax-idsadd or list tax IDs; DELETE one

Good to know

Available in test mode Works today on Stripe's test mode.

Related: Checkout, Security, API reference

More features

Start building in test mode

Sign up, make a key, and take a test payment in a few minutes. No card needed.