Set up PayPal with Rebilly Instruments

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

Important

To use PayPal with the Rebilly Instruments JavaScript library, you must have a PayPal gateway configured and connected to your Rebilly account. If you have not already done so, complete the Setup PayPal gateway tutorial.

Basic library setup

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

For this example the purchase data property type is money.
JavascriptHTML
Copy
Copied
import RebillyInstruments from '@rebilly/instruments';

RebillyInstruments.mount({
  publishableKey: 'pk_sandbox_123',
  organizationId: 'org-123',
  websiteId: 'my-website-id',
  apiMode: 'sandbox',
  money: {
    amount: 50,
    currency: 'USD'
  }
});
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>