步骤 1:获取 API Key

注册账号后,在控制台生成 Access Key 与 Secret Key。

步骤 2:构造签名

使用 HMAC-SHA256 对请求参数进行签名,放置在 Header 中。

步骤 3:发起请求

Base URL: https://api.doitin.cn/v1

// Python 示例:调用聚合网关
import requests
url = "https://api.doitin.cn/v1/gateway/pay"
headers = {
"X-API-Key": "your_access_key",
"X-Signature": "calculated_hmac"
}
payload = {"order_id": "20250623001", "amount": "99.00"}
resp = requests.post(url, json=payload, headers=headers)
print(resp.json())
// 返回: {"code":0, "data": {...}, "msg": "success"}
📘 完整接口文档 → 📦 下载 SDK (Java/PHP/Node)