{"_id":"@ablea/cashless","_rev":"4-b2ae041e5f58bf1b98f813318cc105f3","name":"@ablea/cashless","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@ablea/cashless","version":"1.0.0","keywords":["mobile-money","mtn-momo","airtel-money","payments","uganda","ugx"],"license":"MIT","_id":"@ablea/cashless@1.0.0","maintainers":[{"name":"ablea","email":"ableabenaitwe@gmail.com"}],"dist":{"shasum":"abc4f9766321d12678b31b498d16559ce9858f3d","tarball":"https://registry.npmjs.org/@ablea/cashless/-/cashless-1.0.0.tgz","fileCount":70,"integrity":"sha512-dOGhS/wi0qhQFLCAtXKptJWu8Z9dNxN1tHKtW0vYWrWOqvL+2bMwCr2O5SkiQVsH6x2XLq/VsU9KsBZd3w6Lrg==","signatures":[{"sig":"MEUCIQC2kPhlJ0X9W8cqHh8bS6MZTvbL+VLogWNzv/YJKuUO5wIgTQ2YGV8uIMat+mxz1/pqnkHUgDOW667KWkEESVjygfE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55364},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"3e905929e0e96d2d454045ff883aa1472286aa47","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ablea","email":"ableabenaitwe@gmail.com"},"_npmVersion":"11.13.0","description":"TypeScript SDK for MTN MoMo and Airtel Money mobile-money operations","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.9.2","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/cashless_1.0.0_1781691997581_0.742006728340143","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ablea/cashless","version":"1.0.1","keywords":["mobile-money","mtn-momo","airtel-money","payments","uganda","ugx"],"license":"MIT","_id":"@ablea/cashless@1.0.1","maintainers":[{"name":"ablea","email":"ableabenaitwe@gmail.com"}],"dist":{"shasum":"ebedb8093b8dd8bda254c30947f06c81dfc49cc5","tarball":"https://registry.npmjs.org/@ablea/cashless/-/cashless-1.0.1.tgz","fileCount":70,"integrity":"sha512-c68tHquk+a0xowwILtLyfoNrC/J4+zVJiMF2cCiKOJLbCqyeof93gjNsrbRj6FGB3Kp8OpLHsTJHx3JaigPnUg==","signatures":[{"sig":"MEUCIGmVA0KsmgeTHzJxley9+QNI3y5WUEyQov5Ak3VOajqPAiEA2HFBfCWCftvaLNJuOxuya+bB8/iqexa3ze/AuOoX9/0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55340},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"3e905929e0e96d2d454045ff883aa1472286aa47","scripts":{"lint":"eslint src tests","test":"vitest run","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ablea","email":"ableabenaitwe@gmail.com"},"_npmVersion":"11.13.0","description":"TypeScript SDK for MTN MoMo and Airtel Money mobile-money operations","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.9.2","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/cashless_1.0.1_1781692221375_0.31130400619725296","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ablea/cashless","version":"1.0.2","keywords":["mobile-money","mtn-momo","airtel-money","payments","uganda","ugx"],"license":"MIT","_id":"@ablea/cashless@1.0.2","maintainers":[{"name":"ablea","email":"ableabenaitwe@gmail.com"}],"homepage":"https://github.com/ablea/cashless-sdk-ts#readme","bugs":{"url":"https://github.com/ablea/cashless-sdk-ts/issues"},"dist":{"shasum":"69f0cfcb18d56c3ede60952270f3d298073deb16","tarball":"https://registry.npmjs.org/@ablea/cashless/-/cashless-1.0.2.tgz","fileCount":70,"integrity":"sha512-DnigqCSiENsCMFVHv6gCFWoGqhipsaI3cSCv/6szAJR99llqGFKjBjEvJlKn5991w6D0qbp0ugPdjBtZ6nfiHw==","signatures":[{"sig":"MEUCIQCyDQb81gOARL+V+owCJn3Fm+it4futpe5+Z7KLUq87sAIgBM4Pm3xZ/Ip+QGyMz+6pqC+TTBwnn/7sXaM7WmQhMvs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":62222},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"26447fa858b611b69a8ffd30986be18cc4960fa4","scripts":{"test":"vitest run","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"ablea","email":"ableabenaitwe@gmail.com"},"repository":{"url":"git+https://github.com/ablea/cashless-sdk-ts.git","type":"git"},"_npmVersion":"11.16.0","description":"TypeScript SDK for MTN MoMo and Airtel Money mobile-money operations","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.9.2","@types/node":"^22"},"_npmOperationalInternal":{"tmp":"tmp/cashless_1.0.2_1782811093250_0.03412390598972381","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ablea/cashless","version":"1.0.3","description":"TypeScript SDK for MTN MoMo and Airtel Money mobile-money operations","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc","test":"vitest run","prepublishOnly":"npm run build && npm test"},"publishConfig":{"access":"public"},"keywords":["mobile-money","mtn-momo","airtel-money","payments","uganda","ugx"],"repository":{"type":"git","url":"git+https://github.com/ablea/cashless-sdk-ts.git"},"homepage":"https://github.com/ablea/cashless-sdk-ts#readme","bugs":{"url":"https://github.com/ablea/cashless-sdk-ts/issues"},"license":"MIT","devDependencies":{"@types/node":"^22","typescript":"^5.9.2","vitest":"^3.0.0"},"_id":"@ablea/cashless@1.0.3","gitHead":"9af585bdd4a6875dfdb2795e8291528355dcb233","_nodeVersion":"22.23.0","_npmVersion":"10.9.8","dist":{"integrity":"sha512-wDUHnRb1tpkfgKfQdgfOz8xcjGNY6CIhlhcJ6xqtj9WvUJuyZ0GkudADPtDs5BGthseAfibqkgVhDeGo6pIB1A==","shasum":"f720ec8a4e2c3d0e014941e6d2687f2c997e83e6","tarball":"https://registry.npmjs.org/@ablea/cashless/-/cashless-1.0.3.tgz","fileCount":70,"unpackedSize":62222,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDgJJQBNf6XPBQ0OfSq77sIBmuvy7hCyTj6cUDmIrcL/AIgA9IaECOS4s2+jcwQXxQ0CgzNyYWLHBvEkECeWLJDpD4="}]},"_npmUser":{"name":"ablea","email":"ableabenaitwe@gmail.com"},"directories":{},"maintainers":[{"name":"ablea","email":"ableabenaitwe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cashless_1.0.3_1782812008064_0.2505110262012211"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-17T10:26:37.310Z","modified":"2026-06-30T09:33:28.304Z","1.0.0":"2026-06-17T10:26:37.711Z","1.0.1":"2026-06-17T10:30:21.509Z","1.0.2":"2026-06-30T09:18:13.398Z","1.0.3":"2026-06-30T09:33:28.197Z"},"bugs":{"url":"https://github.com/ablea/cashless-sdk-ts/issues"},"license":"MIT","homepage":"https://github.com/ablea/cashless-sdk-ts#readme","keywords":["mobile-money","mtn-momo","airtel-money","payments","uganda","ugx"],"repository":{"type":"git","url":"git+https://github.com/ablea/cashless-sdk-ts.git"},"description":"TypeScript SDK for MTN MoMo and Airtel Money mobile-money operations","maintainers":[{"name":"ablea","email":"ableabenaitwe@gmail.com"}],"readme":"# @ablea/cashless\n\nTypeScript SDK for mobile-money operations with **MTN MoMo** and **Airtel Money** in Africa.\n\nThis is a dependency-free, fetch-based SDK that talks directly to the provider APIs.\n\n## Install\n\n```bash\nnpm install @ablea/cashless\n```\n\n## Usage\n\n```ts\nimport { CashlessClient } from '@ablea/cashless';\n\nconst cashless = new CashlessClient({\n  momo: {\n    apiUser: process.env.MOMO_API_USER,\n    apiKey: process.env.MOMO_API_KEY,\n    collectionsSubscriptionKey: process.env.MOMO_COLLECTIONS_SUBSCRIPTION_KEY,\n    disbursementsSubscriptionKey: process.env.MOMO_DISBURSEMENTS_SUBSCRIPTION_KEY,\n    environment: 'sandbox', // or 'production'\n  },\n  airtel: {\n    clientId: process.env.AIRTEL_CLIENT_ID,\n    clientSecret: process.env.AIRTEL_CLIENT_SECRET,\n    environment: 'sandbox', // or 'production'\n    country: 'UG',\n    currency: 'UGX',\n  },\n});\n\n// MTN MoMo collection\nawait cashless.momo?.collections.requestToPay('ref-123', {\n  amount: '1000',\n  currency: 'EUR', // MTN sandbox uses EUR. Use UGX for MTN Uganda production.\n  externalId: 'ORDER-123',\n  payer: { partyIdType: 'MSISDN', partyId: '46733123499' },\n});\n\n// Airtel Money USSD push\nawait cashless.airtel?.collections.ussdPush({\n  reference: 'ORDER-123',\n  subscriber: { country: 'UG', msisdn: '25677xxxxxxx' },\n  transaction: { amount: 5000, id: 'ref-123' },\n});\n```\n\n## Environments\n\n- **MTN MoMo:** `sandbox` routes collections through `https://sandbox.momodeveloper.mtn.com/collection` and disbursements through `https://sandbox.momodeveloper.mtn.com/disbursement`.\n- **Airtel Money (Uganda):** `sandbox` resolves to `https://openapiuat.airtel.ug`; `production` resolves to `https://openapi.airtel.ug`.\n\nFor other countries/deployments, pass a `baseUrl` explicitly.\n\n`subscriptionKey` is still supported as a legacy fallback, but MTN integrations should prefer `collectionsSubscriptionKey` and `disbursementsSubscriptionKey` so each product uses the correct key and access token.\n\nFor MTN balance and account-holder checks, `momo.common` remains an alias for collection operations. Use `momo.collectionCommon` for collections and `momo.disbursementCommon` for disbursements when you need product-specific keys and balances.\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}