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

Use cases

Marketplaces

When makers, creators or apps sell through your product, Ducat runs the money: each seller gets a connected account and Stripe's hosted onboarding, a buyer's payment goes to the seller with your fee kept, and the seller is paid out on their schedule.

Step by step

  1. Onboard a seller

    A connected account per seller, then a link to Stripe's onboarding form.

    POST /v1/sellers, POST /v1/sellers/{acct}/links

  2. Know when they can sell

    Read the seller's status: details submitted, charges and payouts enabled, what Stripe still needs.

    GET /v1/sellers/{acct}

  3. Take the buyer's payment

    A checkout session (or a charge) with seller: a destination charge, your fee kept.

    POST /v1/checkout-sessions

  4. Pay the seller

    On a schedule (daily, weekly, monthly, with delay_days) or now; past the day's limit, a nod.

    PUT /v1/sellers/{acct}/payout-schedule

  5. Refund fairly

    A refund takes the sale back from the seller, and your fee in proportion.

    POST /v1/refunds

In code

A buyer pays a seller through your checkout

TypeScript

// ducat(): the small fetch helper from the quickstart
const session = await ducat("POST", "/v1/checkout-sessions", {
  customer: buyerId,
  mode: "payment",
  seller: sellerAccount, // a destination charge: your fee is kept
  line_items: [{ price: priceId, quantity: 1 }],
  success_url: "https://your.app/orders/42",
  cancel_url: "https://your.app/cart",
});

Python

# ducat(): the small helper from the quickstart
session = ducat("POST", "/v1/checkout-sessions", {
    "customer": buyer_id,
    "mode": "payment",
    "seller": seller_account,  # a destination charge: your fee is kept
    "line_items": [{"price": price_id, "quantity": 1}],
    "success_url": "https://your.app/orders/42",
    "cancel_url": "https://your.app/cart",
})

curl

curl -s https://api.ducatpay.dev/v1/checkout-sessions \
  -H "authorization: Bearer $DUCAT_TOKEN" \
  -H "content-type: application/json" \
  -d '{"customer": "cus_…", "mode": "payment", "seller": "acct_…",
       "line_items": [{"price": "price_…", "quantity": 1}],
       "success_url": "https://your.app/orders/42", "cancel_url": "https://your.app/cart"}'

Good to know

Features it uses

Start building in test mode

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