본문 바로가기

시작하기

GitHub
터미널 창
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();

자주 하는 실수

“흔한 실수” 섹션
  • 리스너: 화면이 언마운트될 때 핸들을 제거합니다.
  • 한 번만 초기화: 앱 부트스트랩 시 setup을 실행하세요.
  • 신뢰할 수 있는 소스: 신뢰 src/definitions.ts GitHub 레포지토리에서.

백엔드에서 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.git
cd capacitor-stripe-identity/example-app
bun install
bun run start

이 페이지는 다음 저장소의 현재 공개 API을 다룹니다: Capgo/capacitor-stripe-identity.