Coinfat

Checkout SDK

Appearance & localization

Match the widget to your brand with an accent color and light/dark mode, and adapt its copy for your payers.

Theming

Pass a theme with an accent hex color and a mode of light, dark, or auto (the default, which follows the viewer's OS setting live).

Theme
coinfat.checkout({
invoice: ulid,
display: "inline",
mount: "#pay",
theme: {
accent: "#ff8201", // hex; overrides the store's brand_color as the accent
mode: "auto" // "light" | "dark" | "auto" (default) — follows the OS
}
});

Accent precedence: theme.accent → the store's brand_color → the default CoinFat orange.

Localization

Set locale to a BCP-47 tag. Only en ships today; an unknown tag falls back to English copy while Intl still formats the fiat amount for that tag. It's English-only today, localization-ready.

Use strings to override any individual payer-facing string, merged over the resolved locale. The exported englishStrings is the base to copy from.

Strings
import {Coinfat, englishStrings} from "@coinfat/checkout";
// englishStrings is the base set — copy keys from it to override.
coinfat.checkout({
invoice: ulid,
display: "inline",
mount: "#pay",
locale: "en",
strings: {
// override any individual payer-facing string
}
});