SDKs
Typed clients are published for TypeScript, Python, and PHP. Each exposes the same resource tree (paylinks, payins, payouts, refunds, subscriptions, webhooks) and the same ZyndPayError shape β code, message, requestId, retryAfter.
Install
npm install @zyndpay/sdkAuthentication & error handling
import { ZyndPay, ZyndPayError } from '@zyndpay/sdk';
const zp = new ZyndPay({ apiKey: process.env.ZYNDPAY_KEY! });
try {
const link = await zp.paylinks.create({ amount: '10.00', currency: 'USDT' });
} catch (err) {
if (err instanceof ZyndPayError && err.code === 'RATE_LIMITED') {
await new Promise((r) => setTimeout(r, (err.retryAfter ?? 60) * 1000));
} else {
throw err;
}
}