# 查询收款人详情

> 根据 beneficiaryId 获取当前操作商户收款人的完整详情。

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: transfer/v3-beneficiaries/query-detail
info:
  title: 查询收款人详情
  version: original
  description: 根据 beneficiaryId 获取当前操作商户收款人的完整详情。
servers:
  - url: https://sandbox-transfer-api.onerway.com
    description: sandbox
  - url: https://transfer-api.onerway.com
    description: production
paths:
  /api/v3/beneficiary/queryDetail:
    post:
      summary: 查询收款人详情
      description: 根据 beneficiaryId 获取当前操作商户收款人的完整详情。
      parameters:
        - name: ApiKey
          in: header
          required: true
          description: Onerway 分配的账户服务 API key 请求 Header；必须使用与请求域名相同环境的值。
          schema:
            type: string
            description: Onerway 分配的账户服务 API key 请求 Header；必须使用与请求域名相同环境的值。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                beneficiaryId:
                  type: integer
                  description: Onerway 收款人 ID（64 位整数）。
                  x-onerway-constraints:
                    - kind: rule
                      text: beneficiaryId 必填。不存在、不属于当前操作商户或已删除的收款人均返回无效收款人业务错误。
                onBehalfOf:
                  type: string
                  description: 请求实际对应的商户号，仅在代其他商户发起请求时填写。
              required:
                - beneficiaryId
            examples:
              default:
                summary: 请求结构示例（替换为当前商户数据）
                value:
                  beneficiaryId: 10001
      responses:
        "200":
          description: 成功示例
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      respCode:
                        type: string
                        description: 响应码；`20000` 表示请求处理成功，其余为错误码。
                      respMsg:
                        type: string
                        description: 响应码对应的可读说明。
                      data:
                        type: object
                        properties:
                          entityType:
                            type: string
                            description: 收款人的主体类型，取值见[枚举说明](/zh/transfer/api-reference/v3-enums#entitytype-主体类型)。
                            enum:
                              - INDIVIDUAL
                              - BUSINESS
                            x-enum-descriptions:
                              INDIVIDUAL: 个人
                              BUSINESS: 企业
                          merchantRefId:
                            type: string
                            description: 商户为收款人设置的外部标识。
                          individual:
                            type: object
                            properties:
                              name:
                                type: object
                                properties:
                                  firstName:
                                    type: string
                                    description: 收款人的名。
                                  lastName:
                                    type: string
                                    description: 收款人的姓。
                                description: 个人姓名
                              identity:
                                type: object
                                properties:
                                  idType:
                                    type: string
                                    description: 证件类型
                                  idNumber:
                                    type: string
                                    description: 证件号码
                                  issuingCountry:
                                    type: string
                                    description: 证件签发国家或地区代码，参见[国家/地区枚举](/zh/transfer/api-reference/v3-enums#国家地区枚举)。
                                  expiryDate:
                                    type: string
                                    description: 证件到期日期，格式为 yyyy-MM-dd。
                                  issueDate:
                                    type: string
                                    description: 证件签发日期，格式为 yyyy-MM-dd。
                                description: 证件信息
                              dateOfBirth:
                                type: string
                                description: 出生日期，格式为 yyyy-MM-dd。
                            description: 个人主体信息，仅适用于 entityType=INDIVIDUAL。
                          business:
                            type: object
                            properties:
                              companyName:
                                type: string
                                description: 收款人的公司名称。
                              tin:
                                type: string
                                description: 税务识别号
                              registrationNumber:
                                type: string
                                description: 企业注册号
                              registrationDate:
                                type: string
                                description: 企业注册日期，格式为 yyyy-MM-dd。
                            description: 企业主体信息，仅适用于 entityType=BUSINESS。
                          contact:
                            type: object
                            properties:
                              email:
                                type: string
                                description: 收款人的邮箱。
                              mobile:
                                type: object
                                properties:
                                  areaCode:
                                    type: string
                                    description: 国际电话区号，包含 +
                                  number:
                                    type: string
                                    description: 电话号码，不包含区号
                                description: 手机联系方式
                            description: 联系方式
                          address:
                            type: object
                            properties:
                              countryCode:
                                type: string
                                description: 国家或地区代码；当前响应取收款账户国家或地区，参见[国家/地区枚举](/zh/transfer/api-reference/v3-enums#国家地区枚举)。
                              state:
                                type: string
                                description: 收款人地址所在的省或州。具体规则请参考[收款人字段规则查询](/zh/transfer/api-reference/endpoints/v3-beneficiaries-schema)返回的校验规则。
                              city:
                                type: string
                                description: 收款人地址所在的城市。具体规则请参考[收款人字段规则查询](/zh/transfer/api-reference/endpoints/v3-beneficiaries-schema)返回的校验规则。
                              addressLine1:
                                type: string
                                description: 主要街道地址，通常包含门牌号和街道名称。
                              addressLine2:
                                type: string
                                description: 楼栋、楼层、房间或单元等补充信息。
                              addressLine3:
                                type: string
                                description: 其他必要的地址补充信息。
                              postalCode:
                                type: string
                                description: 收款人地址的邮政编码。
                            description: 收款人的地址信息。
                          account:
                            type: object
                            properties:
                              countryCode:
                                type: string
                                description: 国家或地区代码，参见[国家/地区枚举](/zh/transfer/api-reference/v3-enums#国家地区枚举)。
                              currency:
                                type: string
                                description: 账户币种，参见[币种枚举](/zh/transfer/api-reference/v3-enums#币种枚举)。
                              bankAccount:
                                type: object
                                properties:
                                  accountHolderName:
                                    type: string
                                    description: 银行账户持有人名称
                                  bankName:
                                    type: string
                                    description: 收款银行名称。
                                  accountType:
                                    type: string
                                    description: 银行账户类型，参见[枚举说明](/zh/transfer/api-reference/v3-enums#accounttype-银行账户类型)。
                                    enum:
                                      - CHECKING
                                      - SAVING
                                      - ORDINARY
                                    x-enum-descriptions:
                                      CHECKING: 支票账户
                                      SAVING: 储蓄账户
                                      ORDINARY: 普通账户
                                  accountIdentifier:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        description: 银行账号标识类型，取值见[枚举说明](/zh/transfer/api-reference/v3-enums#type-银行账号标识类型)。
                                        enum:
                                          - IBAN
                                          - LOCAL_ACCOUNT
                                        x-enum-descriptions:
                                          IBAN: 国际银行账户号码
                                          LOCAL_ACCOUNT: 本地银行账号
                                      value:
                                        type: string
                                        description: IBAN 或本地银行账号，与 type 一致
                                    description: 银行账号及其类型
                                  swiftCode:
                                    type: string
                                    description: 收款银行的 SWIFT 代码。
                                  routingNumber:
                                    type: string
                                    description: 银行代码或本地清算路由代码，用于识别收款银行或其在当地清算网络中的路由。具体代码类型取决于收款国家：英国使用 Sort
                                      Code，美国使用 ABA Routing Number。
                                  branchNumber:
                                    type: string
                                    description: 收款账户所属银行分支机构的代码。
                                description: 银行账户信息
                              walletAccount:
                                type: object
                                properties:
                                  walletProvider:
                                    type: string
                                    description: 钱包服务商，参见[钱包服务商](/zh/transfer/api-reference/v3-enums#walletprovider-walletformat-钱包服务商与账号格式)。
                                  walletFormat:
                                    type: string
                                    description: 所选 walletProvider
                                      对应的钱包账号格式，参见[钱包账号格式](/zh/transfer/api-reference/v3-enums#walletprovider-walletformat-钱包服务商与账号格式)。
                                  walletIdentifier:
                                    type: string
                                    description: 收款人的钱包账号，账号格式取决于 walletProvider 和 walletFormat。
                                description: 电子钱包账户信息
                              cashPickupAccount:
                                type: object
                                properties:
                                  pickupBankName:
                                    type: string
                                    description: 现金支取机构名称
                                  pickupBranchId:
                                    type: string
                                    description: 领取网点编号
                                  pickupBranchName:
                                    type: string
                                    description: 领取网点名称
                                  pickupBranchAddress:
                                    type: string
                                    description: 领取网点地址
                                description: 现金支取网点信息
                            description: 收款账户信息
                          beneficiaryId:
                            type: string
                            description: Onerway 收款人 ID。
                          merchantNo:
                            type: string
                            description: 请求发起方的商户号。
                          onBehalfOf:
                            type: string
                            description: 请求实际对应的商户号，仅在代其他商户发起请求时填写。
                          status:
                            type: string
                            description: 收款人状态，参见[收款人状态](/zh/transfer/api-reference/v3-enums#beneficiarystatus-收款人状态)。
                            enum:
                              - pass
                              - unnecessary
                              - disable
                              - deleted
                            x-enum-descriptions:
                              pass: 审核通过
                              unnecessary: 无需审核
                              disable: 停用
                              deleted: 已删除
                          paymentMethod:
                            type: string
                            description: 付款方式，参见[枚举说明](/zh/transfer/api-reference/v3-enums#paymentmethod-付款方式)。
                            enum:
                              - BANK_TRANSFER
                              - SWIFT
                              - E_WALLET
                              - CASH_PICKUP
                            x-enum-descriptions:
                              BANK_TRANSFER: 银行转账
                              SWIFT: SWIFT 汇款
                              E_WALLET: 电子钱包
                              CASH_PICKUP: 现金支取
                          createTime:
                            type: string
                            description: 创建时间；时区：北京时间（UTC+8）。
                          updateTime:
                            type: string
                            description: 更新时间；时区：北京时间（UTC+8）。
                        description: 成功业务数据；失败不作为有效业务数据读取
                        x-onerway-constraints:
                          - kind: rule
                            text: individual/business、bankAccount/walletAccount/cashPickupAccount
                              按主体和付款方式选择返回；不适用分支没有有效内容。历史记录中未保存的叶子字段可能为空，不能以请求字段必填性推断响应必有值。
                      error:
                        type: object
                        properties:
                          type:
                            type: string
                            description: 错误类型。
                          code:
                            type: string
                            description: 本接口错误标识。
                          declineCode:
                            type: string
                            description: 拒绝原因码，可能为空。
                          message:
                            type: string
                            description: 错误详细说明
                          param:
                            type: string
                            description: 失败字段或条件；无法定位时可能为空
                          docUrl:
                            type: string
                            description: 错误文档链接，可能为空。
                          requestId:
                            type: string
                            description: 服务端错误跟踪标识，req_ + 32 位十六进制字符；不是商户请求编号
                          errorDetails:
                            type: array
                            description: 具体错误明细；见下列分支
                            items:
                              type: object
                              properties:
                                errorCode:
                                  type: string
                                  description: 业务或校验明细码。
                                message:
                                  type: string
                                  description: 明细说明
                        description: 结构化失败信息；并非每个失败分支都有该字段
                  - type: object
                    properties:
                      respCode:
                        type: string
                      respMsg:
                        type: string
                      error:
                        type: object
                        properties:
                          type:
                            type: string
                          code:
                            type: string
                          message:
                            type: string
                          requestId:
                            type: string
                          errorDetails:
                            type: array
                            items:
                              type: object
                              properties:
                                errorCode:
                                  type: string
                                message:
                                  type: string
                              required:
                                - errorCode
                                - message
                        required:
                          - type
                          - code
                          - message
                          - requestId
                          - errorDetails
                    required:
                      - respCode
                      - respMsg
                      - error
              examples:
                "50112":
                  summary: 编号不存在、不属于当前商户或已删除。
                  description: 编号不存在、不属于当前商户或已删除。
                  value:
                    respCode: "50112"
                    respMsg: beneficiaryId invalid
                    error:
                      type: business_error
                      code: cl1048
                      message: beneficiaryId invalid
                      requestId: req_00000000000000000000000000000001
                      errorDetails:
                        - errorCode: cl1048
                          message: beneficiaryId invalid
                success:
                  summary: 成功示例
                  value:
                    respCode: "20000"
                    respMsg: Success
                    data:
                      beneficiaryId: "10001"
                      merchantNo: "10000"
                      status: unnecessary
                      entityType: BUSINESS
                      paymentMethod: BANK_TRANSFER
                      business:
                        companyName: Example Demo Company
                        registrationNumber: demo_registration_001
                        registrationDate: 2020-01-01
                        tin: demo_tax_id
                      contact:
                        email: demo@example.com
                      address:
                        countryCode: US
                        state: Example State
                        city: Example City
                        addressLine1: Example Address
                        postalCode: "00000"
                      account:
                        countryCode: US
                        currency: USD
                        bankAccount:
                          accountHolderName: Example Demo Company
                          bankName: Example Bank
                          accountType: CHECKING
                          accountIdentifier:
                            type: LOCAL_ACCOUNT
                            value: demo_account_001
                          routingNumber: "000000000"
                failure:
                  summary: 编号不存在、不属于当前商户或已删除。
                  value:
                    respCode: "50112"
                    respMsg: beneficiaryId invalid
                    error:
                      type: business_error
                      code: cl1048
                      message: beneficiaryId invalid
                      requestId: req_00000000000000000000000000000001
                      errorDetails:
                        - errorCode: cl1048
                          message: beneficiaryId invalid
```
