Skip to main content
Version: Next

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.

Reference

Type

(option?: Option) => Promise<SuccessCallbackResult>

Parameters

Option

PropertyTypeRequiredDescription
complete(res: any) => voidNoThe callback function used when the API call completed (always executed whether the call succeeds or fails)
fail(res: any) => voidNoThe callback function for a failed API call
success(res: Result) => voidNoThe callback function for a successful API call

SuccessCallbackResult

PropertyTypeDescription
invoiceInfostringThe list of invoices selected by the user
errMsgstringCall result

Sample Code

Taro.chooseInvoice({
success: function (res) {}
})

API Support

APIWeChat Mini-ProgramH5React Native
Taro.chooseInvoice✔️