{"_id":"@bivoglobal/bivo-payment","_rev":"7-4532751576691da3d2009938bb49177b","name":"@bivoglobal/bivo-payment","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@bivoglobal/bivo-payment","version":"1.0.0","_id":"@bivoglobal/bivo-payment@1.0.0","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"b0b51fe3170afa1fe0cafce5a3456983f3bf03ce","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.0.tgz","fileCount":14,"integrity":"sha512-d0dly9vsjuePfoLfrBq1onFt2H7ao0aYBA1nJwit3qHnejgzJ52sMipd+T7Udw5foUWTlxcPgDnS6aXzrN9fkA==","signatures":[{"sig":"MEQCIDa0QyrWke2SFEYLzuQORIPUMlIk2hj+SWl1zCfXauIBAiAy7pVlo+y8VXleg/gejs/d0eWMRowA1WgZr/KQdDaxKQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":127067},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"07919905729e6abe0c214cd2ef3aefa4870e95f2","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","preview":"vite preview","build:react":"vite build --mode react","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","react-native":">=0.76.0"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.0_1773075179196_0.6621231920022403","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bivoglobal/bivo-payment","version":"1.0.1","_id":"@bivoglobal/bivo-payment@1.0.1","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"c7cc0fc71bb20c4b3e59bddb015e7c6e9ffb03fa","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.1.tgz","fileCount":14,"integrity":"sha512-SKkgrXEMdw1PBJbT7DeBk24epQ6AxE2VM7FzXkbIp3a8xWNC2Y1j0ryadH8CJ8DIfSYE/q5cfyPvT29pF8ONGg==","signatures":[{"sig":"MEYCIQDloXz6o3edm0DPwY8t3p9m+JJ4zMUCeBXRTE7g6PPJMAIhALidF6HJjerAFLNexv8JrSj5FNnALh8vLKGJYJzTtZFD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":127452},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"bcf284820778c7e9703dcd5568aa6a883f16b84e","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","preview":"vite preview","build:react":"vite build --mode react","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","react-native":">=0.76.0"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.1_1773145617534_0.3628762572991866","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bivoglobal/bivo-payment","version":"1.0.2","_id":"@bivoglobal/bivo-payment@1.0.2","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"ddcb676b3abf79860ebaba52b9fff78c8a095566","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.2.tgz","fileCount":22,"integrity":"sha512-K9/AFBbjn1h8cJd6wRXs1Ma+LxtGbVC9cPlHCNUOBy4MPKdxNggOX/dncWHf8wyeD7n4SoepKo/JInHlMuaPCQ==","signatures":[{"sig":"MEUCICU5QYwMsMgbeN7rdTdHOII6Strm9qmh+gwG6cSyLzksAiEAzCSXScG8EdLNfUbz7QqRNjhKtheBjEB7MFtUrynNec0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":226111},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"053859924439e14cc0071b0bdfdad402578aacb4","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native && npm run copy-assets","preview":"vite preview","build:react":"vite build --mode react","copy-assets":"cpy \"src/assets/**/*\" dist/assets --recursive","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","yalc":"^1.0.0-pre.53","cpy-cli":"^7.0.0","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","react-native":">=0.76.0"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.2_1775528346844_0.9795972123561774","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bivoglobal/bivo-payment","version":"1.0.3","_id":"@bivoglobal/bivo-payment@1.0.3","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"e98c3ffb73efb66f9a8974a98445283aaeb7b698","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.3.tgz","fileCount":14,"integrity":"sha512-bHDo8fOL1Pk22Nu4crGdz2CHYRqmF2CCKz8c7KoXY1GmpbyWPT0LDukXsBAtAInF/kzP83r5nCdphQRYU/BJNw==","signatures":[{"sig":"MEQCID2AjuNDlYnzaF20c9W0qTZWdGmdGPIHefFr9ufYPRtOAiBF+Fcgim18H01rvOrcVa8hJk/ov1UlMi2iAg/lGCVvLg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151247},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"62e0b30914b628e06bfb3f7c4a947cdff401cc88","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","preview":"vite preview","build:react":"vite build --mode react","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","clientjs":"^0.2.1","react-dom":"^19.2.4","react-native":">=0.76.0","react-native-device-info":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.3_1777213890953_0.39924502775721504","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bivoglobal/bivo-payment","version":"1.0.4","_id":"@bivoglobal/bivo-payment@1.0.4","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"afc7a64fa33fe932fb9fdbd36f36a7764238324e","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.4.tgz","fileCount":14,"integrity":"sha512-YglTr5IimNVZLjNiXyV8VOd2nrQF5v9xT84UZ3wfm6a8rt/GN2Oen1s7/UaoB6eSIXLFnaYn1Fxhgdm8/6XF0g==","signatures":[{"sig":"MEUCIAzOT1fvKQ0oR0HaDJxTmWakhzoD6Mp1Q/E8YHMtES24AiEAs6BpsHjACxfPbcBfu7yPjZJceJSlaKU360aGqc2O/Rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151247},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"62e0b30914b628e06bfb3f7c4a947cdff401cc88","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","preview":"vite preview","build:react":"vite build --mode react","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","clientjs":"^0.2.1","react-dom":"^19.2.4","react-native":">=0.76.0","react-native-device-info":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.4_1777288191157_0.7852601483184447","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@bivoglobal/bivo-payment","version":"1.0.5","_id":"@bivoglobal/bivo-payment@1.0.5","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"dist":{"shasum":"a173e8434af0506c9bd0b81eef68c9336453f61c","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.5.tgz","fileCount":14,"integrity":"sha512-WywyVxSOryUUwM6Vnm+fukjtT/fcqKSP4cDj8EDxOl3dxLqYv9D4/ISppiZmz+m8FLSvqqKMfBwwzRpbbJVFzA==","signatures":[{"sig":"MEYCIQD0Ws+z2WffXlcEuXy9k1o4lHc9au8eTEbIxsrx8y9VNQIhAOMNVpKUj3d7/ncsmIeJu/Q+R4UCF3lrs1fYxZhYCgkI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151247},"main":"./dist/index.cjs.js","type":"module","module":"./dist/index.es.js","exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"gitHead":"62e0b30914b628e06bfb3f7c4a947cdff401cc88","scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","preview":"vite preview","build:react":"vite build --mode react","build:native":"vite build --mode native","build:vanilla":"vite build"},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"_npmVersion":"11.6.1","description":"**Package:** `@bivoglobal/bivo-payment`","directories":{},"_nodeVersion":"24.10.0","react-native":"./dist/native/native.cjs.js","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"sass":"^1.97.3","vite":"^7.3.1","typescript":"~5.9.3","@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4"},"peerDependencies":{"react":"^19.2.4","clientjs":"^0.2.1","react-dom":"^19.2.4","react-native":">=0.76.0","react-native-device-info":"^15.0.2"},"_npmOperationalInternal":{"tmp":"tmp/bivo-payment_1.0.5_1777288519290_0.05577383275889081","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@bivoglobal/bivo-payment","version":"1.0.6","type":"module","main":"./dist/index.cjs.js","module":"./dist/index.es.js","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"vite build && vite build --mode react && vite build --mode native","build:vanilla":"vite build","build:react":"vite build --mode react","build:native":"vite build --mode native","preview":"vite preview"},"devDependencies":{"@types/node":"^25.3.0","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^5.1.4","sass":"^1.97.3","typescript":"~5.9.3","vite":"^7.3.1"},"peerDependencies":{"react":"^19.2.4","react-dom":"^19.2.4","react-native":">=0.76.0","react-native-device-info":"^15.0.2","clientjs":"^0.2.1"},"exports":{".":{"import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./react":{"import":"./dist/react/react.es.js","require":"./dist/react/react.cjs.js"},"./native":{"import":"./dist/native/native.es.js","require":"./dist/native/native.cjs.js"},"./style.css":"./dist/style.css"},"react-native":"./dist/native/native.cjs.js","gitHead":"87703da55e452042c2f03b8c1ac93380b274fbcd","_id":"@bivoglobal/bivo-payment@1.0.6","description":"**Package:** `@bivoglobal/bivo-payment`","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-R+TKR/s7Pm6MFMOqFf5Edo9l3q+xEkz/7TS7LYSvk1iOdGKCU5XZgtVuFob7GwG9jHQCItqmrshMBupaC5reCA==","shasum":"340c717690bf084741a5c28f0d7f34063a6094af","tarball":"https://registry.npmjs.org/@bivoglobal/bivo-payment/-/bivo-payment-1.0.6.tgz","fileCount":14,"unpackedSize":155323,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC4IBx+gaHoFA/CQ7LcHXaMcMk2rEt+ZNVtWwkMzyYhegIhAKeel8zE9CIa0oQUbJFs6pEdP/nGqOWrr4uRX4EvTajt"}]},"_npmUser":{"name":"bivosdk","email":"vikrant@bivocash.com"},"directories":{},"maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bivo-payment_1.0.6_1777289943902_0.5373270578613032"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-09T16:52:59.109Z","modified":"2026-04-27T11:39:04.178Z","1.0.0":"2026-03-09T16:52:59.335Z","1.0.1":"2026-03-10T12:26:57.729Z","1.0.2":"2026-04-07T02:19:07.022Z","1.0.3":"2026-04-26T14:31:31.093Z","1.0.4":"2026-04-27T11:09:51.285Z","1.0.5":"2026-04-27T11:15:19.448Z","1.0.6":"2026-04-27T11:39:04.058Z"},"description":"**Package:** `@bivoglobal/bivo-payment`","maintainers":[{"name":"bivosdk","email":"vikrant@bivocash.com"}],"readme":"# Bivo Payment SDK\n\n**Package:** `@bivoglobal/bivo-payment`\n\nThe **Bivo Payment SDK** is a lightweight and secure JavaScript library\nthat enables partners to collect card details without directly\nhandling sensitive cardholder data.\n\nBy using **session-based tokenization and secure hosted components**,\nthe SDK ensures that **Primary Account Numbers (PAN), CVV, and other\ncard data never pass through your infrastructure**, significantly\nreducing your **PCI DSS compliance scope**.\n\nThis approach allows partners to integrate card payments quickly while\nmaintaining strong security guarantees.\n\n---\n\n# Key Benefits\n\n## 🔐 PCI Scope Reduction\n\nSensitive cardholder data is captured and transmitted **directly to\nBivo's PCI-compliant infrastructure**, ensuring your backend and\nfrontend never store or process raw card data.\n\n## ⚡ Developer‑First Integration\n\nThe SDK is designed for rapid integration with minimal configuration and\nclean APIs.\n\n## 📦 Framework Flexibility\n\nWorks seamlessly with:\n\n- Vanilla JavaScript\n- React\n- React Native\n- Any framework capable of mounting a DOM container\n\n## 🧩 Embedded & Customizable UI\n\nSecure payment components are mounted within your application using\nhosted frames that can visually blend into your interface.\n\n---\n\n# Architecture Overview\n\nThe Bivo SDK follows a **No‑Touch Card Data Architecture**.\n\n1.  **Your Backend**\n    - Requests a `sessionId` from Bivo.\n2.  **Your Frontend**\n    - Initializes the Bivo SDK using the `sessionId`.\n3.  **Bivo SDK**\n    - Renders a secure card collection component inside your\n      application.\n4.  **Bivo Payment Gateway**\n    - Processes the card data and returns a success or failure event.\n\nBecause the card details are submitted **directly from the user's\nbrowser to Bivo**, your infrastructure **never handles PCI‑sensitive\ndata**.\n\n---\n\n# Installation\n\nInstall the SDK using your preferred package manager.\n\n```bash\nnpm install @bivoglobal/bivo-payment\n\n# or\n\nyarn add @bivoglobal/bivo-payment\n```\n\n## CDN / Script Tag\n\nFor HTML pages without a bundler, load the UMD build and stylesheet directly:\n\n```html\n<link\n  rel=\"stylesheet\"\n  href=\"https://cdn.jsdelivr.net/npm/@bivoglobal/bivo-payment@latest/dist/style.css\"\n/>\n<script src=\"https://cdn.jsdelivr.net/npm/@bivoglobal/bivo-payment@latest/dist/index.umd.js\"></script>\n```\n\nThe global `BivoPayments` object is then available on `window`.\n\n---\n\n# Quick Start\n\n## 1. Create a Payment Session (Server‑Side)\n\nBefore initializing the SDK, your backend must create a **payment\nsession** with Bivo.\n\nThis session prevents client‑side manipulation and authenticates the\ntransaction.\n\n### Endpoint\n\n    POST /api-gateway/v1/admin/cards/link-card\n\n### Example Response\n\n```json\n{\n  \"sessionId\": \"sess_abc123\",\n  \"endpoint\": \"{{host}}/pgw/v1/card\"\n}\n```\n\nYour backend should then pass this `sessionId` to the frontend.\n\n---\n\n# Frontend Implementation (Web)\n\n## Vanilla JavaScript (Inline + Modal)\n\n```javascript\nimport * as BivoPayments from \"@bivoglobal/bivo-payment\";\nimport \"@bivoglobal/bivo-payment/style.css\";\n\nconst onCallback = (result) => {\n  if (result.success) console.log(\"Success:\", result.data);\n  else console.error(\"Error:\", result.error);\n};\n\n// Inline mode\nconst bivoInline = BivoPayments.init({\n  token: \"your-session-token\",\n  endpoint: \"your-endpoint\",\n  beneficiaryCard: false,\n  onCallback,\n});\nbivoInline.mount({ id: \"payment-container\" });\n\n// Modal mode\nconst bivoModal = BivoPayments.init({\n  token: \"your-session-token\",\n  endpoint: \"your-endpoint\",\n  beneficiaryCard: false,\n  isModal: true,\n  onCallback,\n});\ndocument.getElementById(\"open-modal\")?.addEventListener(\"click\", () => bivoModal.open());\n\n// bivoInline.destroy() / bivoModal.destroy()\n```\n\n`mount()` accepts `{ id }`, `{ className }` (CSS selector string), or `{ element }`.\n\n## React\n\n```jsx\nimport { useState } from \"react\";\nimport { AddCard } from \"@bivoglobal/bivo-payment/react\";\nimport \"@bivoglobal/bivo-payment/style.css\";\n\nexport default function PaymentPage() {\n  const [isOpen, setIsOpen] = useState(false);\n\n  const onCallback = (result) => {\n    if (result.success) { console.log(\"Success:\", result.data); setIsOpen(false); }\n    else console.error(\"Error:\", result.error);\n  };\n\n  return (\n    <>\n      {/* Inline */}\n      <AddCard token=\"...\" endpoint=\"...\" onCallback={onCallback} />\n\n      {/* Beneficiary flow */}\n      <AddCard token=\"...\" endpoint=\"...\" beneficiaryCard onCallback={onCallback} />\n\n      {/* Modal */}\n      <button onClick={() => setIsOpen(true)}>Add Card</button>\n      <AddCard isModal isOpen={isOpen} token=\"...\" endpoint=\"...\" onCallback={onCallback} onClose={() => setIsOpen(false)} />\n    </>\n  );\n}\n```\n\n## React Native\n\nImport `AddCard` from `@bivoglobal/bivo-payment/native`. Renders a native card form — no WebView required.\n\n```jsx\nimport { AddCard } from \"@bivoglobal/bivo-payment/native\";\n\n<AddCard\n  token=\"your-session-token\"\n  endpoint=\"your-endpoint\"\n  beneficiaryCard={false}   // set true for recipient card flow\n  onCallback={(result) => {\n    if (result.success) console.log(\"Card linked:\", result.data);\n    else console.error(\"Error:\", result.error);\n  }}\n/>\n```\n\n---\n\n# API Reference\n\n## `init(options)` — Vanilla JS\n\nOptions:\n\n- `token` (string, required)\n- `endpoint` (string, required)\n- `beneficiaryCard` (boolean, default `false`)\n- `isModal` (boolean, default `false`)\n- `onCallback` (function)\n- `onModalClose` (function)\n\nReturns: `mount(selector)`, `open()`, `destroy()`\n\n## `AddCard` Props — React / React Native\n\n| Prop | Type | React | Native | Notes |\n|---|---|---|---|---|\n| `token` | string | required | required | |\n| `endpoint` | string | required | required | |\n| `beneficiaryCard` | boolean | optional | optional | default `false` |\n| `isModal` | boolean | optional | — | |\n| `isOpen` | boolean | optional | — | modal open state |\n| `onCallback` | function | optional | optional | `{ success, data?, error? }` |\n| `onClose` | function | optional | — | called on modal close |\n| `lang`            | `\"en\"` \\| `\"es\"` | optional | optional | UI language, default `\"en\"`  |\n\n---\n\n# Error Reference\n\n  -------------------------------------------------------------------------\n  Error Code           Description          Recommended Action\n  -------------------- -------------------- -------------------------------\n  `invalid_session`    Provided sessionId   Verify backend session creation\n                       is malformed or      \n                       invalid              \n\n  `expired_session`    Session has expired  Request a new sessionId\n\n  `payment_declined`   Card issuer rejected Prompt user for another card\n                       the transaction      \n\n---\n\n# Security & PCI Compliance\n\nThe Bivo SDK is designed to keep partner infrastructure **outside of PCI\nscope whenever possible**.\n\n### Key Security Principles\n\n**Zero Card Data Exposure** - Your frontend and backend never see PAN or\nCVV.\n\n**Direct Secure Submission** - Card data is transmitted directly from\nthe user's browser to Bivo.\n\n**PCI Level 1 Infrastructure** - Bivo stores and processes card data\ninside a certified PCI environment.\n\n**Tokenized Transactions** - All follow‑up operations use **session\ntokens**, not card data.\n\nThis architecture significantly reduces compliance overhead for partners\nwhile maintaining enterprise‑grade security.\n\n---\n\n# Support\n\nFor integration assistance, sandbox credentials, or enterprise\nonboarding, contact:\n\n**Bivo Developer Support**\\\ndevelopers@bivocash.com\n\n---\n\n# License\n\nMIT\n","readmeFilename":"README.md"}