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

Docs

API reference

Base URL https://api.ducatpay.dev. JSON in and out, Authorization: Bearer <token> on every call. Your team's key reaches everything below unless a group says otherwise.

Basics

EndpointWhat
GET /v1/modewhich Stripe is behind the API: fake, test or live
Idempotency-Key headeron any POST: passed to Stripe scoped to your team; a retry never makes or charges twice (24 hours)
Nod-Approval headera person's approval for one action past the limits, after a 403 naming it

Customers

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-ids, DELETE …/{tax_id}VAT, GST, ABN: refused when malformed

Prices, checkout and payment links

EndpointWhat
POST /v1/prices, GET /v1/prices?active&after&limitfixed prices, monthly, yearly or once; list
POST /v1/prices/{id}/deactivateretire a price
POST /v1/checkout-sessionscustomer, mode, line_items (a metered price: no quantity, its cap shown on the page), success_url, cancel_url, metadata, promotion_code, seller
GET /v1/checkout-sessions/{id}status and payment_status: paid, unpaid or no_payment_required
POST /v1/checkout-sessions/{id}/expireclose an open session's page; complete: 409
POST /v1/payment-links, GET /v1/payment-links?active, GET …/{id}reusable links
POST /v1/payment-links/{id}/deactivateturn a link off

Subscriptions

EndpointWhat
POST /v1/subscriptionson a saved card; trial_period_days or trial_end; past the limit: a nod
GET | DELETE /v1/subscriptions/{id}read; cancel now
PATCH /v1/subscriptions/{id}price, quantity, proration_behavior, promotion_code; a rise past the limit: a nod
PATCH /v1/subscriptions/{id} {cancel_at_period_end}on its own: cancel at the period's end, or take it back
GET /v1/subscriptions/{id}/upcoming-invoicethe preview: prorations, total, proration_date
POST /v1/subscriptions/{id}/end-trialcharge the first period now
GET /v1/customers/{id}/subscriptionsnewest first, every status
GET /v1/dunningsubscriptions past_due or unpaid, with their failed invoices

Invoices and credit notes

EndpointWhat
GET /v1/customers/{id}/invoices, GET /v1/invoices/{id}with the hosted invoice URL and the PDF
POST /v1/invoices/{id}/paytry the card now; past the limit: a nod
POST /v1/credit-notes/preview, POST /v1/credit-notesinvoice, lines or amount, to: refund or balance; past the limit: a nod
GET /v1/credit-notes?customer|invoice, GET …/{id}, POST …/{id}/voidlist, read, void

Portal

EndpointWhat
POST /v1/customers/{id}/portal-sessions{return_url, own?}: Ducat's own portal (an hour's link) or Stripe's hosted one

Charges and refunds

EndpointWhat
POST /v1/charges, GET /v1/charges/{id}charge a saved card; past the limit: a nod
POST /v1/refunds{payment_intent, amount?}; past the limit: a nod

Usage billing Beta

EndpointWhat
POST /v1/meters, GET /v1/meters, GET …/{id}{name, display_name, aggregation: sum | count | last}
POST /v1/meters/{id}/prices{unit_amount, currency, interval, product_name, cap_amount?}: a metered price; capped, it sells without a nod while the plan plus the cap is inside the limit; uncapped, always a nod
POST /v1/meters/{id}/events{customer, value, identifier, timestamp}: once per identifier
GET /v1/meters/{id}/usage?customer&start&enda customer's total over a range
POST /v1/meters/{id}/deactivatetake no more events

Tax On request

EndpointWhat
POST /v1/tax/previews{customer, line_items}: the tax on a cart
GET /v1/tax/registrations?statuswhere the account collects tax (read-only)

Events and webhooks

EndpointWhat
GET /v1/events?after&limityour Stripe events, oldest first, with a cursor (at most 500 a page)
PUT /v1/webhook-endpoint{url}: the secret once; again: a new secret
GET | DELETE /v1/webhook-endpointits status (never the secret); stop pushes

Sellers and payouts Beta

EndpointWhat
POST /v1/sellers, GET /v1/sellers/{acct}a connected account for a seller; its status
POST /v1/sellers/{acct}/linksStripe's hosted onboarding link
PUT /v1/sellers/{acct}/payout-schedulemanual | daily | weekly | monthly
GET /v1/sellers/{acct}/balance, GET …/payoutsbalance and payouts
POST /v1/sellers/{acct}/payoutspay out now; past the day's limit: a nod

Agent cards Beta · a person's scope (payments:cards), not a team key's

EndpointWhat
POST /v1/cards, GET /v1/cards, GET …/{id}issue and read cards
PUT /v1/cards/{id}/controlsper transaction, day, month; categories; merchants; expiry; single use
POST /v1/cards/{id}/paythe payment tool; past the card's rules: a nod
POST /v1/cards/{id}/approvalshold a nod for one purchase
POST /v1/cards/{id}/viewa key for the issuer's frame, never the number
POST /v1/cards/{id}/freeze | unfreeze | cancel | replace
GET /v1/card-transactions?card|agent|personhistory

Not for team keys

Coupons and promotion codes (POST /v1/coupons, POST /v1/promotion-codes) are made by Ducat's operators. POST /v1/stripe/webhook is Stripe's alone. The MCP server at /mcp serves our own products' agents.

Shapes in full, with answers: the selling guide; each action's level and whose nod: Agents on Ducat.