Getting Started

Building Blocks

Subscription Features

Localization

Invoices

Credits

Billing Features

Taxes

Payment Methods

Direct Debit Payments

Configuring Gateways

Fraud Management

Hosted Pages

Attach Additional Data

Migration

Open Source Resources

Other Features

API Integration

Third Party Integrations

Getting Started: Chargebee for Salesforce 

There are 3 steps involved in integrating Chargebee with Salesforce.

Step 1Install the Chargebee for Salesforce Application

  • Get the Chargebee plugin for Salesforce here .
  • Click Get it now.
  • Opt for the application to get installed in the production site or the sandbox, depending on your requirements.
Note

You might be asked to sign into your Salesforce account before downloading the app, if you haven't already.

  • Once you make your choice, you'll be directed to the page shown below. Once you've read their terms and conditions, click Confirm and Install!, and you are good to go.
  • You'll be asked to sign in once again, just to make sure that the process is as secure as possible. Post sign in, you'll be taken to the Package Installation Details page, where you can find all the components that are to be installed.

  • Click Continue, and you'll reach the final three steps of the installation process:

    1. The Approve Package API Access page: Once you've gone through the information and are ready for the next page, click Next.
    2. The Choose security level page: Choose the kind of access rights for the app, and click Next.
    3. The Install Package page: Give it a thumbs up!
  • You'll receive an email from support@salesforce.com, informing you about the completion of the installation process.

Step 2 Quick Setup

a) Firstly, you need to add your Chargebee site under Remote Site Settings. To add your site,

  • Click Setup on the top right corner of your Chargebee for Salesforce application. In the left side index, click Security Controls and then click Remote Site Settings.
  • Click New Remote Site, give a name to your Remote Site, and enter your Chargebee account's URL in the Remote Site URL field. Your Chargebee account URL will be in this format: https://{Chargebee-site}.chargebee.com.
  • Set the site to be Active and click Save.


b) Your second task is to create a Salesforce Site. Follow these steps:

  • To create a Force.com site, go to Setup > Develop > Sites.
  • In the Sites page, type a domain name, and click Check Availability. If the domain name is available, then you could create the site by clicking Register My Force.com Domain.

  • Click New and fill up the Site Label, Site Name, Site Contact fields. For the Active Site Home Page field, select your Payment Form.A "Payment Form" is the form that is displayed to the customer, when they click the "Send Payment" link. Finally, for the Clickjack Protection Level field, choose the Allow framing by any page (no protection) option.

  • Check Active and click Save.

  • From the Sites table, click the Site Label that you've created now, after which you'll be taken to Site Details page.

  • Scroll down to the Site Visualforce Pages section and click Edit. Then choose "chargeb.Payment_form" and "chargeb.chargebee" from the Available Visualforce Pages list, add them to the Enable Visualforce Pages list and click Save.

  • Next, click Public Access Settings under Site Detail, then scroll down to the Enable Apex Class Access section and select Edit. Add "chargeb.Payment_form", "chargb.chargebee", and "chargeb.chargebeerespons" from the Available Apex Classes to the Enable Apex Classes list, and click Save.
Note

If you already have a Force.com site and want to use the same site for webhooks, you just have to add "chargeb.chargbee" in the "Enabled Visualforce Page Access" and the "Enabled Apex Class Access" lists, and you're good to go.

c) Once that's done, click the Chargebee Setup tab to perform a quick setup:

As can be seen in the screen above, this is a three-step process:

1. Chargebee Connect
This step is to link the app to your Chargebee account. Type in the following details:

  • Username field - Chargebee login address
  • API Key field - API key created in your Chargebee account
Note

You need to have an Admin or Owner level access in Chargebee to create an API key. To read more on Chargebee API keys click here.

  • Chargebee Site field - Remote Site URL
  • Salesforce Site field - Salesforce Site URL

Click Save.

2. Chargebee Sync

You can sync your Chargebee data with Salesforce. Depending on your needs, you could choose to Sync Now (which syncs all the data immediately, for once), or Sync Hourly (which syncs the data once every hour, automatically).

3. Chargebee Settings

Here you get to setup the Payment Form of your business.

  • Billing/Card Address Requirements - Turn this ON if you require any kind of Address Verification on the Chargebee side. Ensure that you have enabled the Card Address Verification option in your Chargebee account, by going to Settings > Site Settings > Site Info, as shown in the following image.

For more on Card Address Verification in Chargebee, click here.

  • Email Address to Send Error Report - The email address provided here, will receive all error related information.

  • Payment Form Logo - Add your company's logo image to the Documents section and select the same in the Payment Form Logo dropdown.

  • Payment Form Page Footer (Line 1 and Line 2) - Type in your the address to be displayed on the Payment Form. This is usually your business' address.

  • Payment Form Terms and Conditions - Similar to the logo, upload a text document in your Documents section, and select the same in this dropdown.

Step 3 Configuring Webhook Settings

With the help of webhooks, the plugin will automatically sync Salesforce data with the Chargebee data, as and when an event occurs (subscription created/updates, Invoice generated, etc.).

  1. To configure webhooks, you'll need to a public site (a Force.com site) in Salesforce. You can use the same site that you had created in the second step of the Quick Setup.

  2. Once your Salesforce site is created, your webhook URL would be in the format of: {Your Default Web Address from your Site}/services/apexrest/chargebee_webhook

  3. To configure the webhooks in Chargebee, go to Settings > Webhooks Settings, enter the URL specified above (https://(Salesforce-Site)/services/apexrest/chargebee_webhook), and create a webhook.

You can test the URL using the Test URL option.

The setup of your Chargebee for Salesforce app is now complete, and you can now start making full use of the same. To know more about how you can make the best use of this plugin, check out our User Guide.

Loading…