izichangepay-sdk
v0.1.2
Published
Official Node.js / TypeScript SDK for the IzichangePay API.
Downloads
454
Maintainers
Readme
izichangepay-sdk
Official Node.js / TypeScript SDK for the IzichangePay API.
npm install izichangepay-sdkUsage
import { IziPayClient } from 'izichangepay-sdk';
const izipay = new IziPayClient({ apiKey: process.env.IZIPAY_API_KEY! });
const intent = await izipay.paymentIntents.create({
requestedCurrencyType: 'fiat',
currencyRequested: 'XOF',
amountRequested: '10000',
acceptedCoins: ['USDT.TRC20'],
});
console.log(intent.paymentUrl);Verifying a webhook
import express from 'express';
import { IziPayClient } from 'izichangepay-sdk';
const app = express();
app.post('/webhooks/izipay', express.raw({ type: 'application/json' }), (req, res) => {
try {
const event = IziPayClient.validateWebhook(
req.body,
req.headers['x-izipay-signature'] as string,
process.env.IZIPAY_WEBHOOK_SECRET!,
);
// ... handle event.type
res.json({ received: true });
} catch (err) {
res.status(400).json({ error: (err as Error).message });
}
});Features
- Full TypeScript types
- Auto-retry on 5xx/429 with exponential backoff + jitter
- Idempotency-Key auto-generation
- Constant-time webhook signature verification + anti-replay window
- Async iterators for cursor pagination
- Compatible with Node ≥ 18 and serverless runtimes
Documentation
Full reference: https://docs.pay.izichange.com/developers/sdks/node
License
MIT
