Panduan Memulai
Copy prompt setup berisi langkah install dan panduan markdown lengkap untuk plugin ini.
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 syncimport { Stripe } from '@capgo/capacitor-stripe-pay';Mulai cepat
Bagian berjudul “Mulai cepat”import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.initialize({ publishableKey: 'publishable-key-123' });Contoh: handleURLCallback
Bagian berjudul “Contoh: handleURLCallback”import { Stripe } from '@capgo/capacitor-stripe-pay';
await Stripe.handleURLCallback({ url: 'https://example.com' });Masalah umum
Bagian berjudul “Kesalahan umum”- Inisialisasi sekali saja: jalankan setup saat bootstrap aplikasi.
- Sinkronisasi native: jalankan
bunx cap syncsetelah upgrade plugin. - Sumber kebenaran: percaya
src/definitions.tspada repo GitHub.
Langganan dan pembelian dalam aplikasi
Bagian berjudul “Langganan dan pembelian dalam aplikasi”Untuk langganan dan hak akses App Store / Play Store, gunakan @capgo/native-purchases alih-alih plugin ini.
Alur Payment Sheet
Bagian berjudul “Alur 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)
Bagian berjudul “Direct Charges (Stripe Connect)”Teruskan stripeAccount on initialize() atau per createPaymentSheet() saat membuat PaymentIntents pada akun yang terhubung.
Aplikasi contoh
Bagian berjudul “Aplikasi contoh”git clone https://github.com/Cap-go/capacitor-stripe-pay.gitcd capacitor-stripe-pay/example-appbun installbun run startSumber Kebenaran
Bagian berjudul “Sumber Kebenaran”Halaman ini mendokumentasikan API publik saat ini dari Capgo/capacitor-stripe-pay.