
Research
/Security News
PolinRider Spreads Through Compromised GitHub Accounts and Packagist
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.
@profullstack/coinpay
Advanced tools
CoinPay SDK & CLI - Cryptocurrency payment integration for Node.js
# Using pnpm (recommended)
pnpm add @profullstack/coinpay
# Using npm
npm install @profullstack/coinpay
# Global CLI installation
pnpm add -g @profullstack/coinpay
import { CoinPayClient } from '@profullstack/coinpay';
// Initialize the client
const coinpay = new CoinPayClient({
apiKey: 'your-api-key',
});
// Create a payment
const payment = await coinpay.createPayment({
businessId: 'biz_123',
amount: 100,
currency: 'USD',
cryptocurrency: 'BTC',
description: 'Order #12345',
});
console.log(`Payment address: ${payment.address}`);
console.log(`Amount: ${payment.cryptoAmount} ${payment.cryptocurrency}`);
# Configure your API key
coinpay config set-key sk_live_xxxxx
# Create a payment
coinpay payment create --business-id biz_123 --amount 100 --currency USD --crypto BTC
# Get payment details
coinpay payment get pay_abc123
# List payments
coinpay payment list --business-id biz_123
# Get exchange rates
coinpay rates get BTC
import { CoinPayClient } from '@profullstack/coinpay';
const client = new CoinPayClient({
apiKey: 'your-api-key',
baseUrl: 'https://coinpay.dev/api', // optional
timeout: 30000, // optional, in milliseconds
});
// Create a payment
const payment = await client.createPayment({
businessId: 'biz_123',
amount: 100,
currency: 'USD',
cryptocurrency: 'BTC',
description: 'Order #12345',
metadata: JSON.stringify({ orderId: '12345' }),
callbackUrl: 'https://your-site.com/webhook',
});
// Get payment by ID
const payment = await client.getPayment('pay_abc123');
// List payments
const payments = await client.listPayments({
businessId: 'biz_123',
status: 'completed', // optional
limit: 20, // optional
offset: 0, // optional
});
// Get payment QR code
const qr = await client.getPaymentQR('pay_abc123', 'png');
// Get single rate
const rate = await client.getExchangeRate('BTC', 'USD');
// Get multiple rates
const rates = await client.getExchangeRates(['BTC', 'ETH', 'SOL'], 'USD');
// Create a business
const business = await client.createBusiness({
name: 'My Store',
webhookUrl: 'https://your-site.com/webhook',
walletAddresses: {
BTC: 'bc1q...',
ETH: '0x...',
},
});
// Get business
const business = await client.getBusiness('biz_123');
// List businesses
const businesses = await client.listBusinesses();
// Update business
const updated = await client.updateBusiness('biz_123', {
name: 'Updated Name',
});
// Get webhook logs
const logs = await client.getWebhookLogs('biz_123', 50);
// Test webhook
const result = await client.testWebhook('biz_123', 'payment.completed');
import { verifyWebhookSignature, createWebhookHandler } from '@profullstack/coinpay';
// Manual verification
const isValid = verifyWebhookSignature({
payload: rawBody,
signature: req.headers['x-coinpay-signature'],
secret: 'your-webhook-secret',
});
// Express middleware
app.post('/webhook', createWebhookHandler({
secret: 'your-webhook-secret',
onEvent: async (event) => {
console.log('Received event:', event.type);
switch (event.type) {
case 'payment.completed':
// Handle completed payment
break;
case 'payment.expired':
// Handle expired payment
break;
}
},
onError: (error) => {
console.error('Webhook error:', error);
},
}));
| Event | Description |
|---|---|
payment.created | Payment was created |
payment.pending | Payment is pending confirmation |
payment.confirming | Payment is being confirmed |
payment.completed | Payment completed successfully |
payment.expired | Payment expired |
payment.failed | Payment failed |
payment.refunded | Payment was refunded |
coinpay config set-key <api-key> # Set API key
coinpay config set-url <base-url> # Set custom API URL
coinpay config show # Show current config
coinpay payment create [options]
--business-id <id> Business ID (required)
--amount <amount> Amount in fiat (required)
--currency <code> Fiat currency (required)
--crypto <code> Cryptocurrency (required)
--description <text> Description (optional)
coinpay payment get <payment-id>
coinpay payment list --business-id <id> [--status <status>] [--limit <n>]
coinpay payment qr <payment-id> [--format png|svg]
coinpay business create --name <name> [--webhook-url <url>]
coinpay business get <business-id>
coinpay business list
coinpay business update <business-id> [--name <name>] [--webhook-url <url>]
coinpay rates get <crypto> [--fiat <currency>]
coinpay rates list [--fiat <currency>]
coinpay webhook logs <business-id> [--limit <n>]
coinpay webhook test <business-id> [--event <type>]
| Variable | Description |
|---|---|
COINPAY_API_KEY | API key (overrides config file) |
COINPAY_BASE_URL | Custom API URL |
try {
const payment = await client.createPayment({ ... });
} catch (error) {
if (error.status === 401) {
console.error('Invalid API key');
} else if (error.status === 400) {
console.error('Invalid request:', error.response);
} else {
console.error('Error:', error.message);
}
}
MIT
FAQs
CoinPay SDK & CLI — Accept cryptocurrency and card payments (BTC, ETH, SOL, POL, BCH, USDC) with wallet, swap and a live finances dashboard
The npm package @profullstack/coinpay receives a total of 899 weekly downloads. As such, @profullstack/coinpay popularity was classified as not popular.
We found that @profullstack/coinpay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.