zuuppaDEV
Swift SDK

Configuration

ZuuppaConfig tells the SDK which backend and auth project to use. It defaults to Zuuppa production, so most apps never construct it — you just pass an eventId and the shared .default is used.

swift
public struct ZuuppaConfig: Sendable {
    public var apiBaseURL: URL          // Zuuppa API server
    public var supabaseURL: URL         // Supabase project (buyer auth)
    public var supabaseAnonKey: String  // Supabase publishable ("anon") key

    public init(apiBaseURL: URL, supabaseURL: URL, supabaseAnonKey: String)

    public static let `default`: ZuuppaConfig
}
ParameterTypeDescription
apiBaseURLURLBase URL of the Zuuppa API server.
supabaseURLURLBase URL of the Supabase project used for the buyer's OTP sign-in.
supabaseAnonKeyStringSupabase publishable ("anon") key. This is a client-side value and safe to embed.
The Supabase project in your config must match the one the API server validates buyer tokens against. Using a different project makes the server reject the buyer’s token during checkout. Unless you have a reason to change it, leave config as .default.

Using the default

The default is applied automatically — these two are equivalent:

swift
ZuuppaTicketsScreen(eventId: "evt-uuid")
ZuuppaTicketsScreen(eventId: "evt-uuid", config: .default)

Overriding (e.g. staging)

swift
let staging = ZuuppaConfig(
    apiBaseURL: URL(string: "https://staging.api.zuuppa.com")!,
    supabaseURL: URL(string: "https://your-project.supabase.co")!,
    supabaseAnonKey: "sb_publishable_..."
)

ZuuppaTicketsScreen(eventId: "evt-uuid", config: staging)

Theming

There is no theming field. The SDK renders in dark mode and derives its accent color from the event’s accentColor returned by the backend, so the flow automatically matches each event.

Next

→ API reference