URL: /api/template/auto/pay

Type: POST

Author: guishangquan

Content-Type: application/json; charset=utf-8

Description: 模板优惠卷核销接口

Body-parameters:

Parameter

Type

Required

Description

opfid

string

true

开放平台ID

nonce

string

true

6位随机字串不能为空

timestamp

string

true

签名时间戳

signature

string

true

签名

uid

string

true

第三方用户id

companyId

string

true

第三方公司id

templateId

string

true

模板id

Request-body:

{
  "opfid": "10",
  "nonce": "5wzawg",
  "timestamp": "2022-05-19 14:55:07",
  "signature": "ojha19",
  "uid": "2c9812df-d7d4-4ac2-b9b9-c965fa0dd3b9",
  "companyId": "bc299ab7-4b46-4929-9bb3-7e9abd83c18c",
  "templateId": "10"
}

Response-fields:

Field

Type

Description

Since

code

string

状态码

-

errorCode

string

错误状态码

-

msg

string

状态描述

-

data

object

数据

-

tempalteIdstring模板id


Response-example:

{
  "code": "24817",
  "errorCode": "24817",
  "msg": "9nctvi",
  "data": {

          “templateId”:"123123123"

   }
}

Curl-example:

curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i /api/template/auto/pay --data '{
  "opfid": "10",
  "nonce": "5wzawg",
  "timestamp": "2022-05-19 14:55:07",
  "signature": "ojha19",
  "uid": "2c9812df-d7d4-4ac2-b9b9-c965fa0dd3b9",
  "companyId": "bc299ab7-4b46-4929-9bb3-7e9abd83c18c",
  "templateId": "10"
}'


error-code:

codeerrorCodemsg
100100
SYSTEM_ERROR
兔展id不能为空
模板id不能为空
未找到该用户
未找到该模板
已经购买过该模板,且在有效期内
已经开通过该模板,且在有效期内
找不到对应的模板卷类型
请勿频繁下单
创建订单失败
  • 无标签