Documentation

The essentials for integrating MintFlow into your product

Quick Start
Launch a prefilled mint flow
API Reference
Admin + partner integration surface
Examples
URL templates + signing patterns

Getting Started

MintFlow is designed to be URL-driven: partners can send users into the mint wizard with a prefilled template and (optionally) receive a return redirect after mint completion.

URL Templates

You can prefill the wizard via an init query param (base64url JSON). This is the primary integration mechanism for products that want to delegate minting UX to MintFlow.

Build a Prefilled Link
init
// init is base64url(JSON.stringify(payload))
const payload = {
  version: 1,
  collectionName: "Jamify - Album Drop",
  description: "Limited album edition with perks",
  returnTo: "https://partner.example.com/mintflow/callback?album=abc123",
};

const init = Buffer.from(JSON.stringify(payload), "utf8")
  .toString("base64")
  .replace(/\+/g, "-")
  .replace(/\//g, "_")
  .replace(/=+$/g, "");

const url = `${process.env.NEXT_PUBLIC_MINTFLOW_URL}/mint?init=${init}`;

Admin Access

MintFlow admin routes and admin APIs require a Sigma access token whose JWT payload includes a role claim containing admin.

If you are unexpectedly seeing 403, ensure your Sigma auth server is issuing role claims for this OAuth client (via the Better Auth admin + sigma admin plugins).

Partner Cosign (Server-to-Server)

For partner integrations that need a trusted “second signer” in the mint pipeline, MintFlow supports a partner cosign endpoint and calls it using bitcoin-auth (BRC-77) with SIGMA_MEMBER_PRIVATE_KEY.

Cosign Request
bitcoin-auth
POST /api/cosign

{
  "partnerId": "partner_123",
  "rawTx": "<hex>",
  "targetVout": 0
}

// Requires admin Bearer token (Sigma role=admin).
// MintFlow will call the partner's cosign URL with a Bitcoin-Auth-Token header.

Need Help?

If you want help wiring a partner init template, return redirects, or cosigning, reach out and we’ll help you choose the right integration pattern.