5.5.2 • Published 23 days ago

@capacitor-community/stripe-identity v5.5.2

Weekly downloads
-
License
MIT
Repository
github
Last release
23 days ago

@capacitor-community/stripe-identity

Stripe Identity SDK bindings for Capacitor Applications.

Install

npm install @capacitor-community/stripe-identity
npx cap sync

Initialize Android

change base application theme to Theme.MaterialComponents.DayNight at res/values/styles.xml:

- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppTheme" parent="Theme.MaterialComponents.DayNight">

parent can be any MaterialComponents. See here for other options. see more details on Stripe's native Android SDK page here.

Initialize iOS

set up camera authorization by adding NSCameraUsageDescription in Info.plist and add a string value that explains the usage. see more details on Stripe's native iOS SDK page here.

Usage

If you want to implement, we recommend to read https://stripe.com/docs/identity .

import { StripeIdentity } from '@capacitor-community/stripe-identity';

// initialize is needed only for Web Platform
await StripeIdentity.initialize({
  publishableKey,
});

await StripeIdentity.create({
  ephemeralKeySecret,
  verificationId,
  // clientSecret is needed only for Web Platform
  clientSecret
});
const result = await StripeIdentity.present();

API

initialize(...)

initialize(options: InitializeIdentityVerificationSheetOption) => Promise<void>
ParamType
optionsInitializeIdentityVerificationSheetOption

create(...)

create(options: CreateIdentityVerificationSheetOption) => Promise<void>
ParamType
optionsCreateIdentityVerificationSheetOption

present()

present() => Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>

Returns: Promise<{ identityVerificationResult: IdentityVerificationSheetResultInterface; }>


addListener(IdentityVerificationSheetEventsEnum.Loaded, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
ParamType
eventNameIdentityVerificationSheetEventsEnum.Loaded
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(IdentityVerificationSheetEventsEnum.FailedToLoad, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.FailedToLoad, listenerFunc: (info: StripeIdentityError) => void) => Promise<PluginListenerHandle>
ParamType
eventNameIdentityVerificationSheetEventsEnum.FailedToLoad
listenerFunc(info: StripeIdentityError) => void

Returns: Promise<PluginListenerHandle>


addListener(IdentityVerificationSheetEventsEnum.Completed, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Completed, listenerFunc: () => void) => Promise<PluginListenerHandle>
ParamType
eventNameIdentityVerificationSheetEventsEnum.Completed
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(IdentityVerificationSheetEventsEnum.Canceled, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Canceled, listenerFunc: () => void) => Promise<PluginListenerHandle>
ParamType
eventNameIdentityVerificationSheetEventsEnum.Canceled
listenerFunc() => void

Returns: Promise<PluginListenerHandle>


addListener(IdentityVerificationSheetEventsEnum.Failed, ...)

addListener(eventName: IdentityVerificationSheetEventsEnum.Failed, listenerFunc: (info: StripeIdentityError) => void) => Promise<PluginListenerHandle>
ParamType
eventNameIdentityVerificationSheetEventsEnum.Failed
listenerFunc(info: StripeIdentityError) => void

Returns: Promise<PluginListenerHandle>


Interfaces

InitializeIdentityVerificationSheetOption

PropType
publishableKeystring

CreateIdentityVerificationSheetOption

PropTypeDescription
verificationIdstring
ephemeralKeySecretstring
clientSecretstringThis client secret is used only for the web platform.

PluginListenerHandle

PropType
remove() => Promise<void>

StripeIdentityError

PropType
messagestring

Type Aliases

IdentityVerificationSheetResultInterface

IdentityVerificationSheetEventsEnum.Completed | IdentityVerificationSheetEventsEnum.Canceled | IdentityVerificationSheetEventsEnum.Failed

Enums

IdentityVerificationSheetEventsEnum

MembersValue
Loaded'identityVerificationSheetLoaded'
FailedToLoad'identityVerificationSheetFailedToLoad'
Completed'identityVerificationSheetCompleted'
Canceled'identityVerificationSheetCanceled'
Failed'identityVerificationSheetFailed'
6.0.1

23 days ago

6.0.0

24 days ago

5.5.2

1 month ago

5.5.1

1 month ago

5.5.0

2 months ago

6.0.0-2

2 months ago

5.4.6

2 months ago

5.4.5

2 months ago

5.4.4

2 months ago

5.4.3

2 months ago

6.0.0-1

3 months ago

6.0.0-0

3 months ago

5.4.2

6 months ago

5.4.1

6 months ago

5.4.0

6 months ago

5.3.0

7 months ago

5.2.0

9 months ago

5.1.1

9 months ago

5.1.0

9 months ago

5.0.4

9 months ago

5.0.3

9 months ago

0.0.1

9 months ago