Skip to content

PublishableKeyPayload

Defined in: publishableKey.ts:22

The publishable key: st_pk_<env>_<base64url(JSON { organizationId, apiBase })>.

It is NOT a credential — it is an ADDRESS, and the docs must say so in the same paragraph that introduces it. It is decoded locally, with zero network, and collapses the two required provider props into one dashboard copy-paste. The read path is unauthenticated BY DESIGN; security lives in the origin registry (minting requires a verified origin registered to the paying org). We ship the key because one string is better onboarding than two, not because it protects anything. organizationId and apiBase remain as explicit props for self-hosted bases and stay the documented escape hatch — when both are given, the explicit props win.

Because the key is unsigned, an apiBase that arrives VIA a key is an unproven address: anyone can hand-encode a key pointing at their own host. Content fetches may follow it (they carry identity hashes, not secrets), but the signed mint token — a real spend credential — may not: the mint POST fires only for an explicit, first-party (*.sparkletree.io), or loopback apiBase (security review S-2; see isFirstPartyApiBase/maybeMint).

apiBase: string

Defined in: publishableKey.ts:24


organizationId: string

Defined in: publishableKey.ts:23