开始使用
复制一个包含安装步骤和本插件的完整Markdown指南的设置命令。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-stripe-terminal`
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-terminal/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-terminalbunx cap sync导入
标题:导入import { StripeTerminal } from '@capgo/capacitor-stripe-terminal';后端要求
标题:后端要求Stripe Terminal 需要一个安全的后端端点来创建连接令牌。将该 URL 传递给 initialize().
await StripeTerminal.initialize({ tokenProviderEndpoint: 'https://api.example.com/stripe/terminal/connection-token', isTest: true,});
await StripeTerminal.discoverReaders({ type: 'tap-to-pay' });示例应用
标题:示例应用git clone https://github.com/Cap-go/capacitor-stripe-terminal.gitcd capacitor-stripe-terminal/example-appbun installbun run start本页面记录了当前公共的 API 从 Cap-go/capacitor-stripe-terminal.