{"_id":"@basis-theory/tokestration-node-sdk-poc","_rev":"3-e1a033004904c05127dc9b5efb0e2763","name":"@basis-theory/tokestration-node-sdk-poc","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@basis-theory/tokestration-node-sdk-poc","version":"1.0.1","keywords":["api","fetch","http","typescript"],"author":{"name":"Basis Theory"},"license":"MIT","_id":"@basis-theory/tokestration-node-sdk-poc@1.0.1","maintainers":[{"name":"greathouse-bt","email":"robert@basistheory.com"},{"name":"kevinperaza-bt","email":"kevin@basistheory.com"},{"name":"jleon15","email":"josue@basistheory.com"},{"name":"lcschy","email":"lucas@basistheory.com"},{"name":"briangonzalezatbt","email":"brian.gonzalez@basistheory.com"},{"name":"dhudec","email":"drew@basistheory.com"},{"name":"davi.basistheory","email":"davi@basistheory.com"},{"name":"armsteadj1","email":"armsteadj1@gmail.com"},{"name":"matthew_basistheory","email":"matthew@basistheory.com"},{"name":"bt-platform","email":"platform@basistheory.com"}],"dist":{"shasum":"6e16251744aa0bd033f6dd6ae7b763a160907a1d","tarball":"https://registry.npmjs.org/@basis-theory/tokestration-node-sdk-poc/-/tokestration-node-sdk-poc-1.0.1.tgz","fileCount":15,"integrity":"sha512-Vs/gwBxn9lCiZ/E7yX0bsAjB93Nr9uCNvCFNvRt9ucTx4iADXdkgoEyHWaMYLYggaF8TesJH7+SEuVJFRfjGiw==","signatures":[{"sig":"MEYCIQDsz6Cw/sAlDXBZzpRTZXICHhYrhcIGC9fQmtrHJfnrCAIhAJStuZ+pfzbhhB0rHkY6cYQ+pKQJ3ZVyWVvotd4Dxrdn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18865},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"01bf2e4bfffaa6f4625a31eeebf4da3c36fb1771","_npmUser":{},"_npmVersion":"9.9.3","description":"A POC for a Node.js SDK for Tokestration","directories":{},"_nodeVersion":"18.20.4","dependencies":{"-":"^0.0.1","dotenv":"^16.4.5","ts-node":"^10.9.2","node-fetch":"^3.3.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tokestration-node-sdk-poc_1.0.1_1727759730018_0.8471204027876207","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@basis-theory/tokestration-node-sdk-poc","version":"1.0.2","description":"A POC for a Node.js SDK for Tokestration","main":"dist/index.js","types":"dist/index.d.ts","type":"module","keywords":["api","fetch","http","typescript"],"author":{"name":"Basis Theory"},"license":"MIT","dependencies":{"-":"^0.0.1","dotenv":"^16.4.5","node-fetch":"^3.3.2","ts-node":"^10.9.2"},"publishConfig":{"access":"public"},"_id":"@basis-theory/tokestration-node-sdk-poc@1.0.2","gitHead":"4370607fb60f8b067951c5b48932ae1e20767139","_nodeVersion":"18.20.4","_npmVersion":"9.9.3","dist":{"integrity":"sha512-bWPLuZQdP5DekprvoSbw80P8VEoS3JvK7QEENs4XWCGQwA8NMk/NYugJgi8SzPv1BaL3EAWuPAXOYC7HgoEMVg==","shasum":"01c603138afafe06a9467ca2fb679ee5e1e75435","tarball":"https://registry.npmjs.org/@basis-theory/tokestration-node-sdk-poc/-/tokestration-node-sdk-poc-1.0.2.tgz","fileCount":25,"unpackedSize":19657,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6ZADbqKsY9rLVtyJSeMh+Wk1LpEvkHw9CWGsryB7xrAiEA6j75SjzPN22I9duZtbihNZXJqcaGTt5haPNxL+uR/FA="}]},"_npmUser":{"name":"bt-platform","email":"platform@basistheory.com"},"directories":{},"maintainers":[{"name":"greathouse-bt","email":"robert@basistheory.com"},{"name":"kevinperaza-bt","email":"kevin@basistheory.com"},{"name":"jleon15","email":"josue@basistheory.com"},{"name":"lcschy","email":"lucas@basistheory.com"},{"name":"briangonzalezatbt","email":"brian.gonzalez@basistheory.com"},{"name":"dhudec","email":"drew@basistheory.com"},{"name":"davi.basistheory","email":"davi@basistheory.com"},{"name":"armsteadj1","email":"armsteadj1@gmail.com"},{"name":"matthew_basistheory","email":"matthew@basistheory.com"},{"name":"bt-platform","email":"platform@basistheory.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tokestration-node-sdk-poc_1.0.2_1727791503035_0.8429629705385218"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-01T05:15:29.919Z","modified":"2024-10-01T14:05:03.848Z","1.0.1":"2024-10-01T05:15:30.210Z","1.0.2":"2024-10-01T14:05:03.266Z"},"author":{"name":"Basis Theory"},"license":"MIT","keywords":["api","fetch","http","typescript"],"description":"A POC for a Node.js SDK for Tokestration","maintainers":[{"name":"greathouse-bt","email":"robert@basistheory.com"},{"name":"kevinperaza-bt","email":"kevin@basistheory.com"},{"name":"jleon15","email":"josue@basistheory.com"},{"name":"lcschy","email":"lucas@basistheory.com"},{"name":"briangonzalezatbt","email":"brian.gonzalez@basistheory.com"},{"name":"dhudec","email":"drew@basistheory.com"},{"name":"davi.basistheory","email":"davi@basistheory.com"},{"name":"armsteadj1","email":"armsteadj1@gmail.com"},{"name":"matthew_basistheory","email":"matthew@basistheory.com"},{"name":"bt-platform","email":"platform@basistheory.com"}],"readme":"# Multi-Provider Payment SDK\n\nA TypeScript SDK for integrating multiple payment providers with a unified interface.\n\n## Supported Payment Providers\n\n- Stripe\n- Adyen\n- Braintree\n- TabaPay\n- Chase Orbital\n\n## Installation\n\n```bash\nnpm install 🦄\n```\n\n## Usage\n\n1. **Initialize the SDK:**\n\n```typescript\nconst paymentService = new PaymentService({\n    basisTheoryApiKey: \"\",\n    providerAuth: {\n        ...\n    }\n});\n```\n2. **Tokenize a payment method:**\n\n```typescript\nconst token = await paymentService.tokenize.stripe({ token: '15dab1fa-61c9-4ac1-a1f0-8199001dca74' });\nconst token = await paymentService.tokenize.braintree({ token: '15dab1fa-61c9-4ac1-a1f0-8199001dca74' });\n```\n\n3. **Charge a token:**\n\n```typescript\nconst charge = await paymentService.charge.stripe({ processingToken: token.processingToken, amount: 1000 });\nconst charge = await paymentService.charge.braintree({ processingToken: token.processingToken, amount: 1000 });\n```\n\n\n## Running the Test Client\n\nTo run the test client and see the SDK in action, follow these steps:\n\n1. **Set up environment variables:**\n   Copy the `.env.example` file to `.env` and fill in your actual API keys and credentials for each payment provider.\n\n   ```bash\n   cp .env.example .env\n   ```\n\n   Then edit the `.env` file with your real credentials. (you can find these [here](https://start.1password.com/open/i?a=75XETZ2XIFHSXCZGDBPJZWMK6U&v=antg42qvuomzgel2ylxej644qq&i=imwpfukbfg7gzv7s7lz3zcxlki&h=basistheory.1password.com))\n\n2. **Install dependencies:**\n   Make sure you have all the necessary dependencies installed.\n\n   ```bash\n   npm install\n   ```\n\n3. **Run the test client:**\n   Execute the test client using the following command:\n\n   ```bash\n   npx tsx testClient.ts\n   ```\n\n   This will run through a series of tests for each supported payment provider, attempting to tokenize and charge (where implemented) using each provider.\n\n\nNote: Some providers may throw errors if not fully configured or if there are issues with the provided credentials. These errors will be caught and logged to help with debugging.\n\n","readmeFilename":"README.md"}