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

Features

Invoices Available in test mode

Subscriptions make invoices; Ducat lists a customer's with their number, status, total and Stripe's hosted page and PDF, so your billing page needs no Stripe code of its own.

What it does

Ready for a billing page

number, status, total, currency, created, hosted_invoice_url and invoice_pdf on each, paged with a cursor.

Pay now

Try the customer's card on an open invoice straight away (past your limit, a nod).

Credit notes

Preview and issue a credit note on an invoice, by line or amount, refunded or left on the customer's balance; list and void them.

Tax per line

With tax on, each invoice line carries its tax, worked out by Stripe Tax.

In code

A customer's last ten invoices

TypeScript

// ducat(): the small fetch helper from the quickstart (/docs/quickstart)
const { invoices, next } = await ducat("GET", `/v1/customers/${cus}/invoices?limit=10`);
for (const i of invoices) {
  console.log(i.number, i.status, i.total, i.currency, i.hosted_invoice_url);
}

Python

# ducat(): the small helper from the quickstart (/docs/quickstart)
page = ducat("GET", f"/v1/customers/{cus}/invoices?limit=10")
for i in page["invoices"]:
    print(i["number"], i["status"], i["total"], i["currency"], i["hosted_invoice_url"])

curl

curl -s "https://api.ducatpay.dev/v1/customers/cus_…/invoices?limit=10" \
  -H "authorization: Bearer $DUCAT_TOKEN"
Invoices endpoints
EndpointWhat
GET /v1/customers/{id}/invoiceslimit, after: paged
GET /v1/invoices/{id}one invoice
POST /v1/invoices/{id}/paytry the card now
POST /v1/credit-notes/preview, POST /v1/credit-notesinvoice, lines or amount, to: refund or balance
GET /v1/credit-notes, POST /v1/credit-notes/{id}/voidlist by customer or invoice; void

Good to know

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

Related: Subscriptions, Customer portal, Tax

More features

Start building in test mode

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