initializeWithAPIKey

fun initializeWithAPIKey(context: Context, secretKey: String, publishableKey: String, accountId: String? = null, googlePayMerchantId: String? = null, debug: Boolean = false)

Initializes the Frame SDK. Call once from Application.onCreate before using any SDK component.

Parameters

context

The application context.

secretKey

Your Frame secret key (sk_...). Server-only — avoid shipping this in an app binary. The SDK emits a one-time warning whenever the secret key is used.

publishableKey

Your Frame publishable key (pk_...). Safe to embed in the app.

accountId

The Frame account this app run belongs to, if known at init. Used to attribute account events; leave null when the account isn't known yet (e.g. before onboarding creates one).

googlePayMerchantId

Optional Google Pay merchant identifier. Required to show the Google Pay button in checkout.

debug

When true, API requests and responses are logged to logcat.