Skip to main content
Call this endpoint from your server before rendering a tipping widget. It authenticates your API key against a specific creator, validates that the embedding origin is on your whitelist, and returns a short-lived session token plus a ready-to-use embedUrl for the checkout iframe.
Call /sdk/init from your server, not from client-side JavaScript. Your API key must never be exposed in the browser.

Endpoint

Authentication

Pass your API key as a Bearer token in the Authorization header.

Request Body

string
required
The creator’s wallet address, SNS handle (e.g. alice.sol), or Tip Stack user ID. The API resolves all three formats automatically.
string
required
The full origin of the site embedding the widget — for example, https://myblog.com. This value is checked against the list of domains you have whitelisted in your creator dashboard. localhost and 127.0.0.1 origins are allowed automatically for local development.
string
default:"dark"
Visual theme for the rendered iframe. Accepted values: dark or light.

Response

boolean
true when the session was created successfully.
string
A short-lived session token in the format sdk_sess_<uuid>. Pass this as the Bearer token on subsequent calls to POST /sdk/tip.
object

Origin Security

When you call /sdk/init, the server checks the originUrl you provide against the whitelisted domains stored in your creator account. If the origin is not found, the request is rejected with 403 Unauthorized Origin. Add domains in your Creator Dashboard → Embed Settings → Allowed Origins.
During development, localhost and 127.0.0.1 are always allowed regardless of your whitelist, so you can prototype locally without any configuration changes.
The checkout widget is served with clickjacking protections scoped to your whitelisted originUrl, so only your approved domains can frame it.

Example

Request

Response

Error Responses