Skip to main content
Before you can call most Tip Stack endpoints, you need to prove who you are. Tip Stack uses two complementary authentication patterns: session-based auth for user-facing flows (registration, login, profile, payouts) and API key auth for server-side SDK and embed integrations. This page walks you through both patterns and all of the related endpoints.

Two Auth Patterns


Register

Create a new Tip Stack account. A session is established immediately on success — you do not need a separate login call.

Request body

string
required
A valid email address. It must not already be registered on the platform.
string
required
Account password. Minimum 8 characters.
string
required
Display name for the account. Must be between 2 and 100 characters.

Response 200

boolean
true on a successful registration.
object
The newly created user record.
object
Session credentials.
Error responses

Login

Log in with an existing email and password. The server sets a session cookie and returns an access token.

Request body

string
required
The registered email address.
string
required
The account password.

Response 200

Returns the same user and auth shape as Register above, populated with your existing account data.
Error responses

Get Current User

Fetch the profile of the currently authenticated user. Use this to verify a session is still valid or to refresh user data in your application.
This endpoint requires a valid session cookie or Authorization: Bearer <accessToken> header. No request body is needed.

Response 200

boolean
true when the session is valid.
object
Full profile of the authenticated user.
Error responses

OTP (Email Code) Login

Tip Stack supports a passwordless login flow using a one-time code sent to the user’s email. Use this as an alternative to password-based login, or as a fallback for users who have not set a password.
1

Send the code

Post the user’s email to start the OTP flow. Tip Stack generates a 6-digit code that expires in 10 minutes and emails it to the address.
string
required
The email address to send the one-time code to.
Response 200
2

Verify the code

Submit the email and the 6-digit code the user received. On success, Tip Stack creates a session and returns the same user and auth payload as a standard login.
string
required
The same email address used in /auth/otp/start.
string
required
The 6-digit one-time code from the email.
Response 200
Each one-time code is valid for 10 minutes. After a successful verification the code is immediately invalidated and cannot be reused.

SDK API Key Auth

SDK endpoints (/sdk/init, /sdk/tip, /sdk/events) are designed for server-side integrations and embedded widgets. They do not use session cookies. Instead, pass your API key as a Bearer token on every request.
You can find your API key in your creator dashboard under Settings → API Keys.
Never expose your API key in client-side JavaScript. Make all /sdk/init calls from your backend only — the key grants full SDK access on your behalf.
SDK endpoints validate your API key server-side. Use a key generated from your dashboard — do not share it publicly or commit it to version control.

Initializing an SDK session

Call /sdk/init from your backend to create a short-lived session token for a tipping widget embed. Pass the token to your frontend instead of your raw API key.
string
required
The creator’s wallet address, .sol domain, or UUID (prefixed with auth_).
string
required
The URL of the page embedding the widget. This must match a domain you have whitelisted in your creator dashboard. localhost and 127.0.0.1 are always permitted for local development.
string
Widget theme. Defaults to "dark". Pass "light" for a light theme.
Response 200
string
A short-lived token in the format sdk_sess_<uuid>. Use this as the Bearer value for /sdk/tip calls from the frontend.
object
Widget configuration to pass to the embedded client.

Using the session token

Once your backend has received a sessionToken from /sdk/init, pass it to your frontend and use it as the Bearer token for /sdk/tip calls:
Treat sessionToken values as short-lived and single-use. Re-initialize a session by calling /sdk/init again from your backend whenever you render a new embed instance.