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.
Test modeDucat runs on Stripe's test mode for now, so no real card is charged.
Features
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.
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.
Make the customer the first time someone opens checkout, with Idempotency-Key, and keep its id on your own row.
GET /v1/customers pages through your customers with a cursor.
Set where tax is worked out, and VAT, GST or ABN numbers, refused when malformed, with Stripe's verification status.
Keep your own ids (a team, an account) on the customer and find it again from any event.
Your sign-in stays yours. Ducat sees a Stripe customer with whatever you give it.
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"}}'| Endpoint | What |
|---|---|
POST /v1/customers | email, name, metadata, address, tax_ids |
GET /v1/customers/{id} | one customer |
GET /v1/customers?after&limit | your customers, oldest first |
PUT /v1/customers/{id}/address | where tax is worked out |
POST | GET /v1/customers/{id}/tax-ids | add or list tax IDs; DELETE one |
Available in test mode Works today on Stripe's test mode.
Related: Checkout, Security, API reference
Sign up, make a key, and take a test payment in a few minutes. No card needed.