> For the complete documentation index, see [llms.txt](https://developer.credenza3.com/credenza-sdk-v5.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.credenza3.com/credenza-sdk-v5.0/transaction-ui-v3.0-now-part-of-passport/usage.md).

# Usage

```javascript
import {Passport} from '@credenza-web3/passport'
```

or

```javascript
const Passport = window.CredenzaPassport
const TransactionUI = window.CredenzaTUI
const passport = new Passport() // See passport docs for more...
await passport.init()

passport.openUI(Passport.pages.PAYMENT, {
  title: string,
  subtitle: string,
  payments?: {
    credenzaStoredValue?: {
        disabled?: boolean //default - false
    },
    stripe?: {
        disabled?: boolean // default - false
    }
  },
    // This will help credenza to get a price and figure out a token to be transferred
  token?: {
    // Should either have tokenId or typeId
    address: string, // contract address
    tokenId?: string, // token id if exists
    typeId?: string // if buying membership. If typeId === "0", API will treat it as a simple memberships purchase. If typeId > "0", ex. "1", "2", API will look for club memberships purchase.
    amount?: number  // amount of tokens if exists. For ERC721 either ignore it, or set 1. will be ignored for memberships purchase
  },
  email?: {
    templateId?: string // For custom email template usage
  }
})
```
