Docs
Quick start
- Sign up. Ducat makes your team, with you as its owner.
- In the console, open API keys and make a key. You get a client ID and a secret, and the secret is shown once. Keys are for test mode.
- Swap the key for a short-lived access token (client credentials, for Ducat's API):
curl -s https://auth.ducat.lunaor.com/token -u "$DUCAT_CLIENT_ID:$DUCAT_CLIENT_SECRET" \ -d grant_type=client_credentials -d resource=urn:payments:api - Call the API with it:
curl -s https://ducat.lunaor.com/v1/customers -H "authorization: Bearer $TOKEN" \ -H "content-type: application/json" -d '{"email": "buyer@example.com"}' - Send the customer to pay:
POST /v1/checkout-sessionswith the customer,mode,line_items,success_urlandcancel_url. Read it back withGET /v1/checkout-sessions/{id}until itspayment_statusispaid.
A key reads and writes your team's own customers, sessions, subscriptions, invoices, sellers and events, and nothing else. Every key of your team sees the same data, and no other team sees it. Charges, refunds and payouts past your standing limits answer 403 with a Nod challenge, which a person on your side approves.
Guides
- Agents on Ducat: What an agent may do through Ducat, each action's level, and whose nod it needs.
- How a product sells through Ducat: Plans, checkout, the plan switched on after payment, billing and webhooks.
The API
Base URL https://ducat.lunaor.com, JSON in and out, Authorization: Bearer <token> on every call. The endpoints are listed in Agents on Ducat, story by story.