# wx.chooseInvoiceTitle(Object object)

> 基础库 1.5.0 开始支持，低版本需做[兼容处理](1003706)。

> __以 [Promise 风格](/miniprogram/dev/framework/app-service/api.md#异步-API-返回-Promise) 调用__：支持
> 
> __小程序插件__：支持，需要小程序基础库版本不低于 [2.16.1](1003706)
> 
> __微信 鸿蒙 OS 版__：支持

## 功能描述

选择用户的发票抬头。当前小程序必须关联一个公众号，且这个公众号是完成了[微信认证](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1496554031_RD4xe)的，才能调用 chooseInvoiceTitle。

## 参数

### Object object

| 属性 | 类型 | 默认值 | 必填 | 说明 |
| ---- | ---- | ------ | -------- | ---- |
| success | function |  | 否 | 接口调用成功的回调函数 |
| fail | function |  | 否 | 接口调用失败的回调函数 |
| complete | function |  | 否 | 接口调用结束的回调函数（调用成功、失败都会执行） |

#### object.success 回调函数
##### 参数

###### Object res


```json
[
  {
    "属性": "type",
    "类型": "string",
    "说明": "抬头类型",
    "子项": [
      {
        "合法值": "0",
        "说明": "单位"
      },
      {
        "合法值": "1",
        "说明": "个人"
      }
    ]
  },
  {
    "属性": "title",
    "类型": "string",
    "说明": "抬头名称"
  },
  {
    "属性": "taxNumber",
    "类型": "string",
    "说明": "抬头税号"
  },
  {
    "属性": "companyAddress",
    "类型": "string",
    "说明": "单位地址"
  },
  {
    "属性": "telephone",
    "类型": "string",
    "说明": "手机号码"
  },
  {
    "属性": "bankName",
    "类型": "string",
    "说明": "银行名称"
  },
  {
    "属性": "bankAccount",
    "类型": "string",
    "说明": "银行账号"
  },
  {
    "属性": "errMsg",
    "类型": "string",
    "说明": "错误信息"
  }
]
```

## 示例代码

[在开发者工具中预览效果](https://developers.weixin.qq.com/s/GJ4S9nmQ7x2E)

```js
wx.chooseInvoiceTitle({
  success(res) {}
})
```
