
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@billingrails/node
Advanced tools
Official Node.js SDK for Billingrails API - Flexible, composable, and intuitive API-first commerce platform
Official Node.js SDK for Billingrails
pnpm add @billingrails/node
Or with npm:
npm install @billingrails/node
Or with yarn:
yarn add @billingrails/node
import { Billingrails } from '@billingrails/node';
// Initialize the client
const client = new Billingrails({
apiKey: 'your-api-key',
});
// List accounts
const listResponse = await client.accounts.list();
console.log(listResponse.accounts);
// Create an account
const createResponse = await client.accounts.create({
name: 'John Doe',
email: 'john@example.com',
country: 'US',
default_currency: 'USD',
});
console.log(createResponse.account);
// Retrieve an account
const retrieveResponse = await client.accounts.retrieve('acc_123');
console.log(retrieveResponse.account);
// Update an account
const updateResponse = await client.accounts.update('acc_123', {
name: 'Jane Doe',
});
console.log(updateResponse.account);
// Get account balances
const balancesResponse = await client.accounts.getBalances('acc_123');
console.log(balancesResponse.balances);
// Debit an account
const debitResponse = await client.accounts.debit('acc_123', {
amount: 1000, // Amount in cents
currency: 'USD',
});
console.log(debitResponse.balances);
const client = new Billingrails({
apiKey: 'your-api-key',
});
const client = new Billingrails({
apiKey: 'your-api-key',
baseUrl: 'https://api.billingrails.com/v1', // Production URL
timeout: 30000, // Request timeout in milliseconds
maxRetries: 3, // Maximum number of retries for failed requests
});
The SDK throws BillingrailsError for API errors:
import { Billingrails, BillingrailsError } from 'billingrails';
try {
const retrieveResponse = await client.accounts.retrieve('invalid_id');
} catch (error) {
if (error instanceof BillingrailsError) {
console.error('API Error:', error.message);
console.error('Error Code:', error.code);
console.error('Status Code:', error.statusCode);
console.error('Details:', error.details);
}
}
The SDK is written in TypeScript and includes full type definitions:
import type { Account, AccountCreate, AccountUpdate } from 'billingrails';
const accountData: AccountCreate = {
name: 'John Doe',
email: 'john@example.com',
};
const createResponse = await client.accounts.create(accountData);
MIT
For support, please contact ugo@billingrails.com or visit our documentation.
FAQs
Official Node.js SDK for Billingrails API - Flexible, composable, and intuitive API-first commerce platform
We found that @billingrails/node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.