API
@capacitor/docgen が @capacitor-community/stripe-identity v8.2.1 から解決した公開メソッド、結果型、エラー型、イベントの一覧です。
addListener は、対応する3つのイベント名 Loaded、FailedToLoad、VerificationResult に対して生成されます。Completed、Canceled、Failed は IdentityVerificationResult.result(IdentityVerificationSheetResultInterface)の値であり、個別の addListener オーバーロードではありません。
メソッド
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>
インターフェース
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 alias IdentityVerificationSheetResultInterface
IdentityVerificationSheetEventsEnum.Completed | IdentityVerificationSheetEventsEnum.Canceled | IdentityVerificationSheetEventsEnum.Failed
列挙型
enum IdentityVerificationSheetEventsEnum
| Member | Value |
|---|---|
Loaded |
'identityVerificationSheetLoaded' |
FailedToLoad |
'identityVerificationSheetFailedToLoad' |
Completed |
'identityVerificationSheetCompleted' |
Canceled |
'identityVerificationSheetCanceled' |
Failed |
'identityVerificationSheetFailed' |
VerificationResult |
'identityVerificationResult' |