Set up Add-ons with Rebilly Instruments
This topic describes how to set up add-ons for use with the Rebilly Instruments JavaScript library.
Important
Add-ons only works together with the
items
propertyAdd-ons setup
If you have not already done so, complete the basic setup tutorial.
The add-ons will show up at the bottom of the confirmation screen.
JavascriptHTML
import RebillyInstruments from '@rebilly/instruments';
RebillyInstruments.mount({
organizationId: 'test-org-2019-12-07',
publishableKey: 'pk_sandbox_WcUZLs3xwB7dubewna3zJA75wdMBEHeWHOyQww8',
websiteId: 'ach-example',
apiMode: "sandbox",
items: [
{
planId: 'my-plan-id',
quantity: 1
},
],
addons: [
{
planId: 'my-addon-plan-id',
quantity: 1
},
],
});
<html>
<body>
<div id="app">
<div class="form-wrapper">
<section class="rebilly-instruments-summary"></section>
<section class="rebilly-instruments"></section>
</div>
</div>
</body>
</html>