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% с платежа. Переход на другой тариф — в любой момент.