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

# showUniversalCheckout

Availing Universal Checkout is as easy as implementing one line of code.
Note that there are more options which you have to set by passing your SDK settings in the [configure](/sdk/ios/v2.x.x/primer/methods/configure) function.
Please refer to the section below for more information.

```swift SWIFT theme={"dark"}
func showUniversalCheckout(clientToken:completion:)
```

## Parameters

<Expandable title="Parameters" defaultOpen>
  <ResponseField name="clientToken" type="string" required>
    Client token as returned by the [create client session](/checkout/client-session#create-a-client-session) call
  </ResponseField>

  <ResponseField name="completion" type="((Error?) -> Void)?" post={["optional"]}>
    The completion handler will notify you that the Universal Checkout has been
    presented, or that an error has occured.
  </ResponseField>
</Expandable>

## Example

Availing Universal Checkout is as easy as implementing one line of code:

```swift SWIFT theme={"dark"}
// 👇 Add this
import PrimerSDK

class MyViewController: UIViewController {

	// ...

	@IBAction func openUniversalCheckoutTapped(_ sender: Any) {
		// 👇 Add this
        Primer.shared.showUniversalCheckout(clientToken: clientToken) { err in
            if let err {
                // Handle the error
            }
        }
    }
}
```
