API
Public methods, result types, error types, and events that @capacitor/docgen resolves from @capacitor-community/stripe-identity v8.2.1.
addListener is generated for the three supported event names: Loaded, FailedToLoad, and VerificationResult. Completed, Canceled, and Failed are values of IdentityVerificationResult.result (IdentityVerificationSheetResultInterface). They are not separately supported addListener overloads.
Methods
method initialize(...)
Initializes Stripe Identity. Call this before create() on web.
initialize(options: InitializeIdentityVerificationSheetOption) => Promise<void>
method create(...)
Creates an Identity VerificationSheet from credentials generated by your
server. Wait for this Promise or the Loaded event before present().
create(options: CreateIdentityVerificationSheetOption) => Promise<void>
method present()
Presents the VerificationSheet created by create(). Listen for
VerificationResult to distinguish completed, canceled, and failed flows.
present() => Promise<void>
method addListener(IdentityVerificationSheetEventsEnum.Loaded, ...)
Emitted when the VerificationSheet is ready to present.
addListener(eventName: IdentityVerificationSheetEventsEnum.Loaded, listenerFunc: () => void) => Promise<PluginListenerHandle>
method addListener(IdentityVerificationSheetEventsEnum.FailedToLoad, ...)
Emitted when the VerificationSheet could not be created.
addListener(eventName: IdentityVerificationSheetEventsEnum.FailedToLoad, listenerFunc: (info: StripeIdentityError) => void) => Promise<PluginListenerHandle>
method addListener(IdentityVerificationSheetEventsEnum.VerificationResult, ...)
Emitted when the presented verification flow finishes.
addListener(eventName: IdentityVerificationSheetEventsEnum.VerificationResult, listenerFunc: (result: IdentityVerificationResult) => void) => Promise<PluginListenerHandle>
Interfaces
interface InitializeIdentityVerificationSheetOption
| Prop | Type | Description | Since |
|---|---|---|---|
publishableKey |
string |
Stripe publishable key used by the web Identity SDK. Native platforms accept this option for API parity but initialize Identity from the verification session credentials supplied to create(). |
5.4.0 |
interface CreateIdentityVerificationSheetOption
| Prop | Type | Description | Since |
|---|---|---|---|
verificationId |
string |
ID of the VerificationSession created by your server. Required on iOS and Android. | 5.0.3 |
ephemeralKeySecret |
string |
Ephemeral-key secret scoped to the VerificationSession. Required on iOS and Android and must be returned by your server. | 5.0.3 |
clientSecret |
string |
Client secret of the VerificationSession. Required on web and ignored by the native Identity SDKs. | 5.4.0 |
interface IdentityVerificationResult
| Prop | Type | Description | Since |
|---|---|---|---|
result |
IdentityVerificationSheetResultInterface |
Final state of the presented verification flow. | 4.2.0 |
error |
StripeIdentityError |
Error details when result is Failed. |
4.2.0 |
interface StripeIdentityError
| Prop | Type | Description | Since |
|---|---|---|---|
code |
string |
Stripe error code when one is available. | 5.1.0 |
message |
string |
Human-readable error message suitable for logging or display. | 5.1.0 |
interface PluginListenerHandle
| Prop | Type |
|---|---|
remove |
() => Promise<void> |
Type aliases
type alias IdentityVerificationSheetResultInterface
IdentityVerificationSheetEventsEnum.Completed | IdentityVerificationSheetEventsEnum.Canceled | IdentityVerificationSheetEventsEnum.Failed
Enums
enum IdentityVerificationSheetEventsEnum
| Member | Value |
|---|---|
Loaded |
'identityVerificationSheetLoaded' |
FailedToLoad |
'identityVerificationSheetFailedToLoad' |
Completed |
'identityVerificationSheetCompleted' |
Canceled |
'identityVerificationSheetCanceled' |
Failed |
'identityVerificationSheetFailed' |
VerificationResult |
'identityVerificationResult' |