{"_id":"@abacatepay/rest","_rev":"6-e09980d65a1717abd387dfbde4cdde97","name":"@abacatepay/rest","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.1":{"name":"@abacatepay/rest","version":"0.0.1","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"license":"Apache-2.0","_id":"@abacatepay/rest@0.0.1","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"accounts@eualmeida.com.br"}],"homepage":"https://github.com/almeidazs/abacatepay-npm#readme","bugs":{"url":"https://github.com/almeidazs/abacatepay-npm/issues"},"dist":{"shasum":"0ff6e75516b6bd134fde506cca64184c6c0bbaaa","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-0.0.1.tgz","fileCount":8,"integrity":"sha512-3IY/m3J7ypbSPpZzPBJkFLvXkSIygJ4QdYcd0KKwwJC7XQAvR0lVUCDElLzdQvijzLjjMamW8TJLtPaS+Swhmg==","signatures":[{"sig":"MEUCIBiJDOof+vfRXy9JTK94VkqvB8F+EtfznFf7qIcAMQmlAiEA3EAmBWwGFDuJZwIKygjSM5FLq8eLhFHXfqkUEuviOGY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9261},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"239527328efcd8f1818163d3bdcef53086967c7a","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts --outdir dist --target node && bun run types","types":"bunx tsc --emitDeclarationOnly","prepublishOnly":"bun run build"},"_npmUser":{"name":"escoteiros","email":"accounts@eualmeida.com.br"},"repository":{"url":"git+https://github.com/almeidazs/abacatepay-npm.git","type":"git"},"_npmVersion":"11.6.2","description":"A REST client for AbacatePay API","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@biomejs/biome":"^2.3.11"},"_npmOperationalInternal":{"tmp":"tmp/rest_0.0.1_1768477283366_0.6378939483365837","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@abacatepay/rest","version":"0.0.2","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"author":{"url":"https://abacatepay.com","name":"AbacatePay","email":"opensource@abacatepay.com"},"license":"Apache-2.0","_id":"@abacatepay/rest@0.0.2","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"accounts@eualmeida.com.br"}],"homepage":"https://github.com/AbacatePay/ecosystem#readme","bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"dist":{"shasum":"ab6e0029324724125161b45828f1023f4b6599c6","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-0.0.2.tgz","fileCount":9,"integrity":"sha512-4eFsMf2+6QRmYid4sSuWbFqEqgRcpnAIWL8RzjfNTv1FDa9nXiAea5Ez4q1P1gNgu6CAnOR4R8uvKUUsSv0aZg==","signatures":[{"sig":"MEUCIFfwj8HJjrMp6dLG8BQ9eUc+MeQVuWTyvCDyug7zE2uOAiEApRSKwOFBsnbyd44DDs+0F9qm+krx2NJxNgB6qLFEHrg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13801},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"2ae457e7804ba9460a3af29674c3c797ddd57ace","scripts":{"test":"bun test","build":"rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types","types":"bunx tsc --emitDeclarationOnly","prepublishOnly":"bun run build"},"_npmUser":{"name":"escoteiros","email":"accounts@eualmeida.com.br"},"repository":{"url":"git+https://github.com/AbacatePay/ecosystem.git","type":"git"},"_npmVersion":"11.6.2","description":"A REST client for AbacatePay API","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@biomejs/biome":"^2.3.11"},"_npmOperationalInternal":{"tmp":"tmp/rest_0.0.2_1769437057743_0.07830960950615928","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@abacatepay/rest","version":"0.0.3","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"author":{"url":"https://abacatepay.com","name":"AbacatePay","email":"opensource@abacatepay.com"},"license":"Apache-2.0","_id":"@abacatepay/rest@0.0.3","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"accounts@eualmeida.com.br"}],"homepage":"https://github.com/AbacatePay/ecosystem#readme","bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"dist":{"shasum":"4a111a5008447a00bd327ab89f520d3fc1c989f7","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-0.0.3.tgz","fileCount":9,"integrity":"sha512-s1yXEZ+EiGYPvvZX6QcZyfIOdrgpLG8fh2cghEaU0kBZoOfYS7ik2zAja1NvfnFsL7PRNtY/tXQF3euf4zdvIA==","signatures":[{"sig":"MEUCIBVifAaMzWOMyHaVcoOJzwrV65zWg6uHZyUKxDB/lT+xAiEAk+w/V381PMyTGes2CDfLinWQ+6OkMrCfHUUq1oYaGqM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14475},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"3f69f426c6aeda297252667bb2cfb9aa19f99e91","scripts":{"test":"bun test","build":"rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types","types":"bunx tsc --emitDeclarationOnly","prepublishOnly":"bun run build"},"_npmUser":{"name":"escoteiros","email":"accounts@eualmeida.com.br"},"repository":{"url":"git+https://github.com/AbacatePay/ecosystem.git","type":"git"},"_npmVersion":"11.6.2","description":"A REST client for AbacatePay API","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@biomejs/biome":"^2.3.11"},"_npmOperationalInternal":{"tmp":"tmp/rest_0.0.3_1769514613307_0.24214402819962455","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@abacatepay/rest","version":"1.0.0","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"author":{"url":"https://abacatepay.com","name":"AbacatePay","email":"opensource@abacatepay.com"},"license":"Apache-2.0","_id":"@abacatepay/rest@1.0.0","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"ajuda@abacatepay.com"}],"homepage":"https://github.com/AbacatePay/ecosystem#readme","bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"dist":{"shasum":"a59391fdb5cee516d4d1344e91f87b1241f56d5a","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-1.0.0.tgz","fileCount":8,"integrity":"sha512-5kDGyrSQiSolomDx5wm2yqswNmfN/IxnvB6fSD5zoyNARCTA+o89PA7cWQatw3RNGsvn+5QqQ6Hjqy7KDJNyDw==","signatures":[{"sig":"MEUCIQDuxjII1i6DbQFHFmlX+rFOk22TdZVmbaW0kHcrSnZ2EgIgQ+8xqg7CspIz4KaHFMazMvIhYwz501KUaiRjJ1+8ua8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13614},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"2dc44ef4789adc69e81f94a8e459cc85fd76668c","scripts":{"test":"bun test","build":"rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types","types":"bunx tsc --emitDeclarationOnly","prepublishOnly":"bun run build"},"_npmUser":{"name":"escoteiros","email":"ajuda@abacatepay.com"},"repository":{"url":"git+https://github.com/AbacatePay/ecosystem.git","type":"git"},"_npmVersion":"11.8.0","description":"A REST client for AbacatePay API","directories":{},"sideEffects":false,"_nodeVersion":"24.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@biomejs/biome":"^2.3.11"},"_npmOperationalInternal":{"tmp":"tmp/rest_1.0.0_1785159257299_0.39247213276100257","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@abacatepay/rest","version":"1.0.1","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"author":{"url":"https://abacatepay.com","name":"AbacatePay","email":"opensource@abacatepay.com"},"license":"Apache-2.0","_id":"@abacatepay/rest@1.0.1","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"ajuda@abacatepay.com"}],"homepage":"https://github.com/AbacatePay/ecosystem#readme","bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"dist":{"shasum":"c0490bbde374a76ce1ca5f98e7789d42da1adef0","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-1.0.1.tgz","fileCount":9,"integrity":"sha512-m1etOwZ/Az3DilFCKrGsyOriLcODHGjcO/cL9V2SJNZNauplGMi24u5apLx6xZ5a5tdMvJLnhHtxKfhqgRFDpQ==","signatures":[{"sig":"MEQCICbE61zrstLVuSoBNYuKfsMH7O/A9XgPEYl5ugUxhcadAiBLwdTVruIoN55o6kJB6T4ajL5WkrTij4mZDFc31PNJQw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14713},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"bun":">=1.0.0","node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"4f44b0102e118ca7fd4abd4da8c094cf8f22360c","scripts":{"test":"bun test","build":"rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types","types":"bunx tsc --emitDeclarationOnly","prepublishOnly":"bun run build"},"_npmUser":{"name":"escoteiros","email":"ajuda@abacatepay.com"},"repository":{"url":"git+https://github.com/AbacatePay/ecosystem.git","type":"git"},"_npmVersion":"11.8.0","description":"A REST client for AbacatePay API","directories":{},"sideEffects":false,"_nodeVersion":"24.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0","@biomejs/biome":"^2.3.11"},"_npmOperationalInternal":{"tmp":"tmp/rest_1.0.1_1785181653974_0.8482952956744245","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@abacatepay/rest","version":"1.0.2","type":"module","sideEffects":false,"license":"Apache-2.0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","author":{"name":"AbacatePay","email":"opensource@abacatepay.com","url":"https://abacatepay.com"},"maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"ajuda@abacatepay.com"}],"scripts":{"test":"bun test","build":"rm -rf dist && bun run scripts/version.ts && bun build src/index.ts --outdir dist --target node && bun run types","types":"dts-bundle-generator -o dist/index.d.ts src/index.ts --disable-symlinks-following","prepublishOnly":"bun run build"},"engines":{"node":">=18","bun":">=1.0.0"},"repository":{"type":"git","url":"git+https://github.com/AbacatePay/ecosystem.git"},"keywords":["abacatepay","payments","sdk","rest","api","typescript"],"publishConfig":{"access":"public"},"devDependencies":{"@biomejs/biome":"^2.3.11","dts-bundle-generator":"^9.5.1","typescript":"^5.0.0"},"description":"A REST client for AbacatePay API","gitHead":"5c10083ce1c3dfce4b35af061f28b10bec33ff32","_id":"@abacatepay/rest@1.0.2","bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"homepage":"https://github.com/AbacatePay/ecosystem#readme","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-0oBvhFnNUSzKS86s4cqAsrih2pLJnk2IPV7vWl3agWEZyIWRs4un83EU2NGNaaJW3UeTeydN127KloR1HzcIXQ==","shasum":"c51823267701a822df81c6500f6c8d419a93776d","tarball":"https://registry.npmjs.org/@abacatepay/rest/-/rest-1.0.2.tgz","fileCount":5,"unpackedSize":14426,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1DWIUfFFLEYrXmKeDRHkquNh6k582i5S0TtoB0kwVmAIgfvfnaaBm0VyWA9hUnhBW1mWHsupR+eNbqWIXXXPzkOU="}]},"_npmUser":{"name":"escoteiros","email":"ajuda@abacatepay.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rest_1.0.2_1785184792872_0.05148293052211961"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T11:41:23.254Z","modified":"2026-07-27T20:39:53.220Z","0.0.1":"2026-01-15T11:41:23.503Z","0.0.2":"2026-01-26T14:17:37.911Z","0.0.3":"2026-01-27T11:50:13.451Z","1.0.0":"2026-07-27T13:34:17.434Z","1.0.1":"2026-07-27T19:47:34.117Z","1.0.2":"2026-07-27T20:39:53.009Z"},"bugs":{"url":"https://github.com/AbacatePay/ecosystem/issues"},"author":{"name":"AbacatePay","email":"opensource@abacatepay.com","url":"https://abacatepay.com"},"license":"Apache-2.0","homepage":"https://github.com/AbacatePay/ecosystem#readme","keywords":["abacatepay","payments","sdk","rest","api","typescript"],"repository":{"type":"git","url":"git+https://github.com/AbacatePay/ecosystem.git"},"description":"A REST client for AbacatePay API","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"bolodissenouraa","email":"daniel@abacatepay.com"},{"name":"escoteiros","email":"ajuda@abacatepay.com"}],"readme":"<div align=\"center\">\n\n# AbacatePay REST\n\nUm REST Client para a API da AbacatePay — rápido, seguro e testado.</br>\nO [`@abacatepay/rest`](https://www.npmjs.com/package/@abacatepay/rest) é um **cliente REST leve e totalmente tipado** para interagir com a API do AbacatePay.</br>\nProjetado para **Node.js, Bun e runtimes modernos**, com retries inteligentes, timeout e tratamento de erros consistente.\n\n<img src=\"https://res.cloudinary.com/dkok1obj5/image/upload/v1767631413/avo_clhmaf.png\" width=\"100%\" alt=\"AbacatePay Open Source\"/>\n\n## Instalação\n\nUse com o seu *package manager* favorito\n\n</div>\n\n```bash\nbun add @abacatepay/rest\n# Ou\npnpm add @abacatepay/rest\n# Ou\nnpm install @abacatepay/rest\n```\n\n<div align=\"center\">\n\n## Uso Básico\n\nSimule um pagamento QRCodePix que tenha o ID `pix_char_123456`\n</div>\n\n```ts\nimport { createREST } from '@abacatepay/rest';\n\nconst client = createREST({\n\tsecret: process.env.ABACATEPAY_API_KEY!,\n});\n\nconst pix = await client.post('/transparents/simulate-payment', {\n    query: { id: 'pix_char_123456' },\n});\n\nconsole.log(pix);\n```\n\n<div align=\"center\">\n\n## Retry & Backoff\n\nPor padrão, o REST faz **3 retries** automaticamente para erros **retryable** (rate limit, 5xx, erro de rede).\n\n</div>\n\n```ts\nconst client = createREST({\n    retry: {\n        max: 5\n    },\n})\n```\n\n<div align=\"center\">\n\n### Backoff customizado\n</div>\n\n```ts\nconst client = createREST({\n\tretry: {\n\t\tmax: 7,\n\t\tbackoff(attempt) {\n\t\t\t// Backoff exponencial\n\t\t\treturn Math.min(10_000, 500 * 2 ** attempt);\n\t\t},\n\t},\n});\n```\n\n<p align=\"center\">Se nenhum backoff for fornecido, o REST usa backoff exponencial com jitter automaticamente.</p>\n\n<div align=\"center\">\n\n## Tratando erros\n\nO REST Client **nunca lança exceções** — toda chamada resolve com o mesmo formato `{ data, error, success }` que a própria API da AbacatePay retorna. Falhas do lado do cliente (rede, timeout, secret ausente) são normalizadas para esse mesmo formato.\n\n</div>\n\n```ts\nconst { data, error, success } = await client.get('/customers/invalid');\n\nif (!success) {\n\tconsole.error('Erro:', error);\n\n\treturn;\n}\n\nconsole.log(data);\n```\n\n<div align=\"center\">\n\nVocê pode ver a documentação completa por [aqui](https://docs.abacatepay.com/pages/rest).\n\nFeito com 🥑 pela equipe AbacatePay</br>\nOpen source, de verdade.\n\n</div>\n","readmeFilename":"README.md"}