title: Taro.chooseInvoice(option)

sidebar_label: chooseInvoice

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.

Reference

Type

  1. (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

  1. Taro.chooseInvoice({
  2. success: function (res) {}
  3. })

API Support

API WeChat Mini-Program H5 React Native
Taro.chooseInvoice ✔️