The official library for generating checkouts and subscribing to webhooks. Seamlessly integrate OrvexPay into Express, NestJS, Next.js, or any Node.js backend.
Validate incoming webhook signatures with a single line of code. Secure your payment callbacks.
Pairs perfectly with our React UI Kit for rapid component-based checkout integration.
import { OrvexClient } from 'orvex-pay';
app.post('/webhook', (req, res) => {
try {
OrvexClient.webhooks.verifySignature(
req.rawBody,
req.headers['x-orvex-signature'],
process.env.WEBHOOK_SECRET
);
// Signature valid, handle event
console.log(req.body.status);
res.sendStatus(200);
} catch (err) {
res.status(401).send(err.message);
}
});
Why build checkout screens from scratch? Our React UI Kit provides production-ready components that match the OrvexPay premium aesthetic.
Explore UI Kitnpm install orvex-payNPM import { OrvexClient } from 'orvex-pay';
// Initialize client
const orvex = new OrvexClient({
apiKey: process.env.ORVEX_API_KEY
});
// Generate a new payment link
const invoice = await orvex.invoices.create({
priceAmount: '100.00',
priceCurrency: 'TRY',
payCurrency: 'USDT',
orderId: 'ORDER-12345',
successUrl: 'https://example.com/success',
cancelUrl: 'https://example.com/cancel',
});
console.log(invoice.payUrl);
The SDK is fully open-source. Found a bug or want to add a feature? Create an issue or pull request on GitHub.
View on GitHub