createInvoicePreviewUrl( )


Creates a link that can be used by a customer to preview the invoice.

The createInvoicePreviewUrl() function returns a Promise that resolves to a temporary link to a preview of the invoice with the specified ID.

You can get a list of invoices by querying your site's "Billing/Invoices" collection. Each invoice in the query result contains the _id and version fields, which must be used when calling createInvoicePreviewUrl().

By default, createInvoicePreviewUrl() can be called by site contributors only. To allow customers to generate the invoice preview link, set suppressAuth in the options argument to true.

Method Declaration
Copy
Method Parameters
idIdAndVersionRequired

Object containing the ID and version of the invoice.


optionsAuthOptions

An object with the following boolean property: suppressAuth.

Returns
Return Type:Promise<string>
Was this helpful?
Yes
No