Skip to main content

Documentation Index

Fetch the complete documentation index at: https://primer.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

This method allows you get a new instance of KlarnaComponent to manage payments for Klarna.
KOTLIN
fun provideKlarnaComponent(primerSessionIntent: PrimerSessionIntent): KlarnaComponent

Parameters

Returns

An instance of KlarnaComponent.

Example

KOTLIN
class CheckoutActivity : AppCompatActivity() {
  // 👇 Add this
  private val klarnaComponent by lazy {
	PrimerHeadlessUniversalCheckoutKlarnaManager(viewModelStoreOwner = this)
            .provideKlarnaComponent(primerSessionIntent = PrimerSessionIntent.CHECKOUT)
  }
}