Integrating with Recurly

This page assumes that you already have a Recurly account created and are able to create plans. To sign-up and create a Recurly account, visit the Recurly website.

Prerequisites

In order to integrate Recurly with Moesif, there are a few prerequisites which must be completed. These include:

  1. Creating an account with Recurly
  2. Creating a plan in Recurly

The plan must be set to bill at the End of the billing period and must include at least one add-on. The add-on is what the usage metrics will be linked to.

Configuring the Recurly integration

Moesif’s connection with Recurly involves 2-way communication. Moesif has created a simple way to get all the info you need and to configure certain variables for Recurly in a single screen.The Recurly setup details screen can be accessed a few ways, including:

Through Settings > Extensions

Example

and then selecting install on the Recurly extension

Example

Through the Billing Meters screen Edit Billing Providers dropdown

Example

And through the Create New Billing Meter screen

Example

Once you’ve opened the configuration screen through one of the routes above, you can get the info needed to add the Moesif Webhook to Recurly, inputs to plug the Recurly API into Moesif, and customize your Customer ID source in a single place.

Adding the Moesif Webhook to Recurly

In Recurly, a Webhook needs to be added so that Recurly can send subscription updates to Moesif. To do this you’ll need to make sure you are logged into your Recurly account. Once logged in, use the left-side menu to navigate to Integrations > Webhooks.

Example

Once you’re on the Webhooks page click the Configure button in the top-right of the screen.

Example

Then click New Endpoint button in the top-right of the screen.

Example

On the New Endpoint screen, create a name for the endpoint, paste in the Webhook URL into the ENDPOINT URL field, and your Moesif Application ID into the HTTP AUTH USERNAME field. Leave the HTTP AUTH PASSWORD field blank.

These details can be found in Moesif by clicking the Edit Billing Provider dropdown on the Billing Meters screen or by going to Settings > Extensions > Recurly and clicking install.

Example

Then click Save Changes. The Webhook should then be created and display on the Webhooks screen in Recurly.

Example

Configuring the Recurly extension in Moesif

In Moesif, you will need to plug in the Recurly API details so that Moesif can post usage details to Recurly to bill upon. These details can be entered into the Recurly API Version and Recurly API Key fields on the Recurly Setup Details screen.

Currently, Moesif only supports v3 of the Recurly API.

The Recurly Private API Key can be found in Recurly by navigating to Recurly > Integrations > API Credentials.

Example

Take the value listed under PRIVATE API KEY and paste it into the Recurly API Key field on the Recurly Setup Details screen.

Example

Once completed, be sure to click Save.

Customizing the Customer ID source

The Customize Customer ID Source configuration on the Recurly Setup Details screen allows users to specify the Recurly subscription and account field that Moesif will use as the Moesif company id and Moesif user id respectfully.

Example

Linking a plan in Recurly to a billing meter

When creating a new billing meter, in the Link To section you can specify Recurly as the Billing Provider and then select the Plan and Add-on you’d like the usage to be linked to.

Example

Updated: