{"_id":"@axionenterprise/pay-sdk","name":"@axionenterprise/pay-sdk","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@axionenterprise/pay-sdk","version":"1.0.1","description":"Official Node.js SDK for AxionPAY API","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"engines":{"node":">=18.0.0"},"scripts":{"check":"node --eval \"import('./dist/index.mjs').then(() => console.log('ok'))\"","test":"node --test test/sdk.test.mjs","prepublishOnly":"npm run check && npm run test"},"keywords":["axion","axionpay","sdk","payments","pix"],"repository":{"type":"git","url":"git+https://github.com/axionenterprise/sandbox.git","directory":"packages/axion-pay-sdk"},"gitHead":"4373f42332d8b2b2597fb6d565e87a27b87d391a","_id":"@axionenterprise/pay-sdk@1.0.1","bugs":{"url":"https://github.com/axionenterprise/sandbox/issues"},"homepage":"https://github.com/axionenterprise/sandbox#readme","_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-761z6qZ7P7Q5p2NzuexmrYDPJLyxFt/T3uvaCsV5Va6Jgyd+Sg3xdlejJejw4K9d1ywSMR+R2Me4ErTnc6YeGg==","shasum":"f006488a051e8bc06dd9c0484782a5bf53ede74d","tarball":"https://registry.npmjs.org/@axionenterprise/pay-sdk/-/pay-sdk-1.0.1.tgz","fileCount":6,"unpackedSize":15371,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCshnOonNumgf0AV2tIoOZ2ZTt14gTea781RN2nQwXJhwIgG5I87DtSG7Crj2kN9r1L+6m1MrLLcOLyYrnOy4qH84E="}]},"_npmUser":{"name":"axion777","email":"axionenterprise777@gmail.com"},"directories":{},"maintainers":[{"name":"axion777","email":"axionenterprise777@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pay-sdk_1.0.1_1772222907090_0.1507782338588346"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-27T20:08:27.006Z","1.0.1":"2026-02-27T20:08:27.214Z","modified":"2026-02-27T20:08:27.438Z"},"maintainers":[{"name":"axion777","email":"axionenterprise777@gmail.com"}],"description":"Official Node.js SDK for AxionPAY API","homepage":"https://github.com/axionenterprise/sandbox#readme","keywords":["axion","axionpay","sdk","payments","pix"],"repository":{"type":"git","url":"git+https://github.com/axionenterprise/sandbox.git","directory":"packages/axion-pay-sdk"},"bugs":{"url":"https://github.com/axionenterprise/sandbox/issues"},"license":"MIT","readme":"﻿# @axionenterprise/pay-sdk\n\nSDK oficial Node.js para a API `https://pay.axionenterprise.cloud/`.\n\n## InstalaÃ§Ã£o\n\n```bash\nnpm install @axionenterprise/pay-sdk\n```\n\n## InÃ­cio rÃ¡pido (ESM)\n\n```js\nimport { AxionPay } from \"@axionenterprise/pay-sdk\";\n\nconst client = new AxionPay({\n  apiKey: process.env.AXION_PAY_API_KEY\n});\n\nconst health = await client.health();\nconsole.log(health);\n```\n\n## InÃ­cio rÃ¡pido (CommonJS)\n\n```js\nconst { AxionPay } = require(\"@axionenterprise/pay-sdk\");\n```\n\n## ConfiguraÃ§Ã£o\n\n- `baseUrl`: URL base da API. PadrÃ£o `https://pay.axionenterprise.cloud/api`\n- `apiKey`: token de autenticaÃ§Ã£o\n- `timeoutMs`: timeout por requisiÃ§Ã£o em milissegundos. PadrÃ£o `30000`\n- `userAgent`: User-Agent customizado da integraÃ§Ã£o\n\n## MÃ©todos principais\n\n- `health()`\n- `createCharge(payload)`\n- `getChargeStatus(chargeId)`\n- `cancelCharge(chargeId)`\n- `createRefund(payload)`\n- `listTransactions(query?)`\n- `createWebhook(payload)`\n- `listWebhooks()`\n\n```js\nconst charge = await client.createCharge({\n  amount: 1000,\n  currency: \"BRL\",\n  customer: {\n    name: \"Cliente Exemplo\",\n    email: \"cliente@dominio.com\"\n  }\n});\n\nconst chargeStatus = await client.getChargeStatus(charge.id);\nconst refund = await client.createRefund({ chargeId: charge.id, amount: 500 });\nconst txs = await client.listTransactions({ page: 1, status: \"paid\" });\n```\n\n## MÃ©todos HTTP genÃ©ricos\n\n- `request(path, options)`\n- `get(path, options?)`\n- `post(path, body, options?)`\n- `put(path, body, options?)`\n- `patch(path, body, options?)`\n- `delete(path, options?)`\n\n## Tratamento de erros\n\n```js\nimport { AxionPayError } from \"@axionenterprise/pay-sdk\";\n\ntry {\n  await client.listWebhooks();\n} catch (error) {\n  if (error instanceof AxionPayError) {\n    console.log(error.status, error.code, error.message, error.details);\n  }\n}\n```\n\r\n","readmeFilename":"README.md","_rev":"1-442244b2b07479e0a535d397184a8755"}