云汇腾Pay

支付接口演示

快速体验支付流程,感受云汇腾Pay的便捷

接口演示

模拟真实支付场景,体验完整的支付流程

订单金额
¥ 0.01
演示订单
商品名称 演示商品
订单编号 HW20241010001
创建时间 2024-10-10 12:00:00
选择支付方式

接口调用示例

简洁的API设计,快速完成支付接入

// 统一下单接口
const response = await fetch('https://api.hwkjpay.com/v1/pay/unified', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({
        out_trade_no: 'HW20241010001',
        total_amount: 1,
        subject: '演示商品',
        pay_channel: 'wechat',
        notify_url: 'https://your-domain.com/notify'
    })
});

const data = await response.json();
// 返回支付参数,唤起支付
console.log(data.pay_params);

响应参数说明

参数名 类型 说明
code String 返回码,SUCCESS为成功
msg String 返回信息描述
out_trade_no String 商户订单号
transaction_id String 平台交易流水号
pay_params Object 支付参数,用于唤起支付
total_amount Integer 订单金额,单位:分

开始接入云汇腾Pay

查看完整的开发者文档,快速完成支付接入

查看文档