{"_id":"@abshahin/payments-sdk","_rev":"10-45eebb63aff27dafbae629a8f1636799","name":"@abshahin/payments-sdk","dist-tags":{"latest":"0.8.0"},"versions":{"0.1.0":{"name":"@abshahin/payments-sdk","version":"0.1.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.1.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"f08e570abf93444591011db0f9356983a13ffaa8","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.1.0.tgz","fileCount":37,"integrity":"sha512-nVUCMXkkYFBJ3UwrtTvWxYWtw3YThPf11bDUu9Mo0tHac39w53bMwy1MI35Sofr0ht7mSVl/lQ51F+PU6WQNhw==","signatures":[{"sig":"MEUCIF8sLFyf+M3hHT0shT0zmVN93y8DrHxW5yy54hAoO0+4AiEAsfO4qE0bcGwVhcItvHT4+UpQH7MSL1mDJhugGOv9TJE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111406},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8ef19c69195e4678da987aadf91679c994b310dc","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.1.0_1768049133498_0.2847491998673146","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@abshahin/payments-sdk","version":"0.2.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.2.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"901a385db0b6cab019f84bbb5530b3f82b35acd0","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.2.0.tgz","fileCount":37,"integrity":"sha512-6v1LRwzkfc38UtMjl61XV4IIsihmqP2P7hOrjpcY9GYm4QiHcp9TB/uqyy2O5sdTkbHpAgRdYxD5ThxJGC6jCQ==","signatures":[{"sig":"MEYCIQCTPy6peUwXWFoZ1nVKASpthbS+nC3hxS0lL1mG05V48gIhAKTMwdBTDCGGiA8poA3UvMRQ6CYNrQpcr7c0ewSzkuAa","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":111812},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3bc8af8f5dd5bd07b9d79454e15d119c63908992","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.2.0_1768052163750_0.575169219152591","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@abshahin/payments-sdk","version":"0.3.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.3.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"d0393608a9944626ad029113f8274b8fa1304456","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.3.0.tgz","fileCount":45,"integrity":"sha512-OT8CuUvTJq0Ry4i8Ow7Aa3wWOWnEEBVScDGNVNlz3T6xx5G5V7saR8iRaJuyYWza5HblCRXvYstGwnLPymNcgg==","signatures":[{"sig":"MEUCICEpEitMUaujhvJXSBazj9xHdhtzDFKJxIoSbGyUieUcAiEAjmNXYFYzhWHA5ciHojkV2BKhFRxoeU2qx6o38UK131A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":361755},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"fb7aed9724b66f3708287ce2b77f9f951c13805f","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.3.0_1768228235942_0.8548282273312726","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@abshahin/payments-sdk","version":"0.4.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.4.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"6d8b97f0ff21a80b41293d5ee75e54f1970cb0f3","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.4.0.tgz","fileCount":49,"integrity":"sha512-Z5CrHxDJNMmOMlJ0r5Xski5reu2j0sqfuQUDJnjIGP1Kw/8XzN7zyULvZu1zQ1ptHofnCHbmPD/cRobLF7NwbQ==","signatures":[{"sig":"MEYCIQDFt0WAANCd5WQssWnN0tkQVPf6eKG/wTn6dwybCLRpkQIhAJR06nop/R0Nj0nSNe8ndQi7E0F2IGQfLvkQ6PlL8VCv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":521250},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"102c5a1396c44537e54dd75d4bbc7242dae5cb6b","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.4.0_1768248483696_0.35818740985188335","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@abshahin/payments-sdk","version":"0.5.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.5.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"75b8813fc02e6122aa77588c48565dc220c5f83d","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.5.0.tgz","fileCount":49,"integrity":"sha512-AsCR/+N2ih5ZmLwe11k3Q48H8srOV0bofcJjqxdyqclqmm4kGuP4AfrjMGZdm3ybK99JjIE766ITmMdvG4zU+Q==","signatures":[{"sig":"MEUCIBPCJdefJc9vW0eqMgwXT/UwoBGE7dIr4JES+W0LghLcAiEAmsur3ThI58M+9bu2NnQmOtukUHz4DCP6iMXDv0t3Lgc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":523652},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d74b464f982a329fe0e8924317c14175936d6747","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.5.0_1768312328504_0.10805875970267498","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@abshahin/payments-sdk","version":"0.6.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.6.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"281a1e4bab98cf63f958cacbecbb04c645485a3f","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.6.0.tgz","fileCount":49,"integrity":"sha512-f+MO0PmgHrW0ZtTn97+Y0PAqY/7XH/eynr9/7VB0T4b5GAzA9rq6mbF4kO36FqjgF/mizcaVGUVQ0svqzIK0sQ==","signatures":[{"sig":"MEUCIAnt0GZ0+tgqCnVMobEflxfjWNdS0n7QQwemHzrGfFaSAiEAnAd8noGRsRx2d+3kNoMQ41t7yWMRBymrb0K5dvZx+3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":531284},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"e7bacb5eddcc60433c56740a805487e62424eee7","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"10.9.3","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.6.0_1768551745610_0.40465623253771676","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@abshahin/payments-sdk","version":"0.6.1","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.6.1","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"311a34dd545f1cfd27ec478e14eaf53a15ea4050","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.6.1.tgz","fileCount":58,"integrity":"sha512-CTDwAHRIvKKeE7M39xD4jId/RDhCVb1y5WIYOszn6QJ3+VMvRI6PQnNdYJ6LhwlsqF7FF426CLbZLiWc9akotA==","signatures":[{"sig":"MEYCIQDz2Wa7mVgiCA+YbknPCXUBoWp753gzFgda2W4w/u0WkQIhAMZFVcK9lAGFHpVB463KmVW6ddXNGWoMYT6HvWg6Shij","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":812834},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"08166f8b17899c7752779f6a3cffcaa5191c2bdc","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.6.1_1779431852261_0.8429687027730703","host":"s3://npm-registry-packages-npm-production"}},"0.6.2":{"name":"@abshahin/payments-sdk","version":"0.6.2","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.6.2","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"4eeef81101b010e6fc77e40dbe744985b31cd5b7","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.6.2.tgz","fileCount":58,"integrity":"sha512-NlKncWKpIT6F7khgzwsBsSqq/Cy0u/RwmKZj5n9BsSbjhNbdOT4XWMf008WCRtRsUWJpe7t+Axdc5DGd4O8iYA==","signatures":[{"sig":"MEUCIQCbrRd6mDyk2MogxcmACk0x9dWu5d/WlSvWJhqI2tf0lAIgWWpTgLa3yCQY69qd5V52V1kBhNAEHCYg3KqMfCic5qg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":819565},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"1180f7195a83f2ccda4605e650ed633efe8ec9e9","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.6.2_1779554603880_0.6811840776113993","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@abshahin/payments-sdk","version":"0.7.0","keywords":["payment","gateway","moyasar","paypal","paymob","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","_id":"@abshahin/payments-sdk@0.7.0","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"homepage":"https://github.com/aashahin/payments-sdk#readme","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"dist":{"shasum":"ba9e672272336b47308465fa7a54195cddf02c69","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.7.0.tgz","fileCount":66,"integrity":"sha512-VWPEkegu1aBBcQVHpLV8ZnC0MaxtuuK5sQZ1taubZetNh7yrY6u+MKlF24ZmwOEKyZ3eve38FZqLJaA/OyAD+g==","signatures":[{"sig":"MEUCIQCH2FpOJaG/9OzyrvoGTJMYh8oSBujS+/lw+sOXayqQxwIgFuJ0Y5yM53EUOHM+NunvEWj/pfYr2fAvZ5PZKLW04Pw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":657421},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c0dfad6764ec65c743d17287765fdf27b09e0474","scripts":{"dev":"bun --watch src/index.ts","test":"bun test","build":"bun build ./src/index.ts --outdir ./dist --target bun && bun run build:types","typecheck":"tsc --noEmit","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"repository":{"url":"git+https://github.com/aashahin/payments-sdk.git","type":"git"},"_npmVersion":"11.12.1","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","directories":{},"_nodeVersion":"25.9.0","dependencies":{"zod":"3","jose":"^6.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/payments-sdk_0.7.0_1784777996792_0.8942124873428272","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@abshahin/payments-sdk","version":"0.8.0","description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob, Stripe and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"bun build ./src/index.ts --outdir ./dist --target node --format esm --packages external && bun run build:types","build:types":"tsc --emitDeclarationOnly --declaration --outDir dist","dev":"bun --watch src/index.ts","test":"bun test","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"engines":{"node":">=18","bun":">=1.0.0"},"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"peerDependencies":{},"keywords":["payment","gateway","moyasar","paypal","paymob","stripe","multi-gateway","typescript"],"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aashahin/payments-sdk.git"},"publishConfig":{"access":"public"},"homepage":"https://github.com/aashahin/payments-sdk#readme","dependencies":{"zod":"3.25.76"},"gitHead":"4bd8aff65e7991506a583f8cc8c972e5085e2c65","_id":"@abshahin/payments-sdk@0.8.0","bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-uzT2Ph2Uo1QeCLfxzP9BQXO8XwEFTsEI8k5WWebL/fRPk9DqL+L5SagUta9tLAR6YTcrsnwWVOwDpUJaE0i7ig==","shasum":"dec485e05e75fc7ff56ec6d732b6a401d5aa9217","tarball":"https://registry.npmjs.org/@abshahin/payments-sdk/-/payments-sdk-0.8.0.tgz","fileCount":58,"unpackedSize":650471,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDmvYXeixmIrOtwP9nJMss6k3bLYl2pfzMAjpNg+aLilwIgUpk05z3fMSUZQ/slTSypQikVMfLA8JfGgS4uxTNXp30="}]},"_npmUser":{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"},"directories":{},"maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/payments-sdk_0.8.0_1785664341399_0.09927634854743506"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-10T12:45:33.414Z","modified":"2026-08-02T09:52:21.720Z","0.1.0":"2026-01-10T12:45:33.638Z","0.2.0":"2026-01-10T13:36:03.920Z","0.3.0":"2026-01-12T14:30:36.079Z","0.4.0":"2026-01-12T20:08:03.868Z","0.5.0":"2026-01-13T13:52:08.653Z","0.6.0":"2026-01-16T08:22:25.826Z","0.6.1":"2026-05-22T06:37:32.421Z","0.6.2":"2026-05-23T16:43:24.016Z","0.7.0":"2026-07-23T03:39:56.929Z","0.8.0":"2026-08-02T09:52:21.568Z"},"bugs":{"url":"https://github.com/aashahin/payments-sdk/issues"},"author":{"name":"Abdelrahman Shaheen"},"license":"MIT","homepage":"https://github.com/aashahin/payments-sdk#readme","keywords":["payment","gateway","moyasar","paypal","paymob","stripe","multi-gateway","typescript"],"repository":{"type":"git","url":"git+https://github.com/aashahin/payments-sdk.git"},"description":"Unified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob, Stripe and other payment gateways with type-safe lifecycle hooks and normalized webhooks.","maintainers":[{"name":"abshahin","email":"abdelrahmanshaheeen8@gmail.com"}],"readme":"# @abshahin/payments-sdk\n\nUnified, framework-agnostic payment SDK for Bun & TypeScript. Seamlessly integrate Moyasar, PayPal, Paymob and Stripe payment gateways with type-safe lifecycle hooks and normalized webhooks.\n\n## Features\n\n- 🔌 **Multi-Gateway Support**: Moyasar, PayPal, Paymob, Stripe\n- 🪝 **Lifecycle Hooks**: Before, after, and error hooks on hooked operations (global + per-op where supported — not every method has a dedicated hook; see [hooks matrix](./docs/hooks.md#which-operations-fire-which-hooks))\n- 🔒 **Type-Safe**: Full TypeScript support with strict types\n- 🌐 **Framework-Agnostic**: Works with Elysia, Express, Hono, or vanilla\n\n## Documentation\n\n- **Gateways**\n  - [Moyasar](./docs/moyasar.md)\n  - [PayPal](./docs/paypal.md)\n  - [Paymob](./docs/paymob.md)\n  - [Stripe](./docs/stripe.md)\n- **Core Concepts**\n  - [Lifecycle Hooks](./docs/hooks.md)\n  - [Webhook Handling](./docs/webhooks.md)\n  - [Logging & Redaction](./docs/logging.md)\n  - [Custom Gateways](./docs/custom-gateways.md)\n\n## Package Structure\n\n```\npayments-sdk/              # package root (@abshahin/payments-sdk)\n├── src/\n│   ├── index.ts           # Main exports\n│   ├── client.ts          # PaymentClient orchestrator\n│   ├── errors.ts          # Custom error classes\n│   ├── types/             # Type definitions\n│   ├── hooks/             # Lifecycle hooks\n│   └── gateways/          # Gateway implementations (moyasar, paypal, paymob, stripe)\n├── dist/                  # Built output\n├── docs/                  # Documentation\n├── resources/             # Resources\n├── package.json\n├── README.md\n└── tsconfig.json\n```\n\n## Installation\n\n```bash\nbun add @abshahin/payments-sdk\n# or\nnpm install @abshahin/payments-sdk\n# or\npnpm add @abshahin/payments-sdk\n```\n\nThis package is **ESM-only** (`\"type\": \"module\"`, `exports.import` only — no CommonJS `require` build). Use Node ≥ 18 or Bun ≥ 1.0 with ESM (`import` / `\"type\": \"module\"`).\n\n## Quick Start\n\n```typescript\nimport { PaymentClient } from '@abshahin/payments-sdk';\n\nconst client = new PaymentClient({\n  moyasar: {\n    secretKey: process.env.MOYASAR_SECRET_KEY!,\n    webhookSecret: process.env.MOYASAR_WEBHOOK_SECRET,\n  },\n  defaultGateway: 'moyasar',\n});\n\n// Create a payment\nconst result = await client.createPayment({\n  amount: 100,\n  currency: 'SAR',\n  orderId: 'order_123',\n  callbackUrl: 'https://example.com/callback',\n  moyasarSource: {\n    type: 'token',\n    token: 'token_xxx',\n  },\n});\n\nif (result.status === 'failed') {\n  // Do not mark the order paid.\n} else if (result.redirectUrl) {\n  // Redirect customer for 3DS verification\n}\n```\n\n## Multi-Gateway Usage\n\n```typescript\nconst client = new PaymentClient({\n  moyasar: { secretKey: '...' },\n  paypal: { clientId: '...', clientSecret: '...' },\n  paymob: {\n    secretKey: '...',\n    publicKey: '...',\n    hmacSecret: '...',\n    integrationId: 123456,\n    authIntegrationId: 456789, // for capture: false auth/capture flows\n    region: 'ksa',\n    timeoutMs: 30000,\n  },\n  stripe: {\n    secretKey: 'sk_...',           // required — this package is server-side only\n    publishableKey: 'pk_...',      // optional here; browser Stripe.js / Elements only\n    webhookSecret: 'whsec_...',\n  },\n  defaultGateway: 'moyasar',\n});\n\n// Use default gateway\nawait client.createPayment({ ... });\n\n// Specify gateway explicitly\nawait client.createPayment({ ... }, 'paypal');\n\n// Stripe Checkout Example\nconst stripe = client.gateway('stripe');\nconst session = await stripe.createCheckoutSession({\n  successUrl: 'https://example.com/success',\n  cancelUrl: 'https://example.com/cancel',\n  mode: 'payment',\n  metadata: { paymentId: 'order_123' },\n  lineItems: [\n    {\n      priceData: {\n        currency: 'USD',\n        productData: {\n          name: 'T-Shirt',\n        },\n        amount: 20,\n      },\n      quantity: 10,\n    }\n  ]\n});\n```\n\n### Multi-gateway: refund IDs and `capture: false`\n\nThe unified API hides provider differences, but **IDs and auth flows are not interchangeable** across gateways. Store the IDs each provider expects for later capture / refund / void:\n\n| Topic | Moyasar | PayPal | Paymob | Stripe |\n|-------|---------|--------|--------|--------|\n| **Refund target ID** | Payment UUID from create / webhook | **Capture ID** (not order ID) from `capturePayment()` | **Numeric transaction ID** from webhook/dashboard (not intention `pi_...`) | PaymentIntent `pi_...` (or related charge, per Stripe docs) |\n| **`capture: false`** | Auth-only payment; later `capturePayment` / `voidPayment` on that payment ID | `AUTHORIZE` intent order → customer approves → `authorizePayment` → `capturePayment` / void on **authorization ID** | Sends `is_auth: true` and uses `authIntegrationId` (or auth method override); capture/void use **transaction ID** | PaymentIntent with manual capture; later `capturePayment` / cancel (void) on `pi_...` |\n\nAlways use the gateway that created the payment for follow-up calls (`refundPayment(..., 'paypal')`, etc.). See each gateway doc for edge cases (partial refunds, currency, idempotency).\n\n### Integrator caveats\n\n- **After-hooks cannot undo money.** Hooks that run after a successful create/capture/refund/void (`onAfter`, `afterCapture`, …) may throw or return `{ proceed: false }`, but the provider side effect already happened — the SDK **logs and still returns success** (no `PaymentAbortedError`, no reverse of the charge). Use before-hooks to abort, and reconcile in your app if an after-hook fails. Details: [hooks](./docs/hooks.md#after-hooks-cannot-abort-money-operations).\n- **Webhook handlers must be idempotent on `event.id`.** Providers retry deliveries. The SDK verifies and normalizes events; it does **not** dedupe by provider event id. Persist processed `event.id` (or equivalent) and no-op duplicates before fulfilling orders. Details: [webhooks](./docs/webhooks.md).\n- **Amounts are major-unit decimals (float risk).** Public APIs take clean `number` amounts in major units (e.g. `10.5` SAR), converted to provider minor units inside the SDK. Pass well-formed decimals only — avoid float arithmetic like `0.1 + 0.2` as inputs; prefer integer minor units or a decimal type on your side until conversion.\n\n## Production checklist\n\nUse this before going live. Gateway-specific details live under [docs/](./docs/).\n\n| Check | Why |\n|-------|-----|\n| **PayPal `webhookId`** | Required for `verifyWebhookAsync` / `handleWebhook`. Missing config throws `InvalidRequestError` (`paypal.webhookId is required…`). Set from the PayPal Developer Dashboard webhook. |\n| **Moyasar / Paymob `idempotencyStore` (multi-worker)** | In-memory store is per process only. Multi-worker, serverless, or restart-safe capture/refund/void needs a shared store (Redis/DB) with atomic `reserve` where available. Configure `moyasar.idempotencyStore` / `paymob.idempotencyStore` and pass `idempotencyKey` on mutations. |\n| **Raw body for webhooks** | Stripe and PayPal verification need the **unparsed** request body (string/Buffer). Do not `JSON.parse` first; prefer `client.handleWebhook(gateway, rawBody, signatureOrHeaders)`. |\n| **Fulfill on `status`, not `success`** | `success: true` can mean non-terminal outcomes (`pending`, authorized holds, PayPal echeck). Ship/fulfill only when **`status === 'paid'`** (or `authorized` for auth-only holds you intentionally treat as reserved). Prefer verified webhooks over browser redirects. |\n| **Float major-unit amounts** | Public `amount` is a JS `number` in major units. Avoid float math as inputs (`0.1 + 0.2`); pass clean decimals. Zero- and three-decimal currencies still convert at the SDK boundary. |\n| **Idempotent webhook handlers** | Persist processed `event.id` (app-level — the SDK does not store it) before inventory/fulfillment. |\n| **Secret keys server-side only** | Never put `secretKey` / `clientSecret` / `whsec_…` / HMAC secrets in browser code. |\n\n## Keys: secret vs publishable\n\nThis package is **server-side only**. Configure **secret** keys (`secretKey`, PayPal `clientSecret`, Stripe `sk_…` / `whsec_…`, Moyasar `sk_…`, Paymob `secretKey` / `hmacSecret`) on the backend.\n\n**Publishable / public keys** (`publishableKey`, Paymob `publicKey`) are for browser SDKs (Stripe.js, Elements, Paymob.js, etc.). They are optional on `PaymentClient` config and are **not** used for create/capture/refund/void or webhook verification in this package. Do not put secret keys in client-side code.\n\n## Stripe Webhook Note\n\nFor Stripe webhooks, you **MUST** pass the raw request body to `handleWebhook` (or `verifyWebhook` if you verify manually). If your framework parses JSON automatically, access the raw body buffer or string before parsing; Buffer payloads are verified using their original bytes.\nPrefer `client.handleWebhook('stripe', rawBody, signature)` — it verifies, parses, and runs webhook hooks. Stripe webhook verification fails closed when `webhookSecret` is not configured.\nStripe webhook parsing expects snapshot events with `data.object`; hydrate thin events before passing them to `parseWebhookEvent`. Checkout, invoice, and subscription webhooks normalize `gatewayPaymentId` to the related PaymentIntent, SetupIntent, or Subscription when Stripe includes one.\n\n```typescript\n// Example using Elysia / Fetch-style handlers\napp.post('/webhook/stripe', async ({ request }) => {\n    const signature = request.headers.get('stripe-signature') ?? undefined;\n    const rawBody = await request.text(); // raw body — do not JSON.parse first\n\n    const event = await client.handleWebhook('stripe', rawBody, signature);\n    // fulfill from event.status / event.gatewayPaymentId — be idempotent on event.id\n    return { received: true };\n});\n```\n\n## Error Handling\n\n```typescript\nimport {\n  PaymentError,\n  PaymentAbortedError,\n  GatewayNotConfiguredError,\n  InvalidWebhookError,\n  GatewayApiError,\n  CardDeclinedError,\n  InsufficientFundsError,\n  RateLimitError,\n} from '@abshahin/payments-sdk';\n\ntry {\n  await client.createPayment({ ... });\n} catch (error) {\n  if (error instanceof PaymentAbortedError) {\n    // Aborted by a hook\n    console.log('Aborted:', error.message);\n  } else if (error instanceof GatewayApiError) {\n    // Gateway API returned an error\n    console.log('Gateway error:', error.rawError);\n  } else if (error instanceof PaymentError) {\n    // Other payment error\n    console.log('Error code:', error.code);\n  }\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}