Primeros pasos
Copia un prompt de configuración con los pasos de instalación y la guía completa en markdown para este plugin.
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.
Instalar
Sección titulada “Instalación”bun add @capgo/capacitor-stripe-identitybunx cap syncImportar
Sección titulada “Importar”import { StripeIdentity } from '@capgo/capacitor-stripe-identity';Inicio rápido
Sección titulada “Inicio rápido”import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.initialize({ publishableKey: 'publishable-key-123' });Ejemplo: crear
Sección titulada “Ejemplo: crear”import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.create({ verificationId: 'verification-id-123', ephemeralKeySecret: 'ephemeral-key-secret',});Ejemplo: presentar
Sección titulada “Ejemplo: presentar”import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.present();Errores comunes
Sección titulada “Errores comunes”- Listeners: elimina los handles cuando se desmonten las pantallas.
- Inicializa una vez: ejecuta setup durante el bootstrap de la app.
- Fuente de verdad: confianza
src/definitions.tsen el repo de GitHub.
Flujo de verificación
Sección titulada “Flujo de verificación”Crea una VerificationSession en tu backend y luego pasa los IDs al plugin:
await StripeIdentity.initialize({ publishableKey: 'pk_test_...' });
await StripeIdentity.create({ verificationId: 'vs_...', ephemeralKeySecret: 'ek_...', clientSecret: 'vs_..._secret_...', // web only});
await StripeIdentity.present();App de ejemplo
Sección titulada “App de ejemplo”git clone https://github.com/Cap-go/capacitor-stripe-identity.gitcd capacitor-stripe-identity/example-appbun installbun run startFuente de verdad
Sección titulada “Fuente de verdad”Esta página documenta la API pública actual de Capgo/capacitor-stripe-identity.