スタートガイド
インストール手順と、このプラグインの完全なMarkdownガイドを含むセットアッププロンプトをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-stripe-identity`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/stripe-identity/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」セクションbun add @capgo/capacitor-stripe-identitybunx cap syncインポート
「インポート」セクションimport { StripeIdentity } from '@capgo/capacitor-stripe-identity';クイックスタート
「クイックスタート」セクションimport { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.initialize({ publishableKey: 'publishable-key-123' });例: create
セクション「Example: create」import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.create({ verificationId: 'verification-id-123', ephemeralKeySecret: 'ephemeral-key-secret',});例: present
セクション「Example: present」import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.present();よくある落とし穴
「よくある落とし穴」セクション- リスナー: 画面がアンマウントされたらハンドルを削除します。
- 一度だけ初期化: アプリの起動時にセットアップを実行します。
- 信頼できる情報源: 信頼
src/definitions.tsGitHub リポジトリ内。
本人確認フロー
「本人確認フロー」というタイトルのセクションバックエンドで VerificationSession を作成し、その ID をプラグインに渡します:
await StripeIdentity.initialize({ publishableKey: 'pk_test_...' });
await StripeIdentity.create({ verificationId: 'vs_...', ephemeralKeySecret: 'ek_...', clientSecret: 'vs_..._secret_...', // web only});
await StripeIdentity.present();サンプルアプリ
「サンプルアプリ」というタイトルのセクションgit clone https://github.com/Cap-go/capacitor-stripe-identity.gitcd capacitor-stripe-identity/example-appbun installbun run startSource of Truth
「Source Of Truth」セクションこのページでは、現在公開されている API について説明します。 Cap-go/capacitor-stripe-identity.