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
Create an invoice and send the customer to its 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
Free to start. 1% per payment. Upgrade any time.