API

Your own site, on the Typetin API.

A foundry with a site it likes can keep it. The site reads the catalogue, orders, licences and customers through the API and is told about each sale by webhook. Typetin does the checkout, the delivery and the licence records behind it.

Typetin hasn’t launched. What this page describes is built and in testing, and it isn’t open to foundries.

What the API reads

What each scope of an API key covers
ScopeWhat it covers
CatalogueTypefaces, fonts with their prices, and licence presets. Never the font files.
OrdersOrders with their lines, and the licences issued from them.
CustomersCustomers. Without it, an order comes back with no email, licensee or billing address.
WebhooksThe addresses your webhooks are sent to: listing, adding and removing them.

The API is read-only apart from the webhook addresses. Lists come 25 at a time, or up to 100 if you ask, with a cursor for the next page. A list can be narrowed to what has changed since a given time, and orders can be filtered by status.

It’s versioned by date and described in an OpenAPI 3.1 document that the API serves itself.

API keys and scopes

A key is shown once, when you make it. Typetin stores only its hash. Each key carries the scopes you give it, and no scope includes another. You can hold 25 live keys and give each an expiry date, up to two years out.

Requests are rate-limited per key, and a refused request says how long to wait.

Webhooks for paid and refunded orders

There are two events: one when an order is paid and one when it’s refunded. Each delivery is signed with HMAC-SHA256 over a timestamp and the body, so your site can check it and refuse an old one. A delivery carries no buyer details. Your site fetches those with a key that has the customers scope.

You can register up to 10 addresses. Each must be HTTPS and has 10 seconds to answer. A delivery that fails is retried, 8 attempts in all over about 45 hours, and you can resend one by hand from the admin. Orders paid before you registered your first address aren’t sent.

Outside the API

The API has no endpoints for royalty statements, quotes, discounts or EULA text. Those are in the admin.

The API starts on the Foundry plan. What each plan includes.

The rest of the back office

  • Licensing: licence tiers, terms, renewals and quotes.
  • EULAs: the version each buyer accepted, on every order.
  • Royalties: each designer’s share of every sale.
  • Fingerprinting: a signed record in every font you deliver.
  • Hosted webfonts: licensed domains and pageview counts.

Pricing has what each plan includes, and the roadmap has where every feature stands.