Account Pool

供货方用各自的密钥把成品账号入库。购买仍在原平台完成。

管理后台
POST /api/supply/accounts
X-Supply-Key: 供货方密钥
Content-Type: application/json

{
  "accounts": [
    {
      "externalId": "供货方自己的编号,可不填",
      "account": "账号",
      "secret": "密码",
      "plan": "后台配置的档位代号",
      "note": "可选"
    }
  ]
}

GET /api/supply/plans
X-Supply-Key: 供货方密钥

GET /api/plans
Authorization: 与下面相同的签名,路径 /api/plans,请求体为空

POST /api/signals/purchase
Authorization: WECHATPAY2-SHA256-RSA2048 mchid="...",nonce_str="...",signature="...",timestamp="...",serial_no="..."

签名路径换成 /api/signals/purchase,请求体:
{
  "externalOrderId": "订单号",
  "plan": "后台配置的档位代号",
  "amount": "9.90"
}

POST /api/accounts/fetch
Authorization: WECHATPAY2-SHA256-RSA2048 mchid="...",nonce_str="...",signature="...",timestamp="...",serial_no="..."

签名串为五行,每行以换行结尾:
POST
/api/accounts/fetch
时间戳
随机串
请求体

{
  "externalOrderId": "订单号"
}

账号已配上:{ "status": "ready", "account": "...", "secret": "...", "plan": "1" }
还在等提供方:{ "status": "waiting", "externalOrderId": "订单号", "plan": "1" }