| components: | |
| schemas: | |
| AccountQueryRequest: | |
| type: object | |
| title: 账户查询请求 | |
| required: | |
| - userid | |
| properties: | |
| userid: | |
| title: 用户ID | |
| type: string | |
| subaccounts: | |
| title: 子账户列表 | |
| type: array | |
| items: | |
| description: | | |
| 需要查询的子账户名,如果查询所有子账户可以用 ['*'] 来查询 | |
| type: string | |
| title: 子账户ID | |
| AccountQueryResponse: | |
| type: object | |
| title: 账户查询应答 | |
| properties: | |
| userid: | |
| title: 用户ID | |
| type: string | |
| username: | |
| title: 用户名 | |
| type: string | |
| status: | |
| title: 账户状态 | |
| $ref: 'definitions.yaml#/components/schemas/UserStatus' | |
| balance: | |
| title: 总余额(分) | |
| type: integer | |
| frozenbal: | |
| title: 冻结金额(分) | |
| type: integer | |
| subaccountList: | |
| type: array | |
| title: 子账户列表 | |
| items: | |
| title: 子账户属性 | |
| $ref: 'definitions.yaml#/components/schemas/SubAccountBalance' | |
| PreAuthorizedDebitRequest: | |
| type: object | |
| title: 预授权交易请求 | |
| required: | |
| - userid | |
| - preAuthorizedAmount | |
| - shopaccno | |
| - transDate | |
| - transTime | |
| properties: | |
| billno: | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| userid: | |
| title: 用户ID | |
| type: string | |
| accountName: | |
| title: 账户名 | |
| type: string | |
| preAuthorizedAmount: | |
| title: 预授权金额(分) | |
| type: integer | |
| shopaccno: | |
| $ref: 'definitions.yaml#/components/schemas/ShopAccNo' | |
| transDate: | |
| $ref: 'definitions.yaml#/components/schemas/TransDate' | |
| transTime: | |
| $ref: 'definitions.yaml#/components/schemas/TransTime' | |
| PreAuthorizedDebitResponse: | |
| type: object | |
| title: 预授权交易应答 | |
| properties: | |
| refno: | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| result: | |
| $ref: 'definitions.yaml#/components/schemas/TransResult' | |
| message: | |
| type: string | |
| title: 预授权交易信息 | |
| PreAuthorizedSettleRequest: | |
| type: object | |
| title: 预授权交易清算 | |
| required: | |
| - refno | |
| - billno | |
| - transTime | |
| - transTime | |
| - amount | |
| properties: | |
| refno: | |
| title: 预授权交易系统交易参考号 | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| billno: | |
| title: 预授权交易清算订单号 | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| transDate: | |
| $ref: 'definitions.yaml#/components/schemas/TransDate' | |
| transTime: | |
| $ref: 'definitions.yaml#/components/schemas/TransTime' | |
| amount: | |
| title: 清算金额, 小于等于预授权金额(分) | |
| type: integer | |
| PreAuthorizedSettleResponse: | |
| type: object | |
| title: 预授权交易清算结果 | |
| properties: | |
| refno: | |
| title: 预授权交易清算交易系统交易参考号 | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| leftPreAuthorizedAmount: | |
| title: 清算后剩余预授权金额 | |
| type: integer | |
| AccountPayRequest: | |
| type: object | |
| title: 主账户余额扣款交易 | |
| required: | |
| - billno | |
| - shopaccno | |
| - transTime | |
| - transDate | |
| - userid | |
| - amount | |
| - dtltype | |
| properties: | |
| billno: | |
| title: 交易订单号 | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| shopaccno: | |
| $ref: 'definitions.yaml#/components/schemas/ShopAccNo' | |
| transDate: | |
| $ref: 'definitions.yaml#/components/schemas/TransDate' | |
| transTime: | |
| $ref: 'definitions.yaml#/components/schemas/TransTime' | |
| userid: | |
| title: 用户ID | |
| type: string | |
| amount: | |
| title: 扣款金额(分) | |
| type: integer | |
| accountName: | |
| title: 账户名 | |
| type: string | |
| description: | |
| title: 交易描述 | |
| type: string | |
| dtltype: | |
| title: 交易类型 | |
| type: string | |
| default: "pos" | |
| AccountPayResponse: | |
| type: object | |
| title: 账户余额扣款交易应答 | |
| required: | |
| - refno | |
| properties: | |
| refno: | |
| title: 系统交易参考号 | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| description: | |
| title: 系统返回交易描述 | |
| type: string | |
| aftbal: | |
| title: 账户余额(分) | |
| type: integer | |
| realAmount: | |
| title: 实际扣款金额(分) | |
| type: integer | |
| SubAccountPayRequest: | |
| type: object | |
| description: 子账户消费接口 | |
| required: | |
| - billno | |
| - shopaccno | |
| - transDate | |
| - transTime | |
| - amount | |
| - overdraft | |
| - accountList | |
| properties: | |
| billno: | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| shopaccno: | |
| $ref: 'definitions.yaml#/components/schemas/ShopAccNo' | |
| transDate: | |
| $ref: 'definitions.yaml#/components/schemas/TransDate' | |
| transTime: | |
| $ref: 'definitions.yaml#/components/schemas/TransTime' | |
| userid: | |
| title: 用户ID | |
| type: string | |
| amount: | |
| title: 扣款金额(分) | |
| type: integer | |
| overdraft: | |
| type: boolean | |
| title: 是否允许主账户透支 | |
| useMainAccount: | |
| type: boolean | |
| title: 是否扣款账户 | |
| accountList: | |
| type: array | |
| description: 按照账户列表顺序扣款 | |
| items: | |
| type: object | |
| description: 扣款账户列表 | |
| properties: | |
| name: | |
| type: string | |
| title: 账户名 | |
| SubAccountPayResponse: | |
| type: object | |
| description: 账户消费应答 | |
| properties: | |
| refno: | |
| $ref: 'definitions.yaml#/components/schemas/Refno' | |
| hostDate: | |
| $ref: 'definitions.yaml#/components/schemas/TransDate' | |
| hostTime: | |
| $ref: 'definitions.yaml#/components/schemas/TransTime' | |
| result: | |
| $ref: 'definitions.yaml#/components/schemas/TransResult' | |
| description: | |
| title: 扣款情况描述 | |
| type: string | |
| accountList: | |
| type: array | |
| description: 账户扣款情况 | |
| items: | |
| type: object | |
| description: 账户结果 | |
| properties: | |
| name: | |
| title: 账户名 | |
| type: string | |
| payAmount: | |
| title: 扣款金额 | |
| type: integer | |
| aftbal: | |
| title: 交易后余额 | |
| type: integer | |
| paths: | |
| accountQuery: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| post: | |
| tags: | |
| - pos | |
| requestBody: | |
| description: 账户余额查询 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AccountQueryRequest' | |
| responses: | |
| '200': | |
| description: 查询账户成功 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AccountQueryResponse' | |
| '404': | |
| description: 指定用户不存在 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: 'definitions.yaml#/components/schemas/ErrorResponse' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |
| accountPay: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| post: | |
| tags: | |
| - pos | |
| - pay | |
| requestBody: | |
| description: 主账户余额消费 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AccountPayRequest' | |
| responses: | |
| '200': | |
| description: 账户消费成功 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/AccountPayResponse' | |
| '400': | |
| description: | | |
| 消费失败, code 用于定义错误信息 | |
| * short_of_balance 余额不足 | |
| * account_status_error 账户状态异常 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: 'definitions.yaml#/components/schemas/ErrorResponse' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |
| subaccPay: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| post: | |
| tags: | |
| - pay | |
| requestBody: | |
| description: | | |
| 子账户消费, 请求时指定扣款列表,系统安装账户顺序扣款 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/SubAccountPayRequest' | |
| responses: | |
| '200': | |
| description: 扣款成功 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/SubAccountPayResponse' | |
| '400': | |
| description: | | |
| 扣款失败, code 定义错误信息 | |
| * short_of_balance 余额不足 | |
| * account_status_error 账户状态异常 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: 'definitions.yaml#/components/schemas/ErrorResponse' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |
| accountPreAuthorizedDebit: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| post: | |
| tags: | |
| - pos | |
| - pay | |
| requestBody: | |
| description: 账户预授权交易 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PreAuthorizedDebitRequest' | |
| responses: | |
| '200': | |
| description: 预授权交易成功 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PreAuthorizedDebitResponse' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |
| accountPreAuthorizedSettle: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| post: | |
| tags: | |
| - pos | |
| - pay | |
| requestBody: | |
| description: 预授权交易清算 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PreAuthorizedSettleRequest' | |
| responses: | |
| '200': | |
| description: 预授权交易清算成功 | |
| content: | |
| application/json: | |
| schema: | |
| $ref: '#/components/schemas/PreAuthorizedSettleResponse' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |
| querySubAccountMetadata: | |
| parameters: | |
| - $ref: definitions.yaml#/components/headers/TenantId | |
| get: | |
| tags: | |
| - sa | |
| responses: | |
| '200': | |
| description: 子账户元数据信息 | |
| content: | |
| application/json: | |
| schema: | |
| type: array | |
| items: | |
| $ref: 'definitions.yaml#/components/schemas/SubAccountMetadata' | |
| '500': | |
| $ref: 'definitions.yaml#/components/responses/CommonError' | |