
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@basis-theory/tokestration-node-sdk-poc
Advanced tools
A TypeScript SDK for integrating multiple payment providers with a unified interface.
npm install 🦄
const paymentService = new PaymentService({
basisTheoryApiKey: "",
providerAuth: {
...
}
});
const token = await paymentService.tokenize.stripe({ token: '15dab1fa-61c9-4ac1-a1f0-8199001dca74' });
const token = await paymentService.tokenize.braintree({ token: '15dab1fa-61c9-4ac1-a1f0-8199001dca74' });
const charge = await paymentService.charge.stripe({ processingToken: token.processingToken, amount: 1000 });
const charge = await paymentService.charge.braintree({ processingToken: token.processingToken, amount: 1000 });
To run the test client and see the SDK in action, follow these steps:
Set up environment variables:
Copy the .env.example
file to .env
and fill in your actual API keys and credentials for each payment provider.
cp .env.example .env
Then edit the .env
file with your real credentials. (you can find these here)
Install dependencies: Make sure you have all the necessary dependencies installed.
npm install
Run the test client: Execute the test client using the following command:
npx tsx testClient.ts
This will run through a series of tests for each supported payment provider, attempting to tokenize and charge (where implemented) using each provider.
Note: 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.
FAQs
A POC for a Node.js SDK for Tokestration
We found that @basis-theory/tokestration-node-sdk-poc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.