Passport SDK v5.0
  • Overview
  • Account Lifecycle
  • Integration
    • Client Side Enablement
    • Credenza Presence (Optional Visual Elements)
    • Account Provisioning (Sign-up)
      • New Authentication System
      • Existing Authentication System - New Customer
      • Existing Authentication System - Existing Customer
  • Passport Subsequent Logins
  • Post-Login Capabilities
    • Account Information Access
    • Blockchain Wallet Access
  • Smart Contract Interactions
    • Instantiating The Contract Object (Server-Side)
    • Instantiating The Contract Object (Client-side)
    • Calling Contracts
  • Monetary Transactions
  • Appendix I: Passport Configuration Options
    • Magic
    • Ethers.js
    • Installation
    • Usage
    • Passport Instance Properties
    • Passport Static Properties
    • Modes
    • Supported query params
  • Transaction UI v3.0 (now part of Passport)
    • Magic
    • Ethers.js
    • Installation
    • Usage
    • Apple Pay
    • Google Pay
    • Methods
    • Events
  • Appendix II: MetaMembership Contract Access
  • Appendix III: Ledger Contract Access
  • Appendix IV: Decentralized Commerce Configuration
Powered by GitBook
LogoLogo

©2023 Credenza. All rights reserved.

On this page
  1. Transaction UI v3.0 (now part of Passport)

Usage

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

or

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
  }
})
PreviousInstallationNextApple Pay

Last updated 2 years ago