{"_id":"@araute/sdk","_rev":"2-3c4e54fc9594b18f7180e3bd1b772997","name":"@araute/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@araute/sdk","version":"0.1.0","keywords":["araute","payments","sdk","typescript","nodejs","bun"],"license":"MIT","_id":"@araute/sdk@0.1.0","maintainers":[{"name":"albuquerquesz","email":"albq.victor@gmail.com"},{"name":"matheuslct","email":"tclmatheus26@gmail.com"}],"homepage":"https://github.com/arautehq/araute-sdk#readme","bugs":{"url":"https://github.com/arautehq/araute-sdk/issues"},"dist":{"shasum":"d96f35544551d51aae20311907acc5caa173a467","tarball":"https://registry.npmjs.org/@araute/sdk/-/sdk-0.1.0.tgz","fileCount":5,"integrity":"sha512-o4G+5YGf3j50l6N4VYAVYBhEfbl1lfsDPhc+ETcoAmFs+h/vX5vHnh5t0lUTXUHtonFhbgOQxQqC5lqqqCJiMw==","signatures":[{"sig":"MEUCIQDmNAyIJxzM3kSgklqPHSfzrsZj1cMD8SdqKKuB1Si/YQIgdcrTrRNt0PRXy/sO8z9fcTpliWwxMutZSL4yGwa9Jtc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43677},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"cad74f3ad5527623637bea8d526762b2bbdc9c31","scripts":{"pack":"bun pm pack","test":"bun test","build":"tsdown","check":"tsc -p tsconfig.json","publish:dry-run":"bun publish --dry-run"},"_npmUser":{"name":"albuquerquesz","email":"albq.victor@gmail.com"},"repository":{"url":"git+https://github.com/arautehq/araute-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"Bun and Node.js SDK for the Araute public API.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.10","devDependencies":{"tsdown":"^0.16.6","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1786121940849_0.0016180642461276484","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-08-07T16:59:00.699Z","modified":"2026-08-08T01:30:29.768Z","0.1.0":"2026-08-07T16:59:00.987Z"},"bugs":{"url":"https://github.com/arautehq/araute-sdk/issues"},"license":"MIT","homepage":"https://github.com/arautehq/araute-sdk#readme","keywords":["araute","payments","sdk","typescript","nodejs","bun"],"repository":{"url":"git+https://github.com/arautehq/araute-sdk.git","type":"git"},"description":"Bun and Node.js SDK for the Araute public API.","maintainers":[{"email":"allanmxr@gmail.com","name":"allanmxr"},{"email":"albq.victor@gmail.com","name":"albuquerquesz"},{"email":"tclmatheus26@gmail.com","name":"matheuslct"}],"readme":"# @araute/sdk\n\nCreate and manage Araute payments from TypeScript, Bun, or Node.js.\n\nThe SDK gives you typed resource clients, camelCase request and response fields, and consistent handling for pagination, retries, cancellation, and API errors.\n\n## Install\n\n```bash\nnpm install @araute/sdk\n# or: pnpm add @araute/sdk\n# or: bun add @araute/sdk\n```\n\n## Start here\n\nKeep your secret key in an environment variable:\n\n```ts\nimport { Araute } from \"@araute/sdk\";\n\nconst araute = new Araute({\n  apiKey: process.env.ARAUTE_API_KEY!,\n});\n\nconst checkout = await araute.checkouts.create({\n  amount: 1990, // amounts are in centavos\n  methods: [\"PIX\", \"CARD\"],\n  successUrl: \"https://example.com/checkout/success\",\n});\n\nconsole.log(checkout.url);\n```\n\nThe default API URL is `https://api.araute.com/v1`. You can override it, provide a custom `fetch`, or add a user-agent suffix:\n\n```ts\nconst araute = new Araute({\n  apiKey: process.env.ARAUTE_API_KEY!,\n  baseUrl: \"https://api.example.com/v1\",\n  userAgent: \"my-store/1.0.0\",\n});\n```\n\n## Resources\n\nAll methods return promises. Most resources support `create`, `list`, and `get`; customers, products, and subscriptions also support updates where defined.\n\n```ts\nconst customer = await araute.customers.create({\n  name: \"Ada Lovelace\",\n  email: \"ada@example.com\",\n});\n\nconst product = await araute.products.create({ name: \"Pro plan\" });\nconst price = await araute.prices.create({\n  product: product.id,\n  unitAmount: 1990,\n  recurring: { interval: \"MONTH\", intervalCount: 1 },\n});\n\nconst subscription = await araute.subscriptions.create({\n  customer: customer.id,\n  items: [{ price: price.id }],\n});\n\nconst payment = await araute.payments.create({\n  amount: 1990,\n  methods: [\"PIX\"],\n});\n```\n\nAvailable namespaces:\n\n- `customers` — create, list, retrieve, and update customers\n- `products` — create, list, retrieve, and update products\n- `prices` — create, list, and retrieve prices\n- `checkouts` — create, list, retrieve, and expire checkout sessions\n- `payments` — create, list, retrieve, confirm, and cancel payment intents\n- `subscriptions` — create, list, retrieve, update, pause, resume, cancel, and preview or apply changes\n- `invoices` — create, list, retrieve, add items, finalize, pay, void, and mark uncollectible\n- `refunds` — create, list, and retrieve refunds\n\n## Errors\n\nAPI problem responses throw `ArauteError`:\n\n```ts\nimport { ArauteError } from \"@araute/sdk\";\n\ntry {\n  await araute.refunds.create({ charge: \"ch_123\", amount: 500 });\n} catch (error) {\n  if (error instanceof ArauteError) {\n    console.log(error.code, error.status, error.detail, error.traceId);\n  }\n}\n```\n\n`ArauteError` also exposes field-level `errors`, `param`, `amountRefundable`, and `retryAfter` when the API provides them. Unexpected non-problem responses throw `ArauteTransportError`.\n\n## Development\n\n```bash\nbun install\nbun run check\nbun test\nbun run build\n```\n\nThe package is released under the MIT license.\n","readmeFilename":"README.md"}