跳过内容

开始使用

GitHub
终端窗口
bun add @capgo/capacitor-stripe-identity
bunx cap sync

导入

导入
import { StripeIdentity } from '@capgo/capacitor-stripe-identity';

验证流程

验证流程

在您的后端创建一个验证会话,然后将 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.git
cd capacitor-stripe-identity/example-app
bun install
bun run start

本页面记录了当前公开的API Cap-go/capacitor-stripe-identity.