Skip to content

TokenFlightFiat Integration Kit

A self-hostable fiat-to-crypto backend you run on your own provider keys. One createFiat() call, mount it anywhere.

TokenFlight

What you get

Add @tokenflight/fiat to a service you control, call createFiat(...) once, and you have the full HTTP contract — /quote, /order, /order/{id}, /webhook/{provider}, /widget/{id} — plus a background driver that carries orders to completion. The SDK handles sealed quotes, order lifecycle, webhook verification, and settlement; you keep control of the keys, the state, and the deployment.

ts
import { createFiat } from "@tokenflight/fiat";

const fiat = createFiat({ providers, state, cors, quoteSecret });

await fiat.fetch(request, { env, ctx }); // HTTP contract
await fiat.cron({ limit: 50 }, { env, ctx }); // background driver

New here? Start with the Quickstart — a running service and your first order in a few minutes.

Go deeper