{"_id":"@hello-pay/react","_rev":"8-81af5769c9c7dad1fb80d9d55803c26f","name":"@hello-pay/react","dist-tags":{"latest":"0.6.0"},"versions":{"0.1.0":{"name":"@hello-pay/react","version":"0.1.0","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.1.0","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"61bae561ea5de68445922338da85dab21ac68250","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.1.0.tgz","fileCount":8,"integrity":"sha512-7pgxJvWMQOzGkp2+omQ+PmXS/TNmngmb9bviybqUl4Yv3ml2WRx/zyKgCvDL5LMWpgY6Qjudp8KazKmZBsg65w==","signatures":[{"sig":"MEUCIEeIrvskvyt6QXBqIiqD8ELHbc8oDolII0rnGJFnHbAcAiEAzSJgc8vT5IQOz8OLSQqIJqnJ66KRPbPjXbDGjTC3nLc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65964},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"1e04b19227819f01a72478dd1c3150290b128c46","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"10.9.2","description":"HelloPay Elements React bindings (custom card form for merchants)","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.1.0_1776094467151_0.14333923614800725","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@hello-pay/react","version":"0.2.0","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.2.0","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"6d91989d03abcd427508b2e7d20b4ac4e40eac37","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.2.0.tgz","fileCount":8,"integrity":"sha512-rirQ/UE87p1D+2yMdpew8w3Xa0hw8FxVXph8+azy3jBBKa5UeTnQHL2r7HA4Y4/yDuUrjE3Ss7rrdF7gl14kuQ==","signatures":[{"sig":"MEUCIQDtrOdIvhKvyZ6BWcUtyhUndqnY6CtwV51+MBHkmQycOQIgdjqPNg0xjGaDLVV7kUVGZcsgAZpDsElJwfjkIB8XFgE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67047},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"10.9.2","description":"HelloPay Elements React bindings (custom card form for merchants)","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.2.0_1777548236802_0.7010327255835407","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@hello-pay/react","version":"0.2.1","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.2.1","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"ea160b4621dd8e122a1850a676ccddbb9892fa1a","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.2.1.tgz","fileCount":8,"integrity":"sha512-61qxebTFafnUF9SpBDSRKsWpxJ3suzChiXblgvc6all5muHupYoB7S83EQFi2CP+hGnj0QTu8gkwVbjucv0qYg==","signatures":[{"sig":"MEUCIQDa3q+OYpiESwrcxR8IzcFfsHCI3iFm1JQZQfu69NZN9QIgGsN9ZsW12G3OzlzkWOAknsVHCAcNm7fxeuSKPo38r1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66204},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"10.9.2","description":"React components for accepting payments with HelloPay","directories":{},"_nodeVersion":"22.16.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.2.1_1777550945971_0.02540152971304699","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@hello-pay/react","version":"0.2.2","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.2.2","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"664b903b127fdd7f9fe56fa2ff2ceea667ab7f66","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.2.2.tgz","fileCount":8,"integrity":"sha512-yXZCYpRpJcb86Z8fqm67Z62f/9EoXtCbqGz7plgs0UtN+M7HzS/BfkooEX/iClBWz+W8mcnMxp92g5D5UzWUcw==","signatures":[{"sig":"MEQCIH7ws20zr//VqzPEksSLcTmsDcwIgi5RhAziH5R4aypPAiAnsJutEsBMIiIpG405uA7VS+RFd2L386T7gYpVL74L+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66180},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"19f912f736fc09c7675b55f654a8f84ff6d7f6e1","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92f32b0e-16ee-4aa7-ba1c-360558392f1d"}},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"11.11.0","description":"React components for accepting payments with HelloPay","directories":{},"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.2.2_1777551313239_0.8995613906538986","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@hello-pay/react","version":"0.3.0","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.3.0","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"67b1777273b44efcdabfa9af0b0e9e507f864509","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.3.0.tgz","fileCount":8,"integrity":"sha512-tDrxTYI0R2/hgARTvbpNpoAzP//fasGJ4rDtCrubmBHis8rUE2WoT6cVIxw3c1XTKMqYh0nTclCvA5iNU9TieA==","signatures":[{"sig":"MEUCIBjprCQBt3k+MeCuiAkc06nzv7HtSa1fCtcd9iyoQ/AXAiEAiPaw/Wirhfnn2CQ0LfE/lA1JL8tJDEiohnr6oyNkNnE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65610},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c8b10fa8b0cfb9239aa928b23ace34cdc1958f50","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92f32b0e-16ee-4aa7-ba1c-360558392f1d"}},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"11.13.0","description":"React components for accepting payments with HelloPay","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.3.0_1782310854657_0.13387337621078998","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@hello-pay/react","version":"0.4.0","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.4.0","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"0914ed738a574fb8df1b1f290b61ee8653b5b48f","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.4.0.tgz","fileCount":8,"integrity":"sha512-5ZIUQrPFSWdjzjFGG4MQB8bgfX6yM8ZlKftgEULTIbVVs0C8womZSjhC28xkbLmntZ+1G/7gx22xeToqfsM/rA==","signatures":[{"sig":"MEUCIQCUAnZmTojYJatiiYwu+ZgTz7pS8wqJB8RZt4kEZu7K/AIgD5llpTaViUV6U4KND/is7GThFYfvdtgYhiLpouyutf4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90176},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"48d5becdffde3bdab02e1865b363cd22553eba98","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92f32b0e-16ee-4aa7-ba1c-360558392f1d"}},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"11.16.0","description":"React components for accepting payments with HelloPay","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.4.0_1785655398142_0.16678528634670586","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@hello-pay/react","version":"0.5.1","keywords":["hellopay","payments","elements","react","card","tokenization"],"license":"UNLICENSED","_id":"@hello-pay/react@0.5.1","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"9e4dd56c3bc2059eab0d01719427a88a51e5b69f","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.5.1.tgz","fileCount":8,"integrity":"sha512-lLPT1vddqgsCrH7q1rnLipJd4Seuu65khCTVrT3s//RKfut+5a9aTi/TdmwMczUglvzXycvVM2cRSJe7uqHtZg==","signatures":[{"sig":"MEQCIDUy9+hPLB7DK7F3bK9KXR5L2rN0ZQEJL3g4bpKyrl9FAiAjBHtyXRKuWNMNde4pRr63nPxLJ+nSF3gsrSTsk29cxw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCTitr3qxMgOl0Ie7bNfKdPGs30N7YIrLieX8mayDNtrAIhAMuhlnsShNaw8bt9xjk2HP7p6s+6dE0lmzEjme6Fb8Fx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106678},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"bfa611613e38ee2b62bd3c3b6f3444cac51d7b45","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"92f32b0e-16ee-4aa7-ba1c-360558392f1d"}},"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"11.19.0","description":"React components for accepting payments with HelloPay","directories":{},"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/react_0.5.1_1792770096824_0.4339107137176039","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"_id":"@hello-pay/react@0.6.0","bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"dist":{"shasum":"bf8528d18c48360a1ed44b8b5e4d8f5c2775d0ad","tarball":"https://registry.npmjs.org/@hello-pay/react/-/react-0.6.0.tgz","fileCount":8,"integrity":"sha512-55blXQ5ro06P/pfyPRHHOi6P7uO0e2YthqvRjCHnoFUIivw/YL3dFWhmQmuMPTwMd8W9kKGH8LpxPg4s36YTew==","signatures":[{"sig":"MEYCIQDPKbTG3J1Uoj7Txd0Hb6q+Ze8DQWZ5cl76bsgxrw3PUgIhAOPS0miGOaHog/UFErsp6MjxQURceEcZSadWOmrGPn7v","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBGVNAlUUs/3g/WFjMPrT37gLs9K5RpMKWKFkrHaIIHfAiEA2ZceR3Fs84hh7R5Z6umblRoqRYP5VQBINi68xLpn/Nc="}],"unpackedSize":110268},"main":"./dist/index.js","name":"@hello-pay/react","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"658abb74a577d782b3c447634261127797470e0d","license":"UNLICENSED","scripts":{"demo":"bun ./demo-server.ts","test":"bun test","build":"tsup","typecheck":"tsc --noEmit"},"version":"0.6.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"92f32b0e-16ee-4aa7-ba1c-360558392f1d"}},"homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","keywords":["hellopay","payments","elements","react","card","tokenization"],"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"_npmVersion":"11.19.1","description":"React components for accepting payments with HelloPay","directories":{},"maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"_nodeVersion":"24.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","react":"^19.0.0","bun-types":"^1.3.12","happy-dom":"^20.8.9","react-dom":"^19.0.0","typescript":"^5.5.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@happy-dom/global-registrator":"^20.8.9"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react_0.6.0_1794224630575_0.06223980134047313"}}},"time":{"created":"2026-04-13T15:34:27.043Z","modified":"2026-11-09T11:43:50.932Z","0.1.0":"2026-04-13T15:34:27.311Z","0.2.0":"2026-04-30T11:23:56.999Z","0.2.1":"2026-04-30T12:09:06.120Z","0.2.2":"2026-04-30T12:15:13.399Z","0.3.0":"2026-06-24T14:20:54.792Z","0.4.0":"2026-08-02T07:23:18.288Z","0.5.1":"2026-10-23T15:41:36.916Z","0.6.0":"2026-11-09T11:43:50.700Z"},"bugs":{"url":"https://github.com/hello-ai/hello_pay/issues"},"license":"UNLICENSED","homepage":"https://github.com/hello-ai/hello_pay/tree/master/js_sdk/react","keywords":["hellopay","payments","elements","react","card","tokenization"],"repository":{"url":"git+https://github.com/hello-ai/hello_pay.git","type":"git","directory":"js_sdk/react"},"description":"React components for accepting payments with HelloPay","maintainers":[{"name":"reon.nishimura","email":"reon.nishimura@hello.ai"}],"readme":"# @hello-pay/react\n\nHelloPay 公式の React SDK。React アプリ内に任意のレイアウトでカード決済フォームを組み込める。\n\nカード情報は HelloPay 配信の iframe に隔離されるため、PCI DSS SAQ A を維持したまま React コンポーネントとして UI を組み立てられる。\n\n## Install\n\n```bash\nnpm install @hello-pay/react\n# or: pnpm add @hello-pay/react / bun add @hello-pay/react\n```\n\n## Usage\n\n```tsx\nimport {\n  loadHelloPay,\n  Elements,\n  CardNumberElement,\n  CardExpiryElement,\n  CardCvcElement,\n  CardholderNameElement,\n  CardPasswordElement,\n  useHelloPay,\n  useElements,\n} from '@hello-pay/react';\n\n// SDK のロードは module スコープで 1 回だけ（Stripe と同じ挙動）。\n// SSR / Next.js でも安全に module top-level に置ける。\nconst helloPayPromise = loadHelloPay('pk_test_xxx');\n\nexport default function Checkout() {\n  return (\n    <Elements hellopay={helloPayPromise}>\n      <PaymentForm />\n    </Elements>\n  );\n}\n\nfunction PaymentForm() {\n  const hellopay = useHelloPay();\n  const elements = useElements();\n\n  async function handleSubmit(e: React.FormEvent) {\n    e.preventDefault();\n    if (!hellopay || !elements) return;\n\n    const cardNumber = elements.getElement('cardNumber');\n    const { token, provider, card, error } = await hellopay.createToken(cardNumber);\n\n    if (error) {\n      // error.type は 'validation_error' | 'api_error' | 'config_error'\n      showError(error.message);\n      return;\n    }\n    // 以降は token / provider / card が必ず non-null（Discriminated Union）\n    // provider は通常 'hellopay'（HelloPay の決済 API に渡す）。\n    // Mastercard 暫定対応を利用している場合のみ、プロジェクトの設定に応じて\n    // 'stripe' / 'gmo' になる。いずれもトークンは加盟店自身の PSP 契約上に\n    // 発行されるため、決済・3DS・返金は自社の実装で行う。\n    // 'gmo' のトークンは発行から 30 分・1 回限りで、期限は tokenExpiryDate に入る。\n    await fetch('/api/charge', {\n      method: 'POST',\n      body: JSON.stringify({ token, provider, last4: card.last4 }),\n    });\n  }\n\n  return (\n    <form onSubmit={handleSubmit}>\n      <CardNumberElement />\n      <CardExpiryElement />\n      <CardCvcElement />\n      <CardholderNameElement />\n      {/* 韓国発行カードのみ: 暗証番号の先頭 2 桁 */}\n      <CardPasswordElement />\n      <button type=\"submit\">支払う</button>\n    </form>\n  );\n}\n```\n\n## Architecture\n\n- コア SDK (`hellopay-elements.js`) は HelloPay の公式 CDN (`js.hello-pay.app`) から配信される。npm パッケージは **ローダーと型定義のみ**を提供する（PCI DSS 要件）。\n- 各 Element コンポーネントは 1 つの `<div>` を描画するだけで、カード情報の入力 iframe はコア SDK が差し込む。\n- iframe 間通信は `BroadcastChannel`（同一オリジン）で行い、ホストページ側のコードは一切経由しない。\n- トークン化は iframe 内で直接 HelloPay の API に POST する。\n","readmeFilename":"README.md"}