Skip to content

Getting Started

GitHub
Terminal window
bun add @capgo/capacitor-stripe-identity
bunx cap sync
import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.initialize({ publishableKey: 'publishable-key-123' });
import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.create({
verificationId: 'verification-id-123',
ephemeralKeySecret: 'ephemeral-key-secret',
});
import { StripeIdentity } from '@capgo/capacitor-stripe-identity';
await StripeIdentity.present();
  • Listeners: remove handles when screens unmount.
  • Initialize once: run setup during app bootstrap.
  • Source of truth: trust src/definitions.ts in the GitHub repo.

Create a VerificationSession on your backend, then pass the IDs to the plugin:

await StripeIdentity.initialize({ publishableKey: 'pk_test_...' });
await StripeIdentity.create({
verificationId: 'vs_...',
ephemeralKeySecret: 'ek_...',
clientSecret: 'vs_..._secret_...', // web only
});
await StripeIdentity.present();
Terminal window
git clone https://github.com/Cap-go/capacitor-stripe-identity.git
cd capacitor-stripe-identity/example-app
bun install
bun run start

This page documents the current public API from Cap-go/capacitor-stripe-identity.