-
Notifications
You must be signed in to change notification settings - Fork 0
/
micropay.yaml
327 lines (327 loc) · 7.91 KB
/
micropay.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
micropay.request:
type: object
xml:
name: xml
required:
- appid
- mch_id
- nonce_str
- sign
- body
- out_trade_no
- total_fee
- spbill_create_ip
- auth_code
properties:
profit_sharing:
type: string
description: 是否指定服务商分账;Y-是,需要分账;N-否,不分账;字母要求大写,不传默认不分账
enum: [N,Y]
example: 'N'
maxLength: 1
deposit:
type: string
description: 是否押金支付
enum: [Y,N]
example: 'Y'
maxLength: 1
appid:
type: string
description: 公众账号ID
example: wx8888888888888888
maxLength: 32
sub_appid:
type: string
description: 子商户公众账号ID
example: wx8888888888888888
maxLength: 32
nullable: true
mch_id:
type: string
description: 商户号
example: '1900000109'
maxLength: 32
sub_mch_id:
type: string
description: 子商户号
example: '1900000100'
maxLength: 32
device_info:
type: string
description: 设备号
example: '013467007045764'
maxLength: 32
nullable: true
nonce_str:
type: string
description: 随机字符串
example: 5K8264ILTKCH16CQ2502SI8ZNMTM67VS
maxLength: 32
sign:
type: string
description: 签名
example: C380BEC2BFD727A4B6845133519F3AD6
maxLength: 32
sign_type:
type: string
description: 签名类型
example: HMAC-SHA256
maxLength: 32
nullable: true
body:
type: string
description: 商品描述
example: image形象店-深圳腾大- QQ公仔
maxLength: 128
detail:
type: string
description: 商品详情
maxLength: 6000
nullable: true
attach:
type: string
description: 附加数据
example: 说明
maxLength: 127
nullable: true
out_trade_no:
type: string
description: 商户订单号
example: '1217752501201407033233368018'
maxLength: 32
total_fee:
format: int32
type: integer
description: 订单金额
example: '888'
fee_type:
type: string
description: 货币类型
example: CNY
maxLength: 16
nullable: true
spbill_create_ip:
type: string
description: 终端IP
example: 8.8.8.8
maxLength: 64
goods_tag:
type: string
description: 订单优惠标记
example: '1234'
maxLength: 32
nullable: true
limit_pay:
type: string
description: 指定支付方式
example: no_credit
maxLength: 32
nullable: true
time_start:
type: string
description: 交易起始时间
example: '20091225091010'
maxLength: 14
nullable: true
time_expire:
type: string
description: 交易结束时间
example: '20091227091010'
maxLength: 14
nullable: true
receipt:
type: string
description: 电子发票入口开放标识
example: 'Y'
maxLength: 8
nullable: true
auth_code:
type: string
description: 授权码
example: '120061098828009406'
maxLength: 128
scene_info:
xml:
x-cdata: true
type: string
description: +场景信息
example: '{"store_info" : {"id": "SZTX001","name": "腾大餐厅","area_code": "440305","address": "科技园中一路腾讯大厦" }}'
maxLength: 256
nullable: true
micropay.response:
allOf:
- type: object
xml:
name: xml
required:
- return_code
- return_msg
properties:
return_code:
type: string
description: 返回状态码
example: SUCCESS
maxLength: 16
return_msg:
type: string
description: 返回信息
example: OK
maxLength: 128
- type: object
xml:
name: xml
required:
- appid
- mch_id
- nonce_str
- sign
- result_code
properties:
appid:
type: string
description: 公众账号ID
example: wx8888888888888888
maxLength: 32
sub_appid:
type: string
description: 子商户公众账号ID
example: wx8888888888888888
maxLength: 32
mch_id:
type: string
description: 商户号
example: '1900000109'
maxLength: 32
sub_mch_id:
type: string
description: 子商户号
example: '1900000100'
maxLength: 32
device_info:
type: string
description: 设备号
example: '013467007045764'
maxLength: 32
nullable: true
nonce_str:
type: string
description: 随机字符串
example: 5K8264ILTKCH16CQ2502SI8ZNMTM67VS
maxLength: 32
sign:
type: string
description: 签名
example: C380BEC2BFD727A4B6845133519F3AD6
maxLength: 32
result_code:
type: string
description: 业务结果
example: SUCCESS
maxLength: 16
err_code:
type: string
description: 错误代码
example: SYSTEMERROR
maxLength: 32
nullable: true
err_code_des:
type: string
description: 错误代码描述
example: 系统错误
maxLength: 128
nullable: true
- type: object
xml:
name: xml
required:
- openid
- is_subscribe
- trade_type
- bank_type
- total_fee
- cash_fee
- transaction_id
- out_trade_no
- time_end
properties:
openid:
type: string
description: 用户标识
example: 'Y'
maxLength: 128
is_subscribe:
type: string
description: 是否关注公众账号
example: 'Y'
maxLength: 1
trade_type:
type: string
description: 交易类型
example: MICROPAY
maxLength: 16
bank_type:
type: string
description: 付款银行
example: CMC
maxLength: 32
fee_type:
type: string
description: 货币类型
example: CNY
maxLength: 16
nullable: true
total_fee:
format: int32
type: integer
description: 订单金额
example: '888'
settlement_total_fee:
format: int32
type: integer
description: 应结订单金额
example: '100'
nullable: true
coupon_fee:
format: int32
type: integer
description: 代金券金额
example: '100'
nullable: true
cash_fee_type:
type: string
description: 现金支付货币类型
example: CNY
maxLength: 16
nullable: true
cash_fee:
format: int32
type: integer
description: 现金支付金额
example: '100'
transaction_id:
type: string
description: 微信支付订单号
example: '1217752501201407033233368018'
maxLength: 32
out_trade_no:
type: string
description: 商户订单号
example: '1217752501201407033233368018'
maxLength: 32
attach:
type: string
description: 商家数据包
example: '123456'
maxLength: 128
nullable: true
time_end:
type: string
description: 支付完成时间
example: '20141030133525'
maxLength: 14
promotion_detail:
type: string
description: 营销详情
example: 示例见下文
maxLength: 6000
nullable: true