Taro.chooseInvoice(option)
Selects the user's existing invoices.
Obtaining Information of Reimbursed Invoice Based on cardId
and encryptCode
See [Querying Information of Reimbursed Invoice] in WeChat E-Invoice Documentation. For information on how to obtain access_token
, see the auth.getAccessToken API documentation.
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 |
---|---|---|
invoiceInfo | string | The list of invoices selected by the user |
errMsg | string | Call result |
Sample Code
Taro.chooseInvoice({
success: function (res) {}
})
API Support
API | WeChat Mini-Program | H5 | React Native |
---|---|---|---|
Taro.chooseInvoice | ✔️ |