Authentication

v1 API keys, test and live mode, and the scopes a key holds.

v1 API keys

Create keys in the dashboard under Developers › API keys. Each key belongs to one workspace and one mode, which it shows in its prefix:

PrefixMode
fgs_testTest mode: test data only, no real money moves.
fgs_liveLive mode: real orders and payments.

Send the key in the Authorization header on every request:

curl https://api.fungies.io/v1/products \
  -H "Authorization: Bearer $FUNGIES_API_KEY"

Store the key as a secret on your server; never put it in a browser, an app you ship, or a URL. A request that carries a key in its URL is refused with KEY_IN_URL: roll that key. You can roll or revoke a key at any time in the dashboard.

Test mode and live mode

The mode is the key's, never a parameter. A test key sees only test data, and a live key only live data: an id from the other mode answers as not found. Build against a test key, then swap in a live key once your store is activated. Test mode and live mode covers what each mode keeps apart.

Scopes

A key holds the scopes you give it. Each reference page names the scope its call needs; a key without it is refused with KEY_SCOPE_MISSING. Write never implies read: give a key both when it needs both.

Scope familyCovers
catalogueProducts, variants, offers and their keys, discounts, tags, image uploads
ordersOrders: their breakdown, documents, disputes, refund preview and downloads
customersCustomers and their purchases
subscriptionsSubscriptions: cancel, pause, end a trial
chargesOff-session charges, charge schedules, checkout sessions and tax calculations
usageUsage meters and usage events
webhooksWebhook endpoints, test events and delivery retries

Each family has a :read and a :write scope, such as orders:read. The webhook calls, reads included, need webhooks:write. GET /v1/whoami answers with any scope.

MCP

A key can also serve the MCP server when MCP is turned on for it. MCP takes test-mode keys only for now.

Last updated