> ## 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.

# PrimerHeadlessUniversalCheckoutUIDelegate

## Overview

Set the `PrimerHeadlessUniversalCheckoutUIDelegate` in order to receive callbacks from Primer SDK about UI events.

### primerHeadlessUniversalCheckoutUIDidStartPreparation

This method will be called when the SDK starts preparing to tokenize the payment method.

```swift theme={"dark"}
func primerHeadlessUniversalCheckoutUIDidStartPreparation(for paymentMethodType: String)
```

### primerHeadlessUniversalCheckoutUIDidShowPaymentMethod

This method will be called when the payment method UI gets displayed.

```swift theme={"dark"}
func primerHeadlessUniversalCheckoutUIDidShowPaymentMethod(for paymentMethodType: String)
```
