{"_id":"@emmanuelapabiekun/budpay","_rev":"2-7f6a9aaa7856445710b4ee69ae2c250c","name":"@emmanuelapabiekun/budpay","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@emmanuelapabiekun/budpay","version":"0.0.1","keywords":["budpay","payments","payouts","bills","airtime","data","virtual-accounts","settlements","invoices","payment-links","identity-verification","fintech","africa","nigeria","ghana","sdk","api","typescript"],"author":{"name":"Emmanuel Apabiekun"},"license":"MIT","_id":"@emmanuelapabiekun/budpay@0.0.1","maintainers":[{"name":"emmanuelapabiekun","email":"emmanuelapabiekun@gmail.com"}],"homepage":"https://github.com/ekunemmanuel/budpay#readme","bugs":{"url":"https://github.com/ekunemmanuel/budpay/issues"},"dist":{"shasum":"91e1852d8cde7e14c9927c1eb5981e6547e09458","tarball":"https://registry.npmjs.org/@emmanuelapabiekun/budpay/-/budpay-0.0.1.tgz","fileCount":8,"integrity":"sha512-2Ojc6++7qeNX2c2YPR0+074uOfKDakz1a9JUWirKsPf8i7/4D4+zZ59fXk9ns1eo28TrdXYx2GBo1LU1qgf5BQ==","signatures":[{"sig":"MEQCIBVtUV78ls8hPwMIsnu8dvqVD2EDgjKOCnqW3/IKrbj3AiBLl1q0KlDH4HD/waczmIgiXvzrHAaONleJhqsSLa2d9w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":265615},"main":"./dist/index.cjs","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":"7986c33ecadc18158a15b573e852c064a6ed16c6","scripts":{"dev":"tsup --watch","lint":"tsc --noEmit","build":"tsup"},"_npmUser":{"name":"emmanuelapabiekun","email":"emmanuelapabiekun@gmail.com"},"repository":{"url":"git+https://github.com/ekunemmanuel/budpay.git","type":"git"},"_npmVersion":"11.6.2","description":"A lightweight, type-safe SDK for BudPay API","directories":{},"_nodeVersion":"24.12.0","dependencies":{"zod":"^4.3.6"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","@types/bun":"latest","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/budpay_0.0.1_1776006225238_0.1293658267262574","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@emmanuelapabiekun/budpay","version":"0.1.0","description":"A lightweight, type-safe SDK for BudPay API","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","author":{"name":"Emmanuel Apabiekun"},"license":"MIT","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"keywords":["budpay","payments","payouts","bills","airtime","data","virtual-accounts","settlements","invoices","payment-links","identity-verification","fintech","africa","nigeria","ghana","sdk","api","typescript"],"scripts":{"build":"tsup","dev":"tsup --watch","lint":"tsc --noEmit"},"type":"module","devDependencies":{"@types/bun":"latest","tsup":"^8.5.1","typescript":"^5"},"dependencies":{"zod":"^4.3.6"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"git+https://github.com/ekunemmanuel/budpay.git"},"gitHead":"dccbefeee779ded2d664ae46aaa6d72ba1c05c02","_id":"@emmanuelapabiekun/budpay@0.1.0","bugs":{"url":"https://github.com/ekunemmanuel/budpay/issues"},"homepage":"https://github.com/ekunemmanuel/budpay#readme","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-vVBI2WvX3hOtjV0vC040upGmdR8g/0uh0b5aEuQZzC3PEeLBM8gyvnzyUnT/BVGtOfriiV4/zgzgvSMK/RftqQ==","shasum":"7945d6dab326ef21374a8e7d5396c7afaf863ba5","tarball":"https://registry.npmjs.org/@emmanuelapabiekun/budpay/-/budpay-0.1.0.tgz","fileCount":8,"unpackedSize":243376,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFzZuGvXVFrO0f/wRJsjDE/85ifUsqfTFXpHyx3FP7RuAiB9DAhqsJWJgMUpUnkjEzXJmI6M9sbSkpuuJkkpEWpIzg=="}]},"_npmUser":{"name":"emmanuelapabiekun","email":"emmanuelapabiekun@gmail.com"},"directories":{},"maintainers":[{"name":"emmanuelapabiekun","email":"emmanuelapabiekun@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/budpay_0.1.0_1776007049397_0.6242483509551524"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T15:03:45.145Z","modified":"2026-04-12T15:17:29.647Z","0.0.1":"2026-04-12T15:03:45.468Z","0.1.0":"2026-04-12T15:17:29.531Z"},"bugs":{"url":"https://github.com/ekunemmanuel/budpay/issues"},"author":{"name":"Emmanuel Apabiekun"},"license":"MIT","homepage":"https://github.com/ekunemmanuel/budpay#readme","keywords":["budpay","payments","payouts","bills","airtime","data","virtual-accounts","settlements","invoices","payment-links","identity-verification","fintech","africa","nigeria","ghana","sdk","api","typescript"],"repository":{"type":"git","url":"git+https://github.com/ekunemmanuel/budpay.git"},"description":"A lightweight, type-safe SDK for BudPay API","maintainers":[{"name":"emmanuelapabiekun","email":"emmanuelapabiekun@gmail.com"}],"readme":"# BudPay TypeScript SDK\n\n[![npm version](https://img.shields.io/npm/v/@emmanuelapabiekun/budpay.svg)](https://www.npmjs.com/package/@emmanuelapabiekun/budpay)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA lightweight, high-fidelity, and type-safe SDK for integrating BudPay into your TypeScript/JavaScript projects. Built with performance and security in mind.\n\n## 🚀 Features\n\n- **Standardized Responses**: Every API call returns a consistent `{ success, status, message, data }` object.\n- **Type Safety**: Comprehensive TypeScript definitions for all request and response payloads.\n- **Enhanced Debugging**: Integrated diagnostic logging with sensitive data masking (keys, cards).\n- **Security**: HMAC-SHA256 signature verification for the required endpoints.\n- **Pending Features**: Webhook signature verification and card encryption (⚠️ Work In Progress).\n- **Zero Dependencies**: Lightweight footprint (only `zod` for validation).\n- **Dual Support**: Works with both ESM and CommonJS.\n\n## 📦 Installation\n\n```bash\nnpm install @emmanuelapabiekun/budpay\n# or\nyarn add @emmanuelapabiekun/budpay\n# or\npnpm add @emmanuelapabiekun/budpay\n# or\nbun add @emmanuelapabiekun/budpay\n```\n\n## 🛠️ Configuration\n\nInitialize the SDK with your BudPay secret and public keys. You can find these in your [BudPay Dashboard](https://dashboard.budpay.com).\n\n```typescript\nimport { BudPay } from \"@emmanuelapabiekun/budpay\";\n\nconst budpay = new BudPay({\n  secretKey: process.env.BUDPAY_SECRET_KEY,\n  publicKey: process.env.BUDPAY_PUBLIC_KEY,\n  debug: true, // Enable for detailed diagnostic logs\n});\n```\n\n> [!NOTE]\n> If keys are not provided in the constructor, the SDK will automatically look for `BUDPAY_SECRET_KEY` and `BUDPAY_PUBLIC_KEY` environment variables.\n\n## 📖 Usage Examples\n\n### Verify a Transaction\n\n```typescript\nconst response = await budpay.transactions.verify(\"TRANSACTION_REFERENCE\");\n\nif (response.success) {\n  console.log(\"Payment Successful:\", response.data);\n} else {\n  console.error(\"Verification Failed:\", response.message);\n}\n```\n\n### Create a Payout\n\n```typescript\nconst result = await budpay.payouts.transfer({\n  amount: \"1000\",\n  account_number: \"0123456789\",\n  bank_code: \"058\",\n  currency: \"NGN\",\n  reference: \"unique_bill_ref_\" + Date.now(),\n  narration: \"unique_bill_ref_\" + Date.now(),\n  bank_name: \"Test Bank\",\n  meta_data: [\n    {\n      sender_name: \"sender_name\",\n      sender_address: \"sender_address\",\n    },\n  ],\n});\n```\n\n### Bill Payment\n\n```typescript\nconst result = await budpay.bills.airtimeTopup({\n  amount: \"1000\",\n  reference: \"unique_bill_ref_\" + Date.now(),\n  provider: \"mtn\",\n  number: \"08012345678\",\n});\n```\n\n### Verify Webhook Signature (⚠️ Work In Progress)\n\nThe Webhook verification utility is currently under maintenance and has been temporarily deactivated in the SDK.\n\n```typescript\n// BudPay.verifyWebhook(...) // Currently throws an error\n```\n\n## 🔍 Modules\n\nThe SDK provides organized access to the entire BudPay API suite:\n\n| Module            | Description                                        |\n| ----------------- | -------------------------------------------------- |\n| `transactions`    | Payment initialization, verification, and history. |\n| `payouts`         | Bank transfers and wallet payouts.                 |\n| `bills`           | Airtime, data, and utility payments.               |\n| `virtualAccounts` | Dynamic and static bank account collection.        |\n| `customers`       | Customer profile management.                       |\n| `wallet`          | Balance checks and internal transfers.             |\n| `settlements`     | Track payouts to your business bank account.       |\n| `invoices`        | Professional invoice generation.                   |\n| `paymentLinks`    | Easy-to-share payment URLs.                        |\n| `identity`        | Account name verification and ID checks.           |\n\n## 🛡️ Security & Privacy\n\nThis SDK takes security seriously:\n\n- **Masking**: When `debug: true` is enabled, sensitive fields like card numbers and API keys are automatically redacted in logs.\n- **Encryption**: Built-in AES-CBC encryption for handling sensitive card data (⚠️ Work In Progress).\n- **Validation**: All inputs are validated using `zod` before being sent to the server.\n\n## 📄 Documentation\n\nFor detailed information on API parameters and behavior, please refer to the [Official BudPay Documentation](https://docs.budpay.com).\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📜 License\n\nMIT © [Emmanuel Apabiekun](https://github.com/ekunemmanuel)\n","readmeFilename":"README.md"}