{"_id":"@chrono-os/payment-mercadopago","_rev":"6-fa8bcb9f70e8c046771bc32fcaf5cc25","name":"@chrono-os/payment-mercadopago","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"@chrono-os/payment-mercadopago","version":"0.1.0","keywords":["chrono-os","mercadopago","fastify","payment","webhook"],"license":"UNLICENSED","_id":"@chrono-os/payment-mercadopago@0.1.0","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"3a3fcede293d38179e4d6a532674895ee2695bb4","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-0.1.0.tgz","fileCount":16,"integrity":"sha512-WlLNSzhd0iQI84PYUC2Ca66RW0+Vwg3BAGox+Svlo/EvEntYwGXq92h75B+7FAwIX6vrUYa9JmNDOIX+fBa1lg==","signatures":[{"sig":"MEYCIQCp+asch/keHCf9iwj3BUyeD4C7bXBpUYlY46cIWZh6qQIhAMl2nt0HnT4sJuCZAfjG3KXDz0oSUtfrwOoQVnrB3K/E","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74483},"main":"./dist/fastify/index.cjs","type":"module","types":"./dist/fastify/index.d.ts","module":"./dist/fastify/index.js","engines":{"node":">=20"},"exports":{"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"}},"gitHead":"fcf948145966ef12c8d812cfe4388422f07f44b6","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago payment plugin para Fastify — createPreference + webhook handler com HMAC verify + idempotency + bootstrap mode (manual_fallback sem token)","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^5.0.0","@prisma/client":"^5.0.0 || ^6.0.0"},"peerDependenciesMeta":{"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/payment-mercadopago_0.1.0_1779797683706_0.8416585909825351","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@chrono-os/payment-mercadopago","version":"0.2.0","keywords":["chrono-os","mercadopago","fastify","payment","webhook"],"license":"UNLICENSED","_id":"@chrono-os/payment-mercadopago@0.2.0","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"24c0a3ba88e8d8ad89f519ebe0dbeab490e143ec","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-0.2.0.tgz","fileCount":16,"integrity":"sha512-Fpz9bWBTpQdSwUTsXiPDM5IkwppQvUhvUB8byCoXWvDTWytfSv3CvDBwnviQFQrjB9Brzk0Cgtq03JOhu3m26A==","signatures":[{"sig":"MEUCIQCGTuaSsWmLh8WhjLO76oMWMxSBEt6Bnp8wxXO2xgixWgIgXnGEG/t//6F31pa5ythXnYJqjeSCkkMr6h5NcARK3Hk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76517},"main":"./dist/fastify/index.cjs","type":"module","types":"./dist/fastify/index.d.ts","module":"./dist/fastify/index.js","engines":{"node":">=20"},"exports":{"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"}},"gitHead":"336191efbaffda85d0ffc64cb6a934b1f0403f79","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago payment plugin para Fastify — createPreference + webhook handler com HMAC verify + idempotency + bootstrap mode (manual_fallback sem token)","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"^5.4.0","@types/node":"^20.0.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^5.0.0","@prisma/client":"^5.0.0 || ^6.0.0 || ^7.0.0"},"peerDependenciesMeta":{"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/payment-mercadopago_0.2.0_1788409496274_0.7351614227418126","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@chrono-os/payment-mercadopago","version":"1.0.0","keywords":["chrono-os","mercadopago","mercado-pago","fastify","nestjs","payment","webhook"],"license":"UNLICENSED","_id":"@chrono-os/payment-mercadopago@1.0.0","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"9285a9bf4420d0f0c0bbe807884e7fc732dd1799","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-1.0.0.tgz","fileCount":34,"integrity":"sha512-rbmqnuDw1pxklmg3mbqrjEE1I9f474MMiC+JPM8cnaumFibCoT+815T7AmusivXKtm1apKZ83Y90W4UlbrQJeA==","signatures":[{"sig":"MEYCIQDKtUttzpRDPh0T96ZRVfnz/ZibidX4olMhXoQlXnSClgIhAOAwvnVrGLFGlPP9CQsF3y47ukFcduBSbPXsy49TA88l","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIANa4TQaVUQaT6cpk4dHkhL9aDRLr8gyfI5BKlzqwMCvAiEA7OhZDez1L1qgE7fJjWC1tS53wljjI1mk0hg2LFMiii8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":240303},"main":"./dist/core/index.cjs","type":"module","types":"./dist/core/index.d.ts","module":"./dist/core/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./nestjs":{"types":"./dist/nestjs/index.d.ts","import":"./dist/nestjs/index.js","require":"./dist/nestjs/index.cjs"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"},"./package.json":"./package.json"},"gitHead":"32e52a5933d1311776ed6b61ea2e22ec31693d2d","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago (Checkout Pro + webhook) sem framework: assinatura HMAC fail-closed com anti-replay, fetchPayment com valor e moeda, status normalizado (refunded/chargeback), claim atômico e HTTP certo por tipo de falha. Adaptadores Fastify e NestJS.","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","rxjs":"^7.8.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"5.9.3","@types/node":"^20.0.0","@nestjs/common":"^11.1.0","reflect-metadata":"^0.2.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^4.0.0 || ^5.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@prisma/client":"^5.0.0 || ^6.0.0 || ^7.0.0"},"peerDependenciesMeta":{"zod":{"optional":true},"fastify":{"optional":true},"@nestjs/common":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/payment-mercadopago_1.0.0_1789070640703_0.06489213560487617","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@chrono-os/payment-mercadopago","version":"1.1.0","keywords":["chrono-os","mercadopago","mercado-pago","fastify","nestjs","payment","webhook"],"license":"UNLICENSED","_id":"@chrono-os/payment-mercadopago@1.1.0","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"b64fda16b9826880dd9903d17e96d9d484ed3cc4","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-1.1.0.tgz","fileCount":34,"integrity":"sha512-BfLGAuxumW4/Yi3U8+LH1Y7brq3cq5eyg1BJTY56oo7id6vcHK6Ki0gsll0uokPSeLnq8qZyLYG5OJgY30UehQ==","signatures":[{"sig":"MEYCIQCRhqsR4MkY3h985Ee4Je7Mj5j5agfNLwGflWKFsb0l7wIhAKdwrwIJf01e3WkkzYfSD8r3pzvxt05AZOPV0WKnEsyD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCPRg8qQlQlK6RmiFnF7/jtiQoQyEFXKVRKmkgmvY++DgIgLgE5OGNfukgWdmtTgDBvsww1AiDYw1/9v6s5cKTxrjw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":246220},"main":"./dist/core/index.cjs","type":"module","types":"./dist/core/index.d.ts","module":"./dist/core/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./nestjs":{"types":"./dist/nestjs/index.d.ts","import":"./dist/nestjs/index.js","require":"./dist/nestjs/index.cjs"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"},"./package.json":"./package.json"},"gitHead":"c68b83ee736a78dc094c8973e94c4644844d6fb7","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago (Checkout Pro + webhook) sem framework: assinatura HMAC fail-closed com anti-replay, fetchPayment com valor e moeda, status normalizado (refunded/chargeback), claim atômico e HTTP certo por tipo de falha. Adaptadores Fastify e NestJS.","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","rxjs":"^7.8.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"5.9.3","@types/node":"^20.0.0","@nestjs/common":"^11.1.0","reflect-metadata":"^0.2.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^4.0.0 || ^5.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@prisma/client":"^5.0.0 || ^6.0.0 || ^7.0.0"},"peerDependenciesMeta":{"zod":{"optional":true},"fastify":{"optional":true},"@nestjs/common":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/payment-mercadopago_1.1.0_1789073385484_0.8239688965890564","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@chrono-os/payment-mercadopago","version":"1.1.1","keywords":["chrono-os","mercadopago","mercado-pago","fastify","nestjs","payment","webhook"],"license":"UNLICENSED","_id":"@chrono-os/payment-mercadopago@1.1.1","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"c83931ffc6741829e419c88bc764ed9f37c3a857","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-1.1.1.tgz","fileCount":34,"integrity":"sha512-3ihXB5+KV7kJ6bI4UZRVW395oqY0PA8sI6lgyvHdTVDBIdqKC0XBIEI2/pQnWLWTtWqJbOB3fb9p2mxlOjDwHQ==","signatures":[{"sig":"MEQCIFyhoxrzH28AuLxbsY8e4K7ajy489uEoaG6ofAIakzH6AiBfjOY2FDWBZk5QXdWh4JdXhvY8LiSInAMOWyGQLnUm6w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFKncl3dDu+Ewl2q+Q3fnF3PP0rPZ4oVWT646CXxLeD/AiEAs5huMg9fN1CyzHIdyH63BXfGGM4mmv4OgqnCq1B6zyY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":246888},"main":"./dist/core/index.cjs","type":"module","types":"./dist/core/index.d.ts","module":"./dist/core/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./nestjs":{"types":"./dist/nestjs/index.d.ts","import":"./dist/nestjs/index.js","require":"./dist/nestjs/index.cjs"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"},"./package.json":"./package.json"},"gitHead":"fd2fb285b97f4917c4ef90fcbb15c3eaad639513","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago (Checkout Pro + webhook) sem framework: assinatura HMAC fail-closed com anti-replay, fetchPayment com valor e moeda, status normalizado (refunded/chargeback), claim atômico e HTTP certo por tipo de falha. Adaptadores Fastify e NestJS.","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"typesVersions":{"*":{"core":["./dist/core/index.d.ts"],"nestjs":["./dist/nestjs/index.d.ts"],"schema":["./dist/schema/index.d.ts"],"fastify":["./dist/fastify/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","rxjs":"^7.8.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"5.9.3","@types/node":"^20.0.0","@nestjs/common":"^11.1.0","reflect-metadata":"^0.2.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^4.0.0 || ^5.0.0","@nestjs/common":"^10.0.0 || ^11.0.0","@prisma/client":"^5.0.0 || ^6.0.0 || ^7.0.0"},"peerDependenciesMeta":{"zod":{"optional":true},"fastify":{"optional":true},"@nestjs/common":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/payment-mercadopago_1.1.1_1789074637771_0.5915189673762087","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"_id":"@chrono-os/payment-mercadopago@2.0.0","bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"dist":{"shasum":"40ca5cf2ab5d2512b11335bdc09e16e0a6e7f187","tarball":"https://registry.npmjs.org/@chrono-os/payment-mercadopago/-/payment-mercadopago-2.0.0.tgz","fileCount":34,"integrity":"sha512-obzMCciuOQ2KY8ItRUpSmc2VI5+MxTaD6802zrei0o+xMPeIChsi8b58/CmhLC7k16GpoPmAwSTXkWY3RcGWhw==","signatures":[{"sig":"MEUCIHoHgZKrcrZeTOMqa8pySUYTlL+fKrMQIULXHhFey16jAiEA43crsoIxbG7FURBO8WmbB3/rtazVcxvniPxncVuXt5U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCYRV6anXcUiO6S1SJw3Npfgy8zglZGG7U4uUZJsBZjMAIhAJ/oCtR2FpQfTwJLTSg+YaGZq1Az+GgudPms3Siv2bE/"}],"unpackedSize":255059},"main":"./dist/core/index.cjs","name":"@chrono-os/payment-mercadopago","type":"module","types":"./dist/core/index.d.ts","module":"./dist/core/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js","require":"./dist/core/index.cjs"},"./nestjs":{"types":"./dist/nestjs/index.d.ts","import":"./dist/nestjs/index.js","require":"./dist/nestjs/index.cjs"},"./schema":{"types":"./dist/schema/index.d.ts","import":"./dist/schema/index.js","require":"./dist/schema/index.cjs"},"./fastify":{"types":"./dist/fastify/index.d.ts","import":"./dist/fastify/index.js","require":"./dist/fastify/index.cjs"},"./package.json":"./package.json"},"gitHead":"6dbc799e3c6dfa084b564a5b559455402c2a4eca","license":"UNLICENSED","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"version":"2.0.0","_npmUser":{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"},"homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","keywords":["chrono-os","mercadopago","mercado-pago","fastify","nestjs","payment","webhook"],"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"_npmVersion":"11.9.0","description":"Mercado Pago (Checkout Pro + webhook) sem framework: assinatura HMAC fail-closed com anti-replay, fetchPayment com valor e moeda, status normalizado (refunded/chargeback), claim atômico e HTTP certo por tipo de falha. Adaptadores Fastify e NestJS.","directories":{},"maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"_nodeVersion":"24.14.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"typesVersions":{"*":{"core":["./dist/core/index.d.ts"],"nestjs":["./dist/nestjs/index.d.ts"],"schema":["./dist/schema/index.d.ts"],"fastify":["./dist/fastify/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.23.0","rxjs":"^7.8.0","tsup":"^8.0.0","vitest":"^1.5.0","fastify":"^5.0.0","typescript":"5.9.3","@types/node":"^20.0.0","@nestjs/common":"^11.1.0","reflect-metadata":"^0.2.0"},"peerDependencies":{"zod":"^3.23.0","fastify":"^4.0.0 || ^5.0.0","@prisma/client":"^5.0.0 || ^6.0.0 || ^7.0.0"},"peerDependenciesMeta":{"zod":{"optional":true},"fastify":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/payment-mercadopago_2.0.0_1789076434939_0.9597729467266569"}}},"time":{"created":"2026-05-26T12:14:43.471Z","modified":"2026-09-10T21:40:35.299Z","0.1.0":"2026-05-26T12:14:43.845Z","0.2.0":"2026-09-03T04:24:56.419Z","1.0.0":"2026-09-10T20:04:00.802Z","1.1.0":"2026-09-10T20:49:45.584Z","1.1.1":"2026-09-10T21:10:37.916Z","2.0.0":"2026-09-10T21:40:35.029Z"},"bugs":{"url":"https://github.com/SugarHoneyIceTea/payment-mercadopago/issues"},"license":"UNLICENSED","homepage":"https://github.com/SugarHoneyIceTea/payment-mercadopago#readme","keywords":["chrono-os","mercadopago","mercado-pago","fastify","nestjs","payment","webhook"],"repository":{"url":"git+https://github.com/SugarHoneyIceTea/payment-mercadopago.git","type":"git"},"description":"Mercado Pago (Checkout Pro + webhook) sem framework: assinatura HMAC fail-closed com anti-replay, fetchPayment com valor e moeda, status normalizado (refunded/chargeback), claim atômico e HTTP certo por tipo de falha. Adaptadores Fastify e NestJS.","maintainers":[{"name":"sugarhoneyicetea","email":"aquilaferraz@gmail.com"}],"readme":"# @chrono-os/payment-mercadopago\n\nMercado Pago (Checkout Pro + webhook) sem framework, com adaptadores Fastify e NestJS.\n\nO que o pacote garante no webhook:\n\n- **Assinatura fail-closed.** HMAC-SHA256 do `x-signature`, comparação em tempo constante. Sem secret configurado, o webhook é rejeitado.\n- **Anti-replay.** Janela de 5 min sobre o `ts` assinado.\n- **A verdade vem do MP.** O corpo da notificação nunca é confiado: o pacote consulta `GET /v1/payments/:id` e devolve status, valor e moeda.\n- **Status normalizado.** `paid`, `pending`, `failed`, `refunded`, `chargeback`.\n- **HTTP certo por falha.** 401 para assinatura ruim; 503/500 para falha nossa (o MP re-entrega); 200 para processado, ignorado ou duplicado.\n- **Claim atômico.** `claimOnce` padroniza o \"só um processa\" — o app fornece o update condicional.\n\n## Install\n\n```bash\nyarn add @chrono-os/payment-mercadopago\n```\n\nPacote público em [npmjs.org](https://www.npmjs.com/package/@chrono-os/payment-mercadopago). Framework é peer **opcional**: `fastify` só para `./fastify`, `zod` só para `./schema`. O `./nestjs` não importa nada do Nest em runtime (ver abaixo).\n\n## Entrypoints\n\n| Import | Conteúdo |\n|---|---|\n| `@chrono-os/payment-mercadopago` ou `/core` | Tudo, sem framework e sem dependência |\n| `/nestjs` | Core + `handleMpWebhook`, `resolveMpWebhookResult`, `nestMpLogger` |\n| `/fastify` | Core + `mpWebhookHandler` |\n| `/schema` | Schemas Zod (`orderIntentSchema`, `catalogItemSchema`, `orderStatusSchema`) |\n\nProjeto com `moduleResolution: node` (CommonJS clássico, caso do Nest) não lê `exports` do `package.json`; o pacote declara `typesVersions` a partir da 1.1.1, então `/core`, `/nestjs`, `/fastify` e `/schema` resolvem tipo sem `paths` no `tsconfig`.\n\n## Uso — NestJS\n\n```ts\nimport { HttpException, Logger } from '@nestjs/common'\nimport { claimOnce, checkPaidAmount, createMpWebhookProcessor, handleMpWebhook, nestMpLogger } from '@chrono-os/payment-mercadopago/nestjs'\n\nconst logger = new Logger('MercadoPago')\nconst processor = createMpWebhookProcessor({\n  accessToken: env.MP_ACCESS_TOKEN,\n  webhookSecret: env.MP_WEBHOOK_SECRET,\n  logger: nestMpLogger(logger),\n  onPayment: async (event) => {\n    const order = await prisma.order.findUnique({ where: { id: event.externalReference } })\n    if (!order) return { outcome: 'ignored', reason: 'order_not_found' }\n    if (event.status !== 'paid') { /* pending/failed/refunded/chargeback */ return }\n\n    const amount = checkPaidAmount({ expectedCents: order.amountCents, paidCents: event.transactionAmountCents, paidCurrency: event.currencyId })\n    if (!amount.ok) return { outcome: 'ignored', reason: amount.reason }\n\n    const r = await claimOnce({\n      claim: () => prisma.order.updateMany({ where: { id: order.id, paidAt: null }, data: { status: 'paid', paidAt: new Date() } }),\n      effect: () => entregar(order),\n    })\n    return r.claimed ? undefined : { outcome: 'duplicate' }\n  },\n})\n\n@Controller('webhooks')\nexport class WebhooksController {\n  @Post('mp')\n  @HttpCode(200)\n  mp(@Req() req: Request) {\n    return handleMpWebhook(processor, req, { HttpException }) // 2xx → corpo; 401/5xx → HttpException com o mesmo status\n  }\n}\n```\n\n**Por que passar o `HttpException`:** o adaptador não importa `@nestjs/common`. Em monorepo Yarn com o Nest instalado só no workspace do app, um import feito de dentro do pacote ou não acha o módulo (quebra o boot) ou acha uma segunda cópia — e o `instanceof HttpException` do exception filter do app falha, transformando 401/503 em 500. Com a classe do próprio app o filter sempre reconhece. Erro lançado pelo `onPayment` sobe como veio (o filter reporta a exceção real).\n\n## Uso — Fastify\n\n```ts\nimport { mpWebhookHandler } from '@chrono-os/payment-mercadopago/fastify'\n\napp.post('/webhooks/mp', mpWebhookHandler({\n  accessToken: env.MP_ACCESS_TOKEN,\n  webhookSecret: env.MP_WEBHOOK_SECRET,\n  onPayment: async (event) => { /* mesmo contrato do exemplo acima */ },\n}))\n```\n\n## Checkout Pro\n\n```ts\nimport { createMercadoPagoClient } from '@chrono-os/payment-mercadopago'\n\nconst mp = createMercadoPagoClient({ accessToken: env.MP_ACCESS_TOKEN }) // timeout 10 s\nconst pref = await mp.createPreference({\n  externalReference: order.id,\n  title: order.productTitle,\n  amountCents: order.amountCents,\n  payer: { email: order.customerEmail, name: order.customerName },\n  backUrls: { success: `${site}/checkout/sucesso?order=${order.id}`, pending: '...', failure: '...' },\n  notificationUrl: `${apiPublica}/webhooks/mp`,\n})\n// pref === null → sem access token (bootstrap): trate como manual_fallback\n```\n\n`auto_return: 'approved'` só vai quando a URL de sucesso é HTTPS — o MP rejeita a preference em HTTP.\n\n## Respostas do webhook\n\n| Situação | HTTP | `outcome` |\n|---|---|---|\n| Assinatura ausente, inválida ou fora da janela | 401 | `invalid_signature` |\n| Nenhum secret configurado | 503 | `signature_not_configured` |\n| Falha ao consultar o MP (rede, timeout, 5xx, 404) | 503 | `fetch_failed` |\n| `onPayment` lançou | 500 | `handler_failed` |\n| `onPayment` devolveu `{ outcome: 'duplicate' }` | 200 | `duplicate` |\n| Processado | 200 | `processed` |\n| Não é payment, sem id, sem `external_reference`, sem access token | 200 | `ignored` |\n\n## Dev local sem secret\n\n```ts\ncreateMpWebhookProcessor({ ..., allowUnsignedWebhooksInsecure: process.env.NODE_ENV === 'development' })\n```\n\nCom `NODE_ENV=production` essa flag lança `MpConfigError` na construção. Para testar com assinatura real, use `signMpWebhookForTesting`.\n\n## Versionamento\n\nSemVer. Releases via tag `v*` no [repo](https://github.com/SugarHoneyIceTea/payment-mercadopago). Migração da 0.x: seção **BREAKING** do [CHANGELOG.md](CHANGELOG.md). Segurança: [SECURITY.md](SECURITY.md).\n\n## Origem\n\nExtraído do SobreVivendo Adulto (2026-05) e reescrito na 1.0 (2026-09) juntando as proteções que o SVA e o Me Responda tinham implementado cada um por conta própria.\n","readmeFilename":"README.md"}