Taro.chooseInvoiceTitle(option)
Selects the user's invoice title. This API can be called only when the current Mini Program is associated with an Official Account that has completed WeChat verification.
Type
(option?: Option) => Promise<SuccessCallbackResult>
Parameters
Option
| Property | Type | Required | Description | 
|---|---|---|---|
| complete | (res: any) => void | No | The callback function used when the API call completed (always executed whether the call succeeds or fails) | 
| fail | (res: any) => void | No | The callback function for a failed API call | 
| success | (res: Result) => void | No | The callback function for a successful API call | 
SuccessCallbackResult
| Property | Type | Description | 
|---|---|---|
| title | string | Title name | 
| type | 0 | 1 | Title type | 
| taxNumber | string | Tax number | 
| companyAddress | string | Company address | 
| telephone | string | Mobile number | 
| bankName | string | Bank name | 
| bankAccount | string | Bank account | 
| errMsg | string | Error message | 
invoice_type
invoice type
| Property | Type | 
|---|---|
| 0 | "Company" | 
| 1 | "Individual" | 
Sample Code
Taro.chooseInvoiceTitle({
  success: function(res) {}
})
API Support
| API | WeChat Mini-Program | H5 | React Native | 
|---|---|---|---|
| Taro.chooseInvoiceTitle | ✔️ |