287 lines
10 KiB
YAML
287 lines
10 KiB
YAML
WithholdingSendDisc:
|
|
post:
|
|
tags:
|
|
- 代扣管理
|
|
summary: 代扣送盘
|
|
description: |
|
|
银行代扣送盘接口,向银行发送批量代扣请求。
|
|
|
|
## 业务说明
|
|
- 支持批量向银行发送代扣请求
|
|
- 包含待代扣的账单信息和客户信息
|
|
- 支持本行和他行账户代扣
|
|
- 送盘成功后等待银行回盘确认
|
|
- 支持XML和JSON两种数据格式
|
|
|
|
## 业务规则
|
|
- 只能对已签约且有效的协议进行代扣
|
|
- 代扣金额必需与账单金额一致
|
|
- 客户账户余额必须充足
|
|
- 送盘成功后生成代扣交易记录
|
|
|
|
## 调用频率限制
|
|
- 单个批次最多包含1000笔代扣
|
|
- 单个机构每小时最多送盘10次
|
|
|
|
operationId: withholdingSendDisc
|
|
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:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseRequest'
|
|
- type: object
|
|
required:
|
|
- BatchNo
|
|
- TotalCount
|
|
- TotalAmount
|
|
- WithholdingList
|
|
properties:
|
|
BatchNo:
|
|
type: string
|
|
description: 批次号
|
|
example: "BATCH20240101001"
|
|
maxLength: 50
|
|
TotalCount:
|
|
type: integer
|
|
description: 总笔数
|
|
example: 10
|
|
minimum: 1
|
|
maximum: 1000
|
|
TotalAmount:
|
|
type: number
|
|
format: decimal
|
|
description: 总金额
|
|
example: 1500.00
|
|
minimum: 0.01
|
|
WithholdingList:
|
|
type: array
|
|
description: 代扣明细列表
|
|
items:
|
|
type: object
|
|
required:
|
|
- BillKey
|
|
- CompanyId
|
|
- AgreementNo
|
|
- PayAmount
|
|
properties:
|
|
BillKey:
|
|
type: string
|
|
description: 客户编号
|
|
example: "123456"
|
|
CompanyId:
|
|
type: string
|
|
description: 机构编码
|
|
example: "654321"
|
|
AgreementNo:
|
|
type: string
|
|
description: 协议号
|
|
example: "AGR001"
|
|
PayAmount:
|
|
type: number
|
|
format: decimal
|
|
description: 代扣金额
|
|
example: 150.00
|
|
example: |
|
|
<?xml version="1.0" encoding="GBK"?>
|
|
<in>
|
|
<Version>1.0.1</Version>
|
|
<InstId>00001</InstId>
|
|
<TranCode>SendDisc</TranCode>
|
|
<TranDate>20240101</TranDate>
|
|
<TranSeq>123456789016</TranSeq>
|
|
<BatchNo>BATCH20240101001</BatchNo>
|
|
<TotalCount>2</TotalCount>
|
|
<TotalAmount>300.00</TotalAmount>
|
|
<WithholdingList>
|
|
<Withholding>
|
|
<BillKey>123456</BillKey>
|
|
<CompanyId>654321</CompanyId>
|
|
<AgreementNo>AGR001</AgreementNo>
|
|
<PayAmount>150.00</PayAmount>
|
|
</Withholding>
|
|
<Withholding>
|
|
<BillKey>123457</BillKey>
|
|
<CompanyId>654321</CompanyId>
|
|
<AgreementNo>AGR002</AgreementNo>
|
|
<PayAmount>150.00</PayAmount>
|
|
</Withholding>
|
|
</WithholdingList>
|
|
</in>
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseRequest'
|
|
- type: object
|
|
required:
|
|
- BatchNo
|
|
- TotalCount
|
|
- TotalAmount
|
|
- WithholdingList
|
|
properties:
|
|
BatchNo:
|
|
type: string
|
|
description: 批次号
|
|
example: "BATCH20240101001"
|
|
TotalCount:
|
|
type: integer
|
|
description: 总笔数
|
|
example: 2
|
|
TotalAmount:
|
|
type: number
|
|
format: decimal
|
|
description: 总金额
|
|
example: 300.00
|
|
WithholdingList:
|
|
type: array
|
|
description: 代扣明细列表
|
|
items:
|
|
type: object
|
|
properties:
|
|
BillKey:
|
|
type: string
|
|
description: 客户编号
|
|
example: "123456"
|
|
CompanyId:
|
|
type: string
|
|
description: 机构编码
|
|
example: "654321"
|
|
AgreementNo:
|
|
type: string
|
|
description: 协议号
|
|
example: "AGR001"
|
|
PayAmount:
|
|
type: number
|
|
format: decimal
|
|
description: 代扣金额
|
|
example: 150.00
|
|
example:
|
|
Version: "1.0.1"
|
|
InstId: "00001"
|
|
TranCode: "SendDisc"
|
|
TranDate: "20240101"
|
|
TranSeq: "123456789016"
|
|
BatchNo: "BATCH20240101001"
|
|
TotalCount: 2
|
|
TotalAmount: 300.00
|
|
WithholdingList:
|
|
- BillKey: "123456"
|
|
CompanyId: "654321"
|
|
AgreementNo: "AGR001"
|
|
PayAmount: 150.00
|
|
- BillKey: "123457"
|
|
CompanyId: "654321"
|
|
AgreementNo: "AGR002"
|
|
PayAmount: 150.00
|
|
|
|
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:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseResponse'
|
|
- type: object
|
|
properties:
|
|
Data:
|
|
type: object
|
|
properties:
|
|
BatchNo:
|
|
type: string
|
|
description: 批次号
|
|
example: "BATCH20240101001"
|
|
ProcessedCount:
|
|
type: integer
|
|
description: 已处理笔数
|
|
example: 2
|
|
SuccessCount:
|
|
type: integer
|
|
description: 成功笔数
|
|
example: 2
|
|
FailCount:
|
|
type: integer
|
|
description: 失败笔数
|
|
example: 0
|
|
example: |
|
|
<?xml version="1.0" encoding="GBK"?>
|
|
<out>
|
|
<Version>1.0.1</Version>
|
|
<InstId>00001</InstId>
|
|
<TranCode>SendDiscRes</TranCode>
|
|
<TranDate>20240101</TranDate>
|
|
<TranSeq>123456789016</TranSeq>
|
|
<RespCode>AAAAAAA</RespCode>
|
|
<RespMessage>送盘成功</RespMessage>
|
|
<Data>
|
|
<BatchNo>BATCH20240101001</BatchNo>
|
|
<ProcessedCount>2</ProcessedCount>
|
|
<SuccessCount>2</SuccessCount>
|
|
<FailCount>0</FailCount>
|
|
</Data>
|
|
</out>
|
|
application/json:
|
|
schema:
|
|
allOf:
|
|
- $ref: '../components/schemas.yaml#/components/schemas/BaseResponse'
|
|
- type: object
|
|
properties:
|
|
Data:
|
|
type: object
|
|
properties:
|
|
BatchNo:
|
|
type: string
|
|
description: 批次号
|
|
example: "BATCH20240101001"
|
|
ProcessedCount:
|
|
type: integer
|
|
description: 已处理笔数
|
|
example: 2
|
|
SuccessCount:
|
|
type: integer
|
|
description: 成功笔数
|
|
example: 2
|
|
FailCount:
|
|
type: integer
|
|
description: 失败笔数
|
|
example: 0
|
|
example:
|
|
Version: "1.0.1"
|
|
InstId: "00001"
|
|
TranCode: "SendDiscRes"
|
|
TranDate: "20240101"
|
|
TranSeq: "123456789016"
|
|
RespCode: "AAAAAAA"
|
|
RespMessage: "送盘成功"
|
|
Data:
|
|
BatchNo: "BATCH20240101001"
|
|
ProcessedCount: 2
|
|
SuccessCount: 2
|
|
FailCount: 0
|
|
|
|
'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: [] |