{"_id":"@bizup-pay/client","_rev":"2-a20eb1d35aebf505afc69971f1f79d95","name":"@bizup-pay/client","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@bizup-pay/client","version":"0.1.0","keywords":["payments","israel","browser","iframe","modal","bizup-pay"],"author":{"name":"BizUp.dev"},"license":"MIT","_id":"@bizup-pay/client@0.1.0","maintainers":[{"name":"bizup","email":"cto@bizup.dev"}],"homepage":"https://pay.bizup.dev","bugs":{"url":"https://github.com/bizup-dev/bizup-pay/issues"},"dist":{"shasum":"d1e97ca9a1120cc553753e65a839340562e9f48e","tarball":"https://registry.npmjs.org/@bizup-pay/client/-/client-0.1.0.tgz","fileCount":13,"integrity":"sha512-ZGC0GURhC4CWACI8kJAACIyveuwgmc5xLMWyrs6SeHL/pR0BrkLQoAzFnjM0DGVuRZpOGGTmsblm2+HBgCuf5g==","signatures":[{"sig":"MEUCIH4UveNAjq4dVC31NbDrM1nbXHpxDvOg+XOSpkKkeHuFAiEA2+e3awp8OAqNbVcsv7CLBN0kchiTrEEIrT0ghbzGVW8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11375},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"43387d94b469c52078110f1f235f51b05e51465e","scripts":{"test":"vitest run","build":"tsc"},"_npmUser":{"name":"bizup","email":"cto@bizup.dev"},"repository":{"url":"git+https://github.com/bizup-dev/bizup-pay.git","type":"git","directory":"packages/client"},"_npmVersion":"11.6.2","description":"Browser SDK for BizUp Pay — iframe, modal, and redirect payment mounting","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@bizup-pay/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/client_0.1.0_1774174390698_0.9077020010987411","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bizup-pay/client","version":"0.1.1","description":"Browser SDK for BizUp Pay — iframe, modal, and redirect payment mounting","author":{"name":"BizUp.dev"},"license":"MIT","homepage":"https://pay.bizup.dev","repository":{"type":"git","url":"git+https://github.com/bizup-dev/bizup-pay.git","directory":"packages/client"},"bugs":{"url":"https://github.com/bizup-dev/bizup-pay/issues"},"keywords":["payments","israel","browser","iframe","modal","bizup-pay"],"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"engines":{"node":">=20"},"scripts":{"build":"tsc","test":"vitest run"},"dependencies":{"@bizup-pay/core":"0.1.1"},"gitHead":"25b25a715e969f1ba3b483f866d8cdbb82908579","_id":"@bizup-pay/client@0.1.1","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-nJBmAvsqYd9OTbc8p9efK+CeoggkhwE5Glv5DMhDAHYih+/D1Hcl3/HyWVVtnGqAymLPQZ9WyXjqQT2L6q0qTQ==","shasum":"75df3f1eede0b892cfcb750ff3304b84980bde64","tarball":"https://registry.npmjs.org/@bizup-pay/client/-/client-0.1.1.tgz","fileCount":14,"unpackedSize":13827,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+r1LXjVym9W4D28XEdeBi1HxxCmYTVPLXmOPt4nTs9QIgSDNNK5gCfTcQCaSUGaGO0/hGfTNge4uqYwXOOnkjCOw="}]},"_npmUser":{"name":"bizup","email":"cto@bizup.dev"},"directories":{},"maintainers":[{"name":"bizup","email":"cto@bizup.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/client_0.1.1_1774349965775_0.5433669065748972"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-22T10:13:10.608Z","modified":"2026-03-24T10:59:26.058Z","0.1.0":"2026-03-22T10:13:10.927Z","0.1.1":"2026-03-24T10:59:25.917Z"},"bugs":{"url":"https://github.com/bizup-dev/bizup-pay/issues"},"author":{"name":"BizUp.dev"},"license":"MIT","homepage":"https://pay.bizup.dev","keywords":["payments","israel","browser","iframe","modal","bizup-pay"],"repository":{"type":"git","url":"git+https://github.com/bizup-dev/bizup-pay.git","directory":"packages/client"},"description":"Browser SDK for BizUp Pay — iframe, modal, and redirect payment mounting","maintainers":[{"name":"bizup","email":"cto@bizup.dev"}],"readme":"# @bizup-pay/client\n\nBrowser SDK for [BizUp Pay](https://pay.bizup.dev) — one SDK for every Israeli payment provider.\n\n> Write payment code once. Swap providers by changing one line of config. TypeScript-first, framework-agnostic, production-ready.\n\n## What This Package Does\n\n`@bizup-pay/client` is the browser-side companion to BizUp Pay. After your server creates a payment session, this package mounts the provider's payment page in your frontend — as an **iframe**, **modal**, or **redirect** — and handles the `postMessage` communication back to your app.\n\nWorks with any frontend framework (React, Vue, Svelte, vanilla JS) or no framework at all.\n\n## How It Fits Together\n\nA typical BizUp Pay integration uses three packages:\n\n| Package | Role |\n|---------|------|\n| **`@bizup-pay/core`** | Shared types, provider interface, factory (server-side) |\n| **`@bizup-pay/client`** | Browser SDK — mounts payment pages (this package) |\n| **Provider adapter** | Connects to a specific gateway: `@bizup-pay/morning`, `@bizup-pay/cardcom`, `@bizup-pay/icount`, or `@bizup-pay/grow` |\n\nThe client package works with **any** provider — when you switch providers on the server, the frontend code stays the same.\n\n## Install\n\n```bash\nnpm install @bizup-pay/client\n```\n\nOr use via CDN:\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@bizup-pay/client/dist/index.js\"></script>\n```\n\n## Quick Start\n\n```typescript\nimport { mountPayment } from '@bizup-pay/client'\n\n// After your server returns a session with a pageUrl:\nconst result = await mountPayment({\n  pageUrl: session.pageUrl,\n  mode: 'modal',          // 'iframe' | 'modal' | 'redirect'\n  containerId: 'payment', // for iframe mode\n  onSuccess: (data) => console.log('Paid!', data),\n  onError: (error) => console.error('Failed', error),\n  onCancel: () => console.log('Cancelled'),\n})\n```\n\n## Mounting Modes\n\n| Mode | Description |\n|------|-------------|\n| `iframe` | Embeds the payment page in a container element on your page |\n| `modal` | Opens the payment page in an overlay modal |\n| `redirect` | Redirects the browser to the provider's payment page |\n\n## Documentation\n\nFull documentation, setup guides, and examples: **[pay.bizup.dev](https://pay.bizup.dev)**\n\n## Links\n\n- [Documentation](https://pay.bizup.dev)\n- [GitHub](https://github.com/bizup-dev/bizup-pay)\n- [Issues](https://github.com/bizup-dev/bizup-pay/issues)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}