订单同步


3.5订单同步

3.5.1外部订单同步

外部订单同步到营销系统,执行消费订单后的返券返积分(返回补领码)

method: allinpay.shopoint.orderService.outOrderSync

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

 

transTime

String

19

交易时间

时间格式:yyyy-dd-MM HH:mm:ss

shopId

String

11

店铺ID

 

shopCode

String

20

店铺号

与shopId功能相同,shopId和shopCode同时输入则只取shopId,二者必输一个

customerId

Integer

11

会员ID

数字营销系统会员编号

openId

String

180

用户openid

与customerId功能相同,customerId和openId同时传则只取customerId。只传openid未查询到顾客信息则创建新用户

mobile

String

11

会员手机号

与customerId功能相同,customerId和mobile同时传则取customerId顾客信息。传了mobile,未查询到顾客信息则注册会员,已查询到非会员顾客信息的绑定手机号

amount

String

14

订单金额

单位:元

excludeDiscountAmount

String

14

不参与优惠金额

单位:元

cash

String

14

现金金额

单位:元

score

Integer

11

支持多少积分

 

scoreAmount

String

14

积分支付金额

单位:元

balanceAmount

String

14

余额支付金额

单位:元

cashierUserSysno

Integer

11

收银员编号

 

orderRemark

String

200

订单备注

 

tradeType

Integer

4

交易类型

1消费 2充值 3停车缴费

discountList

ArrayList

 

用券信息

 

promotionId

Integer

11

活动ID

使用活动优惠时必填

couponId

Integer

11

卡券ID

使用券时二选一必填

couponNo

Integer

32

卡券编号

amount

String

14

优惠金额

单位:元,使用非计次券时必填

count

Integer

11

优惠次数

使用计次券时必填

paymentInfoList

ArrayList

 

支付信息

 

paymentMethod

Integer

4

支付方式

0-POS扫码支付 1-POS刷卡支付 2-线上支付 4-现金支付

paymentAmount

String

14

支付金额

单位:元

paymentFrom

Integer

4

支付来源

0-微信支付

1-支付宝支付

2-QQ支付

3-银联支付

4-银行卡支付

5-现金支付

bankName

String

100

发卡行名称

 

bankAcctNo

String

30

银行卡号/账户

 

bankAcctName

String

20

银行卡姓名

 

bankAcctType

String

2

银行卡类型

00-借记卡,02-准贷记卡/贷记卡

voucherNo

String

30

凭证号

 

transReferenceNo

String

30

交易参考号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

data

reqOrderNo

String

64

外部订单号

 

orderCode

String

40

数字营销订单号

 

scores

Integer

11

赠送积分

 

benefitsQrcodeUrl

String

不限

领券二维码

 

couponList

 

 

 

赠送卡券信息

 

couponName

String

50

券名称

 

quantity

Integer

11

券数量

 

 

请求示例

待补充

响应示例

待补充

 

3.5.2外部订单查询

外部订单同步结果查询交易。

 

method: allinpay.shopoint.orderService.outOrderQuery

 

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

二选一,同时传取orderCode

orderCode

String

40

数字营销订单号

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

 

orderCode

String

40

数字营销订单号

 

transTime

String

19

交易时间

时间格式:yyyy-dd-MM HH:mm:ss

shopId

String

11

店铺ID

 

shopCode

String

20

店铺号

与shopId功能相同,shopId和shopCode同时输入则只取shopId,二者必输一个

shopName

String

50

店铺名称

 

customerId

Integer

11

会员ID

数字营销系统会员编号

openId

String

180

用户openid

 

amount

String

14

订单金额

单位:元

giveScores

Integer

11

返积分值

 

giveCouponNums

Integer

11

返券张数

 

scoreAmount

String

14

积分支付金额

单位:元

balanceAmount

String

14

余额支付金额

单位:元

cashierUserSysno

Integer

11

收银员编号

 

orderRemark

String’

200

订单备注

 

orderStatus

String

4

订单状态

0-待支付,1-已支付,2-已作废,3-已撤销

promotionList

ArrayList

 

活动抵扣信息

 

promotionId

Integer

11

活动ID

 

promotionType

Integer

4

活动类型

 

promotionName

String

50

活动名称

 

amount

String

14

抵扣金额

单位:元

couponList

ArrayList

 

卡券抵扣信息

 

couponNo

String

32

券号

 

couponType

Integer

4

券类型

0-金额券,2-计次券,3-满减券,4-会员积分、5-会员余额

couponName

String

50

券名称

 

amount

String

14

抵扣金额

单位元

startValidityPeriod

String

19

有效开始日期

时间格式:yyyy-dd-MM HH:mm:ss

endValidityPeriod

String

19

有效截止日期

时间格式:yyyy-dd-MM HH:mm:ss

paymentList

ArrayList

 

支付信息

 

paymentFrom

Integer

4

支付来源

WECHAT("微信支付", 0),

     ALIPAY("支付宝支付", 1),

     PALMQQ("手机QQ支付", 2),

     UNIONPAY("银联支付", 3),

     BANKCARD("银行卡支付", 4),

     CASH("现金支付", 5);

amount

String

14

支付金额

单位:元

trxId

String

30

收银宝支付流水号

 

giveCouponList

ArrayList

 

返券信息

 

couponNo

String

32

券号

 

couponName

String

50

券名称

 

couponType

String

4

券类型

金额券,计次券,满减券,会员积分、会员余额

initAmount

Integer

14

券面额

单位分/次

balance

Integer

14

券余额

单位分/次

status

String

4

状态

有效、已核销

 

请求示例

待补充

响应示例

待补充

 

3.5.3外部订单同步撤销

外部订单同步的反交易接口,撤销赠券赠积分

method: allinpay.shopoint.orderService.outOrderSyncCancel

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

二选一,同时传取orderCode

orderCode

String

40

数字营销订单号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

 

请求示例

待补充

 

响应示例

{

    "code": 0,

    "data": {

        }

    "token": "DlRXdIjEBLRLCJgwTP37sZW6ls--NflxVS2-KUHl"

}

 

 

3.5.17外部订单核销

外部订单同步到营销系统,执行消费订单中的优惠和券核销后的返券返积分

method: allinpay.shopoint.orderService.outOrderPay

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

 

transTime

String

19

交易时间

时间格式:yyyy-dd-MM HH:mm:ss

shopId

String

11

店铺ID

 

shopCode

String

20

店铺号

与shopId功能相同,shopId和shopCode同时输入则只取shopId,二者必输一个

idType

String

 

会员账号类型

1- 手机号

2- 会员卡号

3- Openid

4- 会员动态码

5- 外部会员ID

6- 内部会员ID

7- 会员唯一ID

memberId

String

 

会员账号

 

amount

String

14

订单金额

单位:元

excludeDiscountAmount

String

14

不参与优惠金额

单位:元

cash

String

14

现金金额

单位:元

score

Integer

11

支持多少积分

暂不支持,预留字段

scoreAmount

String

14

积分支付金额

单位:元。暂不支持,预留字段

balanceAmount

String

14

余额支付金额

单位:元。暂不支持,预留字段

cashierUserSysno

Integer

11

收银员编号

 

orderRemark

String

200

订单备注

 

tradeType

Integer

4

交易类型

1消费 2充值 3停车缴费

discountList

ArrayList

 

用券信息

 

promotionId

Integer

11

活动ID

 

couponId

Integer

11

卡券ID

 

amount

String

14

优惠金额

单位:元

paymentInfoList

ArrayList

 

支付信息

 

paymentMethod

Integer

4

支付方式

0-POS扫码支付 1-POS刷卡支付 2-线上支付

paymentAmount

String

14

支付金额

单位:元

paymentFrom

Integer

4

支付来源

0-微信支付

1-支付宝支付

2-QQ支付

3-银联支付

4-银行卡支付

5-现金支付

bankName

String

100

发卡行名称

 

bankAcctNo

String

30

银行卡号/账户

 

bankAcctName

String

20

银行卡姓名

 

bankAcctType

String

2

银行卡类型

00-借记卡,02-准贷记卡/贷记卡

voucherNo

String

30

凭证号

 

transReferenceNo

String

30

交易参考号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

data

reqOrderNo

String

64

外部订单号

 

orderCode

String

40

数字营销订单号

 

scores

Integer

11

赠送积分

 

benefitsQrcodeUrl

String

不限

领券二维码

 

couponAmount

String

14

卡券抵扣金额

单位:元

couponList

 

 

 

赠送卡券信息

 

couponName

String

50

券名称

 

quantity

Integer

11

券数量

 

couponId

Integer

11

券ID

 

 

请求示例

待补充

响应示例

待补充

 

3.5.18外部订单查询

外部订单详情查询,可用于3.5.17和3.5.19的状态不明时调用。

method: allinpay.shopoint.orderService.outOrderPayQuery

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

二选一,同时传取orderCode

orderCode

String

40

数字营销订单号

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

 

orderCode

String

40

数字营销订单号

 

transTime

String

19

交易时间

时间格式:yyyy-dd-MM HH:mm:ss

shopId

String

11

店铺ID

 

shopCode

String

20

店铺号

与shopId功能相同,shopId和shopCode同时输入则只取shopId,二者必输一个

shopName

String

50

店铺名称

 

customerId

Integer

11

会员ID

数字营销系统会员编号

openId

String

180

用户openid

 

amount

String

14

订单金额

单位:元

giveScores

Integer

11

返积分值

 

giveCouponNums

Integer

11

返券张数

 

scoreAmount

String

14

积分支付金额

单位:元

balanceAmount

String

14

余额支付金额

单位:元

cashierUserSysno

Integer

11

收银员编号

 

orderRemark

String’

200

订单备注

 

orderStatus

String

4

订单状态

0-处理中,1-核销成功,3-撤销成功

couponList

ArrayList

 

卡券抵扣信息

 

couponNo

String

32

券号

 

couponType

Integer

4

券类型

0-金额券,2-计次券,3-满减券,4-会员积分、5-会员余额

couponName

String

50

券名称

 

amount

String

14

抵扣金额

单位元

startValidityPeriod

String

19

有效开始日期

时间格式:yyyy-dd-MM HH:mm:ss

endValidityPeriod

String

19

有效截止日期

时间格式:yyyy-dd-MM HH:mm:ss

paymentList

ArrayList

 

支付信息

 

paymentFrom

Integer

4

支付来源

0-微信支付

1-支付宝支付

2-QQ支付

3-银联支付

4-银行卡支付

5-现金支付

amount

String

14

支付金额

单位:元

trxId

String

30

收银宝支付流水号

 

giveCouponList

ArrayList

 

返券信息

 

couponNo

String

32

券号

 

couponName

String

50

券名称

 

couponType

String

4

券类型

金额券,计次券,满减券,会员积分、会员余额

initAmount

Integer

14

券面额

单位分/次

balance

Integer

14

券余额

单位分/次

status

String

4

状态

有效、已核销

 

请求示例

待补充

响应示例

待补充

 

 

3.5.19外部订单撤销

外部订单同步的反交易接口,撤销赠券赠积分

method: allinpay.shopoint.orderService.outOrderCancel

version: 1.0

业务请求参数

字段名

参数类型

必填

最大长度

说明

取值

reqOrderNo

String

64

外部订单号

二选一,同时传取orderCode

orderCode

String

40

数字营销订单号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

4

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

200

错误信息

 

 

请求示例

待补充

 

响应示例

待补充

 

 


卜子超buzc 2025年3月19日 16:29 收藏文档