Broadleaf Microservices
  • v1.0.0-latest-prod

Payment Js Types

AuthState

Important information about the authentication state of the user.

Property Type Description

isAuthenticated?

boolean

Whether there is currently an authenticated user

isAuthenticating?

boolean

Whether authentication is in progress

getAccessToken

(options?: Record<string, unknown>) ⇒ Promise<string>

Method for fetching an access token for an authenticated user

customerId

string

The currently authenticated user’s customer ID

accountId

string

The currently authenticated user’s account ID

customerEmail

string

The currently authenticated user’s email address

isCsr?

boolean

Whether the user is a CSR

isAnonymousCsr?

boolean

Whether the CSR is impersonating a guest user

CardFormData

Defines the data used in credit card forms.

Property Type Description

customerPaymentAccountId?

string

undefined

Deprecated: In favor of #savedPaymentMethodId and using PaymentTransactionServices to store saved payment methods.

savedPaymentMethodId?

string

cardNumber

string

nameOnAccount

string

cardType?

CardType | string

expirationMonth

number

expirationYear

number

creditCardSecCode

string

savePaymentToCustomer?

boolean

undefined

Deprecated: In favor of #savePaymentForFutureUse to support owning user types other than a customer (i.e. account).

savePaymentForFutureUse?

boolean

amountToApply

number

CardType (Enum)

Name Value Description

VISA

'VISA'

MASTERCARD

'MASTERCARD'

AMEX

'AMEX'

DISCOVER

'DISCOVER'

CartState

Property Type Description

cart

Cart

guestToken?

GuestToken

resolving?

boolean