Prise en main
Copiez un prompt de configuration incluant les étapes d'installation et le guide markdown complet pour ce 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.
Installer
Section intitulée « Installation »bun add @capgo/capacitor-stripe-paybunx cap syncImporter
Section intitulée « Import »import { Stripe } from '@capgo/capacitor-stripe-pay';Démarrage rapide
Section intitulée « Démarrage rapide »import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });Exemple : handleURLCallback
Section intitulée « Exemple : handleURLCallback »import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });Erreurs courantes
Section intitulée « Erreurs courantes »- Initialiser une seule fois: exécutez le setup lors du bootstrap de l'app.
- Sync native : exécuter
bunx cap syncaprès les mises à jour du plugin. - Source de vérité : fiez-vous
src/definitions.tsau repo GitHub.
Abonnements et achats in-app
Section intitulée « Abonnements et achats in-app »Pour les abonnements et droits App Store / Play Store, utilisez @capgo/native-purchases au lieu de ce plugin.
Parcours Payment Sheet
Section intitulée « Parcours Payment Sheet »await Stripe.initialize({ publishableKey: 'pk_test_...' });
await Stripe.createPaymentSheet({ paymentIntentClientSecret: 'pi_..._secret_...', merchantDisplayName: 'My Store',});
const result = await Stripe.presentPaymentSheet();Paiements directs (Stripe Connect)
Section intitulée « Direct Charges (Stripe Connect) »Passer stripeAccount sur initialize() ou par createPaymentSheet() lors de la création de PaymentIntents sur un compte connecté.
App d'exemple
Section intitulée « Application d’exemple »git clone https://github.com/Cap-go/capacitor-stripe-pay.gitcd capacitor-stripe-pay/example-appbun installbun run startSource de vérité
Section intitulée « Source de vérité »Cette page documente l’API public actuel de Cap-go/capacitor-stripe-pay.