{"_id":"@billmyagent/payments-core","_rev":"7-7ccaa349fb35772fef51e57f8b4c3e08","name":"@billmyagent/payments-core","dist-tags":{"latest":"4.0.0"},"versions":{"2.1.0":{"name":"@billmyagent/payments-core","version":"2.1.0","_id":"@billmyagent/payments-core@2.1.0","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"dist":{"shasum":"00de11003c1c486571be68cb07ad3234cd83bec5","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-2.1.0.tgz","fileCount":4,"integrity":"sha512-LHhPjqIexVAm+jYszCrKMMNjakzFagVUiQxMeh7y5Hc/+nLdJUcq0HaPV3WSAPEQ2BwDhYV77WyMdkz6Hg5xCQ==","signatures":[{"sig":"MEYCIQCsSD2tlD2s38qPVtwUCMm1BgryBnmeVCCdClxVUenrMgIhANwz8i43OknU+FxidM3+GNEhpfjncsD3VO6ZFEklXo1N","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12713},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cc32d76b234dd10ecbfe465c2da6edc70935301a","scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"billmyagentadmin","email":"admin@billmyagent.ai"},"overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.12.25","uuid":"^11.1.1","axios":"^1.15.2","lodash":"^4.18.0","js-yaml":"^4.2.0","form-data":"^4.0.6","@babel/core":"^7.29.6","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.6","brace-expansion@<1.1.13":"^1.1.13"},"deprecated":"Broken deps; use >=2.1.2","_npmVersion":"10.8.2","description":"x402 payment client for billmyagent — auto-pays HTTP 402 challenges with a viem signer (EIP-3009) and manages merchant payments/fees","directories":{},"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.15.2","@x402/evm":"^2.16.0","@x402/svm":"^2.16.0","x402-axios":"^1.2.0","@coinbase/x402":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3","@types/jest":"^29.5.14","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payments-core_2.1.0_1782746298639_0.0934215473512765","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"@billmyagent/payments-core","version":"2.1.1","_id":"@billmyagent/payments-core@2.1.1","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"dist":{"shasum":"7221048e0f55e0ddd6af8157a803db4930dc13e1","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-2.1.1.tgz","fileCount":4,"integrity":"sha512-+gyAnol4pYDxwohwvaDhjnE17GktisJN471WrRO6zlxImtYoMNMMnqRtqUOf2yaBrMCdLMlt9LfBpQGFgDsEYA==","signatures":[{"sig":"MEYCIQCK8Ui0MT4SsAR4WuKi7FwdDet514lr8YR3ZhIJYvsCzwIhAKYuqD+iH2MCBJCLORJgVwXS0SVj3v5EDKocxJ67ShDf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12709},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"d802171578bd411e0af14bae73473c0addf71561","scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"billmyagentadmin","email":"admin@billmyagent.ai"},"overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.12.25","uuid":"^11.1.1","axios":"^1.15.2","lodash":"^4.18.0","js-yaml":"^4.2.0","form-data":"^4.0.6","@babel/core":"^7.29.6","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.6","brace-expansion@<1.1.13":"^1.1.13"},"_npmVersion":"10.8.2","description":"x402 payment client for billmyagent — auto-pays HTTP 402 challenges with a viem signer (EIP-3009) and manages merchant payments/fees","directories":{},"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.15.2","@x402/evm":"2.16.0","@x402/svm":"2.16.0","x402-axios":"1.2.0","@coinbase/x402":"2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3","@types/jest":"^29.5.14","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payments-core_2.1.1_1782748699872_0.6198601617683643","host":"s3://npm-registry-packages-npm-production"}},"2.1.2":{"name":"@billmyagent/payments-core","version":"2.1.2","license":"Apache-2.0","_id":"@billmyagent/payments-core@2.1.2","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"homepage":"https://developer.billmyagent.ai","bugs":{"url":"https://github.com/RealMaxPower/payment-processing/issues"},"dist":{"shasum":"44bd17d17435bbb19fad9160859efaeb2ef450b8","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-2.1.2.tgz","fileCount":4,"integrity":"sha512-De5ul9R7+fEbecuu0e3aB9RqKr30foEAZxz8/Hv7GGZLOhkYTPyAu8MhJxmQl5ITomEpygeFWpxQ3NhtsePk8w==","signatures":[{"sig":"MEQCID2T+JX3BUPOOC+v9vvxnoqHPQJW71m78h7TQR+K8RkDAiBbN6V7fRfDOOqecfkd2Ke55xu5ji3uHyDkROx9LqedfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12929},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"234016b07c1e9e790a6f47346c48adf0b5509568","scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"billmyagentadmin","email":"admin@billmyagent.ai"},"overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.12.25","uuid":"^11.1.1","axios":"^1.15.2","lodash":"^4.18.0","js-yaml":"^4.2.0","form-data":"^4.0.6","@babel/core":"^7.29.6","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.6","brace-expansion@<1.1.13":"^1.1.13"},"repository":{"url":"git+https://github.com/RealMaxPower/payment-processing.git","type":"git","directory":"sdk/core"},"_npmVersion":"10.8.2","description":"x402 payment client for billmyagent — auto-pays HTTP 402 challenges with a viem signer (EIP-3009) and manages merchant payments/fees","directories":{},"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.15.2","@x402/evm":"2.16.0","@x402/svm":"2.16.0","x402-axios":"1.2.0","@coinbase/x402":"2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3","@types/jest":"^29.5.14","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payments-core_2.1.2_1782759623219_0.9485541694817781","host":"s3://npm-registry-packages-npm-production"}},"2.1.3":{"name":"@billmyagent/payments-core","version":"2.1.3","license":"Apache-2.0","_id":"@billmyagent/payments-core@2.1.3","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"homepage":"https://developer.billmyagent.ai","bugs":{"url":"https://github.com/RealMaxPower/payment-processing/issues"},"dist":{"shasum":"a5f46d0e5c0357cc5fc1ab718a5c8a5411671426","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-2.1.3.tgz","fileCount":4,"integrity":"sha512-o401IQIuqkSO3OFR9AN0E9eJqUZsef+Bk+5yl+hT1Vz6VDwu2xPMEo3NbEdDmK124mF6gCqF/XrJhVyOQWc0AQ==","signatures":[{"sig":"MEUCIQDU4o2wzAIOzTuIhvLNbC3lOMEHf7XZzUYXe3EpIMHTgQIgdMZnDN4h/RYYof4E7Jyrx9EMW65BQM3zYNvxP6QyYUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12844},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"eb2b3f6fd4e0b7b021e55ae95a580526777d2151","scripts":{"test":"jest","build":"tsc"},"_npmUser":{"name":"billmyagentadmin","email":"admin@billmyagent.ai"},"overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.12.25","uuid":"^11.1.1","axios":"^1.15.2","lodash":"^4.18.0","js-yaml":"^4.2.0","form-data":"^4.0.6","@babel/core":"^7.29.6","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.6","brace-expansion@<1.1.13":"^1.1.13"},"repository":{"url":"git+https://github.com/RealMaxPower/payment-processing.git","type":"git","directory":"sdk/core"},"_npmVersion":"10.8.2","description":"x402 payment client for billmyagent — auto-pays HTTP 402 challenges with a viem signer (EIP-3009) and manages merchant payments/fees","directories":{},"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.15.2","x402-axios":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","typescript":"^5.7.3","@types/jest":"^29.5.14","@types/node":"^26.0.0"},"_npmOperationalInternal":{"tmp":"tmp/payments-core_2.1.3_1782856219830_0.5675178829111307","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@billmyagent/payments-core","version":"3.0.0","license":"Apache-2.0","_id":"@billmyagent/payments-core@3.0.0","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"homepage":"https://developer.billmyagent.ai","bugs":{"url":"https://github.com/RealMaxPower/payment-processing/issues"},"dist":{"shasum":"fa59c27fa9404b84c45b17d508c2ac44e2b40ba2","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-3.0.0.tgz","fileCount":6,"integrity":"sha512-dCkdxnd1idA4jOGxZ1Siwr7TihpbPP4M3eteZKtbGT9vYiJyHvAPWyjYHGU7Vgr1Nz9KMXsdNNQiTSobQMY8Yg==","signatures":[{"sig":"MEYCIQDCx1OIaQj0GBgNoODgqtrQMIP5BfrMXHs4nT9+3nVREgIhANAp0BfOsWX/u3NOdDXs1q1KpzeVIL77gELTub04Hf6g","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47052},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a36b3207f9e79b526a6bd22a15d7ed831f5eb5da","scripts":{"test":"node --test tests/*.test.mjs","build":"tsc","type-check":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:02b1877e-bbf9-4910-9afe-2e40a3b5b4bf"}},"overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.13.7","uuid":"^11.1.1","axios":"$axios","lodash":"^4.18.0","js-yaml":"^4.3.1","form-data":"^4.0.6","@babel/core":"^7.29.6","brace-expansion":"^5.0.9","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.7"},"repository":{"url":"git+https://github.com/RealMaxPower/payment-processing.git","type":"git","directory":"sdk/core"},"_npmVersion":"11.19.1","description":"x402 payment client for BillMyAgent: pay x402 APIs with a viem signer, take payments through hosted checkout, verify webhook signatures, and read your own settlement ledger","directories":{},"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.18.0","x402-axios":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.5.1","typescript":"^5.7.3","@types/jest":"^30.0.0","@types/node":"^26.4.1"},"_npmOperationalInternal":{"tmp":"tmp/payments-core_3.0.0_1789274393021_0.7150542630167314","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"_id":"@billmyagent/payments-core@4.0.0","bugs":{"url":"https://github.com/RealMaxPower/payment-processing/issues"},"dist":{"shasum":"5aaf16df4a05a9f699e5788f02c64429e8f8e612","tarball":"https://registry.npmjs.org/@billmyagent/payments-core/-/payments-core-4.0.0.tgz","fileCount":6,"integrity":"sha512-ZinTXxgPeP/IH8y0WmMv4pn2Icgko9RRO3GnshwhE8VLemo9YU52dHBWNZ4sZ9xE3k+Nt9aR0zyttNnnUAeQ4w==","signatures":[{"sig":"MEUCIQD3PPZbbscxPwjvsY7AN6qgkeZbxXryWy75v9Y++fwxFgIgPXVj0GJitjuvxm9yoi3QEXj87ZNmSOJ7hb8wjB7NRmg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF7OtRBO0xySHK4diM9asw4rAC5PB854MdzrO2T6uSraAiBeOxGt2IfzYsi9hs9XhqoFZDUycjB8viNtJNeR3GWBQA=="}],"unpackedSize":48568},"main":"dist/index.js","name":"@billmyagent/payments-core","types":"dist/index.d.ts","gitHead":"b8e62639f594cd3f9bf0363ea3ff5493a9e55af6","license":"Apache-2.0","scripts":{"test":"node --test tests/*.test.mjs","build":"tsc","type-check":"tsc --noEmit"},"version":"4.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:02b1877e-bbf9-4910-9afe-2e40a3b5b4bf"}},"homepage":"https://developer.billmyagent.ai","overrides":{"h3":"^1.15.9","ws":"^8.21.0","defu":"^6.1.5","hono":"^4.13.7","uuid":"^11.1.1","axios":"$axios","lodash":"^4.18.0","js-yaml":"^4.3.1","form-data":"^4.0.6","@babel/core":"^7.29.6","brace-expansion":"^5.0.9","follow-redirects":"^1.16.0","picomatch@<2.3.2":"^2.3.2","socket.io-parser":"^4.2.7"},"repository":{"url":"git+https://github.com/RealMaxPower/payment-processing.git","type":"git","directory":"sdk/core"},"_npmVersion":"11.20.0","description":"x402 payment client for BillMyAgent: pay x402 APIs with a viem signer, take payments through hosted checkout, verify webhook signatures, and read your own settlement ledger","directories":{},"maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"_nodeVersion":"20.20.2","dependencies":{"axios":"^1.18.0","x402-axios":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.5.1","typescript":"^5.7.3","@types/jest":"^30.0.0","@types/node":"^26.4.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/payments-core_4.0.0_1790531009917_0.2550094625341366"}}},"time":{"created":"2026-06-29T15:18:18.470Z","modified":"2026-09-27T17:43:30.441Z","2.1.0":"2026-06-29T15:18:18.792Z","2.1.1":"2026-06-29T15:58:20.007Z","2.1.2":"2026-06-29T19:00:23.363Z","2.1.3":"2026-06-30T21:50:19.983Z","3.0.0":"2026-09-13T04:39:53.157Z","4.0.0":"2026-09-27T17:43:29.993Z"},"bugs":{"url":"https://github.com/RealMaxPower/payment-processing/issues"},"license":"Apache-2.0","homepage":"https://developer.billmyagent.ai","repository":{"url":"git+https://github.com/RealMaxPower/payment-processing.git","type":"git","directory":"sdk/core"},"description":"x402 payment client for BillMyAgent: pay x402 APIs with a viem signer, take payments through hosted checkout, verify webhook signatures, and read your own settlement ledger","maintainers":[{"name":"realmaxpower","email":"contactme@marshallcahill.com"},{"name":"billmyagentadmin","email":"admin@billmyagent.ai"}],"readme":"# @billmyagent/payments-core\n\nx402 payment client for [billmyagent](https://billmyagent.ai). It pays\n**HTTP 402 Payment Required** challenges automatically using the official\n[x402](https://github.com/coinbase/x402) libraries: it signs an EIP-3009\n`transferWithAuthorization` with your wallet and lets the facilitator settle it\non-chain. Framework-agnostic — wrap it with\n[@billmyagent/payments-react](../react), `-vue`, or `-elements`.\n\n## Install\n\n```bash\nnpm install @billmyagent/payments-core\n```\n\n## Pay an x402-gated API\n\n```ts\nimport { PaymentClient, createSigner } from '@billmyagent/payments-core';\n\n// Build a signer from a private key (server/agent). Never ship a real key to a browser.\nconst signer = await createSigner('base', process.env.PRIVATE_KEY!);\n\nconst client = new PaymentClient({ signer });\n\n// `client.http` is an axios instance; any 402 it hits is paid and the request retried.\nconst res = await client.http.get('https://api.example.com/paid-resource');\nconsole.log(res.data);\n```\n\nIn a browser, pass a viem wallet client backed by the user's wallet instead of a\nprivate-key signer.\n\n## Merchant account methods\n\nPass an `apiKey` (and `authToken` JWT for `/merchant/*`) to use the billmyagent\nREST API:\n\n```ts\nconst client = new PaymentClient({ apiKey: process.env.BMA_API_KEY!, authToken: jwt });\n\nawait client.getPayoutSettings();\nawait client.updatePayoutSettings({ base_address: '0x…' });\nawait client.getFees();\nawait client.listInvoices();\n```\n\nAlso available: `createPayment`, `getPayment`, `listPayments`, and the merchant\nledger — `listSettlements`, `listFees`, `listCustomers`.\n\n`verifyPayment` and `settlePayment` were removed in 3.0.0; see the changelog.\n\n## What's in the box\n\n- `PaymentClient` — pays x402 challenges (`client.http`) and wraps the merchant REST API\n- `createSigner` / `Signer` — re-exported from `x402-axios` for building wallet signers\n- Types: `Payment`, `CreatePaymentRequest`, `PayoutSettings`, `FeeRow`, `FeeInvoice`, and the re-exported `AxiosRequestConfig` / `AxiosResponse`\n\n## Supported networks\n\nEVM only, `exact` scheme: **Base** (and **Base Sepolia** for testing). Ethereum L1 and Polygon appear in the types for historic rows and are not settled.\n\n## Development\n\n```bash\n# from sdk/core/\nnpm install\nnpm run build\n```\n\n## License\n\nApache 2.0 — see [LICENSE](../../LICENSE).\n","readmeFilename":"README.md"}