Node.js SDK
适用于 Node.js 18+ 项目,提供 4 个接口方法、请求签名、回调验签和最小示例脚本。
特点
- 内置 createPayinOrder、getPayinOrder、createExclusiveBinding、createPayoutOrder 4 个方法
- 请求签名与服务端 merchant-openapi-signature 完全一致
- 回调验签支持直接使用原始请求体字符串校验
安装
npm install ./sdk/nodejs快速示例
import { UUGateClient } from 'uugate-openapi-sdk';
const client = new UUGateClient({
baseUrl: 'https://api.uugate.com',
merchantUid: '880001',
apiKey: 'mch_xxxxxxxxxxxxxxxxxxxx',
});
const order = await client.createPayinOrder({
chainCode: 'TRON',
tokenSymbol: 'USDT',
merchantOrderNo: 'M202604170001',
amount: '100.00',
notifyUrl: 'https://merchant.example.com/api/uugate/payin-notify',
});