public interface MarketingBusiFavorApi
@POST(value="v3/marketing/busifavor/stocks") StockResponse createStock(@Body FavorCreateParams params) throws PayException
商家券介绍详见 微信支付商家券
params - the paramsPayException - the pay exception@GET(value="v3/marketing/busifavor/stocks/{stock_id}")
StockDetailResponse queryStockDetail(@Path(value="stock_id")
String stockId)
throws PayException
商户可通过该接口查询已创建的商家券批次详情信息。
stockId - the stock idPayException - the pay exception@POST(value="v3/marketing/busifavor/coupons/use") FavorUseResponse use(@Body FavorUseParams params) throws PayException
在用户满足优惠门槛后,服务商可通过该接口核销用户微信卡包中具体某一张商家券。
params - the paramsPayException - the pay exception@GET(value="v3/marketing/busifavor/users/{openid}/coupons")
UserCouponsDetailResponse queryUserStocks(@Path(value="openid")
String openid,
@QueryMap
UserFavorQueryParams params)
throws PayException
商户自定义筛选条件(如创建商户号、归属商户号、发放商户号等),查询指定微信用户卡包中满足对应条件的所有商家券信息。
openid - the openidparams - the paramsPayException - the pay exception@GET(value="v3/marketing/busifavor/users/{openid}/coupons/{coupon_code}/appids/{appid}")
UserCouponResponse queryUserCoupon(@Path(value="openid")
String openid,
@Path(value="coupon_code")
String couponCode,
@Path(value="appid")
String appid)
throws PayException
服务商可通过该接口查询微信用户卡包中某一张商家券的详情信息。
openid - the openidcouponCode - the coupon codeappid - the appidPayException - the pay exception@POST(value="v3/marketing/busifavor/stocks/{stock_id}/couponcodes")
CodeUploadResponse uploadCouponCodes(@Body
CouponCodeUploadParams params)
throws PayException
商家券的Code码可由微信后台随机分配,同时支持商户自定义。 如商家已有自己的优惠券系统,可直接使用自定义模式。 即商家预先向微信支付上传券Code,当券在发放时,微信支付自动从已导入的Code中随机取值(不能指定),派发给用户。
params - the paramsPayException - the pay exception@POST(value="v3/marketing/busifavor/callbacks") FavorCallbackSetting setCallbacks(@Body FavorCallbackSetting setting) throws PayException
用于设置接收商家券相关事件通知的URL,可接收商家券相关的事件通知、包括发放通知等。 需要设置接收通知的URL,并在商户平台开通 营销事件推送 的能力,即可接收到相关通知。
营销事件推送:点击开通产品权限。由商家券批次创建方登录Pay平台,操作开通
注意:
setting - the settingPayException - the pay exception@GET(value="v3/marketing/busifavor/callbacks") FavorCallbackSetting getCallbacks(@Query(value="mchid") String mchId) throws PayException
通过调用此接口可查询设置的通知URL。
注意:
mchId - the mch idPayException - the pay exception@GET(value="v3/marketing/busifavor/callbacks") FavorCallbackSetting getCallbacks() throws PayException
PayException - the pay exception@POST(value="v3/marketing/busifavor/coupons/associate") AssociateTime associate(@Body FavorAssociateInfo associateInfo) throws PayException
将有效态(未核销)的商家券与订单信息关联,用于后续参与摇奖以及返佣激励等操作的统计。
注意: 仅对有关联订单需求的券进行该操作
associateInfo - the associate infoPayException - the pay exception@POST(value="v3/marketing/busifavor/coupons/disassociate") AssociateTime disassociate(@Body FavorAssociateInfo associateInfo) throws PayException
取消商家券与订单信息的关联关系。
注意: 建议取消前调用查询接口,查到当前关联的商户单号并确认后,再进行取消操作
associateInfo - the associate infoPayException - the pay exception@PATCH(value="v3/marketing/busifavor/stocks/{stock_id}/budget")
FavorBudgetResponse budget(@Path(value="stock_id")
String stockId,
@Body
FavorBudgetParams params)
throws PayException
商户可以通过该接口修改批次单天发放上限数量或者批次最大发放数量
stockId - the stock idparams - the paramsPayException - the pay exception@PATCH(value="v3/marketing/busifavor/stocks/{stock_id}")
cn.felord.retrofit.VoidResponse updateStock(@Path(value="stock_id")
String stockId,
@Body
FavorUpdateParams params)
throws PayException
商户可以通过该接口修改商家券基本信息,已创建商家券批次,且修改时间位于有效期结束时间前
stockId - the stock idparams - the paramsPayException - the pay exception@POST(value="v3/marketing/busifavor/coupons/return") GenericPayResponse<OffsetDateTime> refund(@Body FavorRefundParams params) throws PayException
商户可以通过该接口为已核销的券申请退券
params - the paramsPayException - the pay exception@POST(value="v3/marketing/busifavor/coupons/deactivate") GenericPayResponse<OffsetDateTime> deactivate(@Body FavorDeactivateParams params) throws PayException
前置条件:券的状态为CouponState.SENDED
商户可以通过该接口将可用券进行失效处理,券被失效后无法再被核销
params - the paramsPayException - the pay exception@POST(value="v3/marketing/busifavor/subsidy/return-receipts") FavorReturnSubsidyResponse returnReceipts(@Body FavorSubsidyReturnParams params) throws PayException
商户通过该接口可回退补差款
params - the paramsPayException - the pay exception@POST(value="v3/marketing/busifavor/subsidy/pay-receipts") FavorSubsidyListResponse payMakeup(@Body FavorSubsidyParams params) throws PayException
该API主要用于商户营销补贴场景, 支持基于单张券进行不同商户账户间的资金补差, 从而提升财务结算、资金利用效率。具体可参考操作文档
params - the paramsPayException - the pay exception@GET(value="v3/marketing/busifavor/subsidy/pay-receipts/{subsidy_receipt_id}")
FavorSubsidyResponse queryMakeup(@Path(value="subsidy_receipt_id")
String subsidyReceiptId)
throws PayException
查询商家券营销补差付款单详情
subsidyReceiptId - the subsidyReceiptIdPayException - the pay exceptionCopyright © 2025. All rights reserved.