본문 바로가기

시작하기

GitHub
터미널 창
bun add @capgo/capacitor-stripe-pay
bunx cap sync
import { Stripe } from '@capgo/capacitor-stripe-pay';
import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });
import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });

자주 하는 실수

“흔한 실수” 섹션
  • 한 번만 초기화: 앱 부트스트랩 시 setup을 실행하세요.
  • 네이티브 동기화: 실행 bunx cap sync 플러그인 업그레이드 후.
  • 신뢰할 수 있는 소스: 신뢰 src/definitions.ts GitHub 레포지토리에서.

App Store / Play Store 구독 및 권한에는 다음을 사용하세요: @capgo/native-purchases 이 플러그인 대신 사용하세요.

await Stripe.initialize({ publishableKey: 'pk_test_...' });
await Stripe.createPaymentSheet({
paymentIntentClientSecret: 'pi_..._secret_...',
merchantDisplayName: 'My Store',
});
const result = await Stripe.presentPaymentSheet();

Direct Charges (Stripe Connect)

“Direct Charges (Stripe Connect)” 섹션

전달하세요: stripeAccount 켜짐 initialize() 또는 건당 createPaymentSheet() connected account에서 PaymentIntents를 생성할 때

터미널 창
git clone https://github.com/Cap-go/capacitor-stripe-pay.git
cd capacitor-stripe-pay/example-app
bun install
bun run start

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