Set up a bump offer with Rebilly Instruments

This topic describes how to set up a bump offer for use with the Rebilly Instruments JavaScript library.

Important
Bump offers must use the items property.

Bump offer setup

If you have not already done so, complete the basic setup tutorial.

The bump offer will be displayed at the top of the payment method information.

JavascriptHTML
Copy
Copied
import RebillyInstruments from '@rebilly/instruments';

RebillyInstruments.mount({
  organizationId: 'test-org-2019-12-07',
  publishableKey: 'pk_sandbox_WcUZLs3xwB7dubewna3zJA75wdMBEHeWHOyQww8',
  websiteId: 'example',
  apiMode: "sandbox",
  items: [
    {
      planId: 'rebilly-e-book',
      quantity: 1,
    }
  ],
  bumpOffer: [
    {
      planId: 'rebilly-t-shirt',
      quantity: 1,
    }
  ]
});
Copy
Copied
<html>
  <body>
    <div id="app">
      <div class="form-wrapper">
        <section class="rebilly-instruments-summary"></section>
        <section class="rebilly-instruments"></section>
      </div>
    </div>
  </body>
</html>