Per iniziare
Copia un prompt di configurazione con i passaggi di installazione e la guida markdown completa per questo 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.
bun add @capgo/capacitor-stripe-paybunx cap syncImporta
Sezione intitolata “Import”import { Stripe } from '@capgo/capacitor-stripe-pay';Avvio rapido
Sezione intitolata “Quick start”import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });Esempio: handleURLCallback
Sezione intitolata “Esempio: handleURLCallback”import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });Errori comuni
Sezione intitolata “Errori comuni”- Inizializza una volta: esegui il setup durante il bootstrap dell'app.
- Sync nativo: esegui
bunx cap syncdopo gli aggiornamenti dei plugin. - Fonte di verità: fidati
src/definitions.tsnel repo GitHub.
Abbonamenti e acquisti in-app
Sezione intitolata “Abbonamenti e acquisti in-app”Per abbonamenti ed entitlement su App Store / Play Store, usa @capgo/native-purchases invece di questo plugin.
Flusso Payment Sheet
Sezione intitolata “Flusso Payment Sheet”await Stripe.initialize({ publishableKey: 'pk_test_...' });
await Stripe.createPaymentSheet({ paymentIntentClientSecret: 'pi_..._secret_...', merchantDisplayName: 'My Store',});
const result = await Stripe.presentPaymentSheet();Addebiti diretti (Stripe Connect)
Sezione intitolata “Direct Charges (Stripe Connect)”Passa stripeAccount su initialize() o tramite createPaymentSheet() quando si creano PaymentIntents su un account connesso.
App di esempio
Sezione intitolata “App di esempio”git clone https://github.com/Cap-go/capacitor-stripe-pay.gitcd capacitor-stripe-pay/example-appbun installbun run startFonte di verità
Sezione intitolata “Fonte di verità”Questa pagina documenta l'attuale API pubblico di Capgo/capacitor-stripe-pay.