Zum Inhalt springen

Erste Schritte

GitHub
Terminalfenster
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' });
  • Einmalige Initialisierung: Setup beim App-Bootstrap ausführen.
  • Nativer Sync: ausführen bunx cap sync nach Plugin-Upgrades.
  • Single Source of Truth: Vertrauen src/definitions.ts im GitHub Repo.

Nutze für Abonnements und Berechtigungen im App Store / Play Store @capgo/native-purchases anstelle dieses Plugins.

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

Übergeben stripeAccount auf initialize() oder pro createPaymentSheet() beim Erstellen von PaymentIntents auf einem Connected Account.

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

Diese Seite dokumentiert die aktuelle öffentliche API von Cap-go/capacitor-stripe-pay.