Node.js SDK
A dependency-free client for Node.js 18+: invoices, payment links and webhook verification.
- Type
- Library
- Category
- Developers
- Download
- 3 KB
- Price
- Free
Set it up in 4 steps
- 1
Copy cryptain.mjs into your project.
- 2
Create an API key in Cryptain (Stores → your store).
- 3
एक इनवॉइस बनाएँ और ग्राहक को उसके checkout_url पर भेजें।
- 4
Verify webhooks with verifyWebhook() before fulfilling the order.
import { Cryptain } from './cryptain.mjs';
const c = new Cryptain('https://cryptain.net', 'pk_...', 'sk_...');
const invoice = await c.createInvoice({ amount: '25.00', currency: 'USD', order_id: '1001' });
res.redirect(invoice.checkout_url); Open an account in two minutes
शुरुआत मुफ़्त। हर पेमेंट पर 1%। कभी भी अपग्रेड करें।