Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ export interface UniversalOpts {
toggles?: UniversalToggles
selectedPaymentMethod?: string
apmsOnClickValidation?: () => Promise<boolean>
onValidateSession?: (data: {
paymentMethodType: string
fundingType?: CardFunding
}) => Promise<boolean>
localizations?: {
[language: string]: LanguageLocalizationOverride
}
Expand Down Expand Up @@ -419,7 +423,8 @@ export enum EVENT_TYPES {
PAYMENT_PENDING_APPROVAL = 'payment_pending_approval',
SET_DISABLE_UI = 'set_disable_ui',
HEADLESS_READY = 'headless_ready',
FORM_VALIDATION_UPDATED = 'form_validation_update'
FORM_VALIDATION_UPDATED = 'form_validation_update',
CARD_FUNDING_TYPE_UPDATE = 'card_funding_type_update'
}

export type ListenerFn = (
Expand Down Expand Up @@ -653,6 +658,8 @@ export type PaymentMethod = {
supportedCardBrands?: CardBrand[]
}

export type CardFunding = 'prepaid' | 'debit' | 'credit' | 'charge'

export type ExistingCard = {
bin: string
brand: CardBrand
Expand All @@ -663,7 +670,7 @@ export type ExistingCard = {
expYear: string
last4: string
fingerprint: string
funding: 'prepaid' | 'debit' | 'credit' | 'charge'
funding: CardFunding
network: CardBrand
payout: string
cvvExists?: boolean
Expand Down