BillPay:
post:
tags:
- 账单管理
summary: 账单缴费
description: |
执行账单缴费操作,支持多种支付渠道。
## 业务说明
- 支持指定客户编号和缴费金额进行缴费
- 支持多种二级支付渠道(支付宝、微信等)
- 实时更新账单状态和生成交易记录
- 支持XML和JSON两种数据格式
- 缴费金额必须与账单金额完全匹配
## 业务规则
- 缴费金额必须大于0.01元
- 账单状态必须为未缴费状态
- 同一笔账单不能重复缴费
- 缴费成功后账单状态自动更新为已缴费
## 调用频率限制
- 单个客户编号每分钟最多缴费5次
- 单个机构每分钟最多缴费500次
operationId: payBill
parameters:
- $ref: '../components/parameters.yaml#/components/parameters/ContentTypeHeader'
- $ref: '../components/parameters.yaml#/components/parameters/EncryptTypeHeader'
- $ref: '../components/parameters.yaml#/components/parameters/EncryptModeHeader'
- $ref: '../components/parameters.yaml#/components/parameters/DataTypeHeader'
requestBody:
required: true
description: 账单缴费请求数据
content:
application/xml:
schema:
$ref: '../components/schemas.yaml#/components/schemas/BillPayRequest'
example: |
1.0.1
00001
Pay
20240101
123456789012
123456
654321
150.00
1
application/json:
schema:
$ref: '../components/schemas.yaml#/components/schemas/BillPayRequest'
example:
Version: "1.0.1"
InstId: "00001"
TranCode: "Pay"
TranDate: "20240101"
TranSeq: "123456789012"
BillKey: "123456"
CompanyId: "654321"
PayAmount: 150.00
SubChannel: 1
responses:
'200':
description: 缴费成功
headers:
Content-Type:
$ref: '../components/headers.yaml#/components/headers/ContentType'
X-Response-Time:
$ref: '../components/headers.yaml#/components/headers/ResponseTime'
X-Request-Id:
$ref: '../components/headers.yaml#/components/headers/RequestId'
content:
application/xml:
schema:
$ref: '../components/schemas.yaml#/components/schemas/BillPayResponse'
example: |
1.0.1
00001
PayRes
20240101
123456789012
AAAAAAA
缴费成功
TXN123456789012
123456
654321
Pay
150.00
2024-01-01T12:00:00.000Z
1
1
AAAAAAA
成功
application/json:
schema:
$ref: '../components/schemas.yaml#/components/schemas/BillPayResponse'
example:
Version: "1.0.1"
InstId: "00001"
TranCode: "PayRes"
TranDate: "20240101"
TranSeq: "123456789012"
RespCode: "AAAAAAA"
RespMessage: "缴费成功"
Data:
Transaction:
TranSeq: "TXN123456789012"
BillKey: "123456"
CompanyId: "654321"
TranCode: "Pay"
PayAmount: 150.00
PayDate: "2024-01-01T12:00:00.000Z"
SubChannel: 1
TranStatus: 1
RespCode: "AAAAAAA"
RespMessage: "成功"
'400':
$ref: '../components/responses.yaml#/components/responses/BusinessError'
'500':
$ref: '../components/responses.yaml#/components/responses/SystemError'
'401':
$ref: '../components/responses.yaml#/components/responses/SecurityError'
'408':
$ref: '../components/responses.yaml#/components/responses/NetworkError'
security:
- ApiKeyAuth: []
- EncryptedData: []