Erste Schritte
Kopiere einen Setup-Prompt mit den Installationsschritten und dem vollständigen Markdown-Guide für dieses 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-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.
Installieren
Abschnitt „Installation“bun add @capgo/capacitor-stripe-paybunx cap syncImportieren
Abschnitt mit dem Titel „Import“import { Stripe } from '@capgo/capacitor-stripe-pay';Quickstart
Abschnitt „Quick start“import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });Beispiel: handleURLCallback
Abschnitt mit dem Titel „Beispiel: handleURLCallback“import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });Häufige Stolperfallen
Abschnitt „Häufige Fallstricke“- Einmalige Initialisierung: Setup beim App-Bootstrap ausführen.
- Nativer Sync: ausführen
bunx cap syncnach Plugin-Upgrades. - Single Source of Truth: Vertrauen
src/definitions.tsim GitHub Repo.
Abonnements und In-App-Käufe
Abschnitt: „Abonnements und In-App-Käufe“Nutze für Abonnements und Berechtigungen im App Store / Play Store @capgo/native-purchases anstelle dieses Plugins.
Payment Sheet Flow
Abschnitt: „Payment Sheet Flow“await Stripe.initialize({ publishableKey: 'pk_test_...' });
await Stripe.createPaymentSheet({ paymentIntentClientSecret: 'pi_..._secret_...', merchantDisplayName: 'My Store',});
const result = await Stripe.presentPaymentSheet();Direktabrechnungen (Stripe Connect)
Abschnitt mit dem Titel „Direct Charges (Stripe Connect)“Übergeben stripeAccount auf initialize() oder pro createPaymentSheet() beim Erstellen von PaymentIntents auf einem Connected Account.
Beispiel-App
Abschnitt mit dem Titel „Beispiel-App“git clone https://github.com/Cap-go/capacitor-stripe-pay.gitcd capacitor-stripe-pay/example-appbun installbun run startSource of Truth
Abschnitt mit dem Titel „Source of Truth“Diese Seite dokumentiert die aktuelle öffentliche API von Cap-go/capacitor-stripe-pay.