Invoice App
You can change the default behavior of the application by configuring some settings. Create a script that runs before the application starts and set window.invoice_app_config object. For example, you can add the following to your html:
<script>
window.invoice_app_config = {
service_url: 'https://apirone.com/api/v2/',
wallets_ep: 'wallets',
invoices_ep: 'invoices/%s',
images_relative_path: 'img',
invoice_id_key: 'id',
embed: true,
logo: true,
qr_only: true,
mount_point: '.my-mount-point-for-app',
};
</script>service_urlDefines the URL prefix for requests to the Apirone API RESTful service. The fallback value can be seen in the example above.wallets_epDefines the URL suffix endpoint for querying wallets in the Apirone API RESTful service. The fallback value can be seen in the example above.invoices_epDefines a URL suffix endpoint for requesting invoice information from the Apirone API RESTful service. Use the%splaceholder for the invoice ID. The fallback value can be seen in the example above. For example, you could define it asinvoices&id=%s, and for the default service URL and the invoice IDABC123, the full URL would be:https://apirone.com/api/v2/invoices&id=ABC123images_relative_pathSpecifies the relative path to images used by the application,imgby default.invoice_id_keyOverrides the invoice id query parameter key ifid(the default) is already used for other purposes in the target system.embedThe Embed parameter set totruedisables the linkback handler and disables the display of the Apirone logo,falseby default.logoDisplays the logo if theembedparameter is set totrue. You can also specify a custom logo as HTML code,falseby default.qr_onlyThe value can be used if you want to see only a QR code on app pagefalseby default.mount_pointThe value can be used if you want to mount the application into an HTML element with an ID or class other than #app. The default is#app.
All of these settings are not required. So, you can embed the application to any environment.