Skip to content
开发者工具
使用AI助手和工具加速开发

优惠应用 ​

  • Endpoint: POST /aggregate-pay/api/gateway/applyPromoEvent
  • Tags: 营销

Description ​

接口名称:applyPromoEvent

Parameters ​

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

Parameter Examples ​

  • Content-Type: "application/json"
  • sign: "FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="

Request Body ​

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYesmaxLength: 8接口版本 当前值为:1.1
keyVersionstringYesmaxLength: 8密钥版本 当前值为:1
requestTimestringYesmaxLength: 32请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内
appIdstringYesmaxLength: 64商户应用Id,PayerMax分配给商户应用的唯一标识
merchantNostringNomaxLength: 32商户号,商户与PayerMax业务签约时生成的唯一标识
dataobjectYes请求数据体
data.requestIdstringYesmaxLength: 64本次业务操作幂等 ID,长度 16–64
data.checkIdstringYescalcPromoEvent优惠试算返回的试算id,优惠应用时传递可以进行二次校验
data.userIdstringYesmaxLength: 32商户侧用户号ONETIME
data.subscriptionNostringNomaxLength: 10订阅号
data.promotionEventIdListstringYesmaxLength: 2促销活动编号列表;可为 null,与promotionCode二选一。
data.promotionCodestringYesmaxLength: 3推广码;可为 null,与promotionCode二选一。

Example ​

json
{
  "version": "1.1",
  "keyVersion": "1",
  "requestTime": "2022-01-22T10:00:00.500+08:00",
  "appId": "6666c8b036a24579974497c2f9a33333",
  "merchantNo": "010213834784554",
  "data": {
    "requestId": "openreq202610220001xx",
    "userId": "testdev001",
    "subscriptionNo": "SUB261015061106740441000005A04",
    "promotionEventIdList": [
      "PE20260001"
    ]
  }
}

Responses ​

200 ​

FieldTypeRequiredConstraintsDescriptionEnum
codestringYes返回码,’APPLY_SUCCESS’代表成功
msgstringYes返回描述,’Success.’
dataobjectYes本次业务操作响应数据
data.requestIdstringYesmaxLength: 64本次业务操作幂等 ID;同一次重试保持不变,新操作须换新 ID;响应原样回传
data.checkIdstringYesmaxLength: 64试算方案 ID,发券时作为 checkId 传入
data.totalDiscountAmountobjectYes明细优惠金额合计
data.totalDiscountAmount.amountnumberYes金额
data.totalDiscountAmount.currencystringYes币种
data.discountDetailListobjectYes可用促销活动明细列表
data.discountDetailList.promotionEventIdstringYes促销活动编号
data.discountDetailList.promotionEventNamestringYes促销活动名称
data.discountDetailList.promotionCodestringYes推广码编号
data.discountDetailList.discountSourcestringYes优惠成本承担方;merchant商户承担
data.discountDetailList.discountAmountobjectYes优惠金额
data.discountDetailList.discountAmount.amountstringYes金额
data.discountDetailList.discountAmount.currencystringYes币种
data.discountDetailList.priceDiscountListobjectYes订阅计划 priceId维度优惠明细列表
data.discountDetailList.priceDiscountList.productIdstringYes商品编号
data.discountDetailList.priceDiscountList.priceIdstringYes价格编号
data.discountDetailList.priceDiscountList.productNamestringYes商品名称
data.discountDetailList.priceDiscountList.discountAmountobjectYes商品优惠金额
data.discountDetailList.priceDiscountList.discountAmount.amountstringYes金额
data.discountDetailList.priceDiscountList.discountAmount.currencystringYes币种
data.discountDetailList.applicablePeriodCountstringYes剩余适用订阅期数,订阅产品时展示

Response Example ​

json
{
  "code": "SUCCESS",
  "msg": "success",
  "data": {
    "requestId": "open-req-20261104-0001xxxxxxxxxx",
    "checkId": "pdis_0023179204466656867450005627",
    "totalDiscountAmount": {
      "amount": 10,
      "currency": "USD"
    },
    "discountDetailList": [
      {
        "promotionEventId": "PE20260001",
        "promotionEventName": "订阅首单优惠",
        "promotionCode": "PROMO2026A",
        "discountSource": "merchant",
        "discountAmount": {
          "amount": 10,
          "currency": "USD"
        },
        "applicablePeriodCount": 1,
        "priceDiscountList": [
          {
            "productId": "PRODUCT2026101002294303420000001",
            "priceId": "PRICE2026101002294305020000002",
            "productName": "产品A",
            "quantity": 10,
            "discountAmount": {
              "amount": 10,
              "currency": "USD"
            }
          }
        ]
      }
    ]
  }
}

Enum Reference ​

data.userId ​

  • ONETIME

此页面的内容有帮助吗?

感谢您帮助改进 PayerMax 产品文档!

Released under the MIT License.