スタートガイド
インストール手順と、このプラグインの完全なMarkdownガイドを含むセットアッププロンプトをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-stripe-pay`
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-pay/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.
インストール
「インストール」セクションbun add @capgo/capacitor-stripe-paybunx cap syncインポート
「インポート」セクションimport { Stripe } from '@capgo/capacitor-stripe-pay';クイックスタート
「クイックスタート」セクションimport { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });例: handleURLCallback
「例: handleURLCallback」というセクションimport { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });よくある落とし穴
「よくある落とし穴」セクション- 一度だけ初期化: アプリの起動時にセットアップを実行します。
- ネイティブ同期: 実行
bunx cap syncプラグインのアップグレード後。 - 信頼できる情報源: 信頼
src/definitions.tsGitHub リポジトリ内。
サブスクリプションとアプリ内課金
「サブスクリプションとアプリ内課金」セクションApp Store / Play Store のサブスクリプションや権利(entitlements)については、以下を使用してください: @capgo/native-purchases 本プラグインの代わりに、
Payment Sheetのフロー
「Payment Sheet のフロー」セクション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() 接続済みアカウントで PaymentIntents を作成する際。
サンプルアプリ
「サンプルアプリ」というタイトルのセクションgit clone https://github.com/Cap-go/capacitor-stripe-pay.gitcd capacitor-stripe-pay/example-appbun installbun run startSource of Truth
「Source Of Truth」セクションこのページでは、現在公開されている API について説明します。 Capgo/capacitor-stripe-pay.