The Sisense Stripe connector is a standalone connector that allows you to import data from Stripe’s API into the ElastiCube Manager. After you have downloaded and installed the connector, you can connect through a connection string you provide Sisense in the ElastiCube Manager. The connection string is used to authenticate users who connect to the Stripe APIs. To obtain a connection string, you will need to create a Stripe app.

Once you have connected to Stripe, you can import a variety of tables from the Stripe API.

This page describes how to install the Stripe connector, how to connect to Stripe with a connection string, and what tables you can import into the ElastiCube Manager:

Installing the Stripe Connector

Sisense provides the Stripe connector as a standalone connector that you can download and add to your list of default Sisense connectors.

To install the Stripe connector:

  1. Download the Stripe installation file.
  2. Open the installation file and click Install.
  3. After the installation process is complete, click Close.

The Stripe connector is displayed in the ElastiCube Manager under Add Data > Web Services.

Connecting to the Stripe REST API

To access Stripe’s REST API from the ElastiCube Manager, you must provide valid Oauth Stripe credentials through a connection string. These credentials are provided by Stripe when you create an application.

After you receive your credentials from Stripe, you can create the connection string and provide Sisense with it to connect to your data.

Registering an App

Follow the steps below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:

  1. Log into your Stripe dashboard and click Your Account > Account Settings > Connect > Platform Settings.
  2. Enter a name, description, and other information to be displayed to users when they log in to grant permissions to your app.
  3. If you are making a desktop application, set the Redirect URL to http://localhost:33333 or a different port number of your choice.

If you are making a Web application, set the Redirect URL to a page on your Web app you would like the user to be returned to after they have authorized your application.

Authenticating through Stripe

After setting the following properties, you are ready to connect:

  • OAuthClientId: Set this to the client Id in the Connect section of your account settings.
  • OAuthClientSecret: Set this to a secret key in the API Keys section of your account settings.
  • CallbackURL: Set this to the Redirect URL in the Connect section of your account settings.
  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.

When you connect the driver opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The driver completes the OAuth process.

  1. Extracts the access token from the callback URL and authenticates requests.
  2. Refreshes the access token when it expires.
  3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Adding Stripe Tables to your ElastiCube

Sisense uses connection strings to connect to Stripe and import data into the ElastiCube Manager.

The connection string to connect to Stripe has the following structure:

jdbc:Stripe:Property1=Value1;Property2=Value2;

The following is an example of a Stripe connection string:

jdbc:Stripe:OAuthclientId=xxxxxxxxxxxxx;OAuthClientSecret=xxxxxxxxxxxxx;InitiateOAuth=GETANDREFRESH;

Note: To switch between accounts, you need to delete the file OAuthsettings.txt file located at …\Users\xxx\AppData\Roaming\CData\Stripe Data Provider.

To add Stripe data:

  1. In ElastiCube Manager, click Add Data and then, Stripe. The Connect to Stripe window is displayed.
  2. In Datasource Connection String, enter your connection string.
  3. Click Connect to Server. Stripe is displayed in the Select Database list.
  4. Click OK. Sisense connects to Stripe and displays a list of tables available for you to import.
  5. Select the relevant tables and click Add.
  6. The tables are displayed in the ElastiCube Manager.

Switching between Accounts

When you connect to the Stripe data source, Sisense saves your OAuth values in the file OAuthsettings.txt file located at …\Users\xxx\AppData\Roaming\CData\Stripe Data Provider on your Sisense server. To connect to the Stripe data source with another user on the same machine, you must delete the OAuthsettings.txt file. Sisense will then generate a new file for that user.

Another option to support multiple users is to define the location and file name of an OAuthsettings file for each unique user in your connection string through the OAuthSettingsLocation parameter. When each user connects to the data source, Sisense generates the OAuth file with the file name you specify in the location you define. In the examples below, two users are allowed to access the Stripe data source and for each user, Sisense generates a file that contains that user’s OAuth values in the location defined in the string.

jdbc:Stripe:OAuthSettingsLocation=C:\Stripe\auth\john.txt;OAuthClientId=11276856774486;OAuthClientSecret

=064c70d78567jm2b7e7e4224fad;InitiateOAuth=GETANDREFRESH;Version=2.8;CallbackURL=http://localhost/;

jdbc:Stripe:OAuthSettingsLocation=C:\Stripe\auth\sally.txt;OAuthClientId=11276856774486;OAuthClientSecret

=064c70d78567jm2b7e7e4224fad;InitiateOAuth=GETANDREFRESH;Version=2.8;CallbackURL=http://localhost/;

In the example above, to OAuth files are created, one for John and one for Sally in the location C:\Stripe\auth\.

This is useful if you support many users who each need to access the Stripe data source.

Stripe Tables

Stripe’s RESTful APIs expose the following Stripe tables that you can import into the ElastiCube Manager through the Sisense Stripe connector:

Available Tables

NameDescription
AccountsCreate, update, delete, and query the Accounts you manage in Stripe.
BankAccountsCreate, update, delete, and query the available Bank Accounts in Stripe.
BankAccountTokensInsert and query the available Bank Account Tokens in Stripe.
CardsCreate, update, and query the available Cards in Stripe.
CardTokensCreate and query the available Card Tokens in Stripe.
ChargesCreate, update, and query the available Charges in Stripe.
CustomersCreate, update, delete, and query the available Customers in Stripe.
DisputesUpdate and query the available Disputes in Stripe.
RefundsQuery the available refunds in Stripe.
TransferReversalsQuery the available categories in Stripe.
TransfersQuery the available transfers in Stripe.

Avialable Views

NameDescription
AvailableBalanceQuery the Available Balance in Stripe.
BalanceHistoryQuery Balance History in Stripe.
CountrySpecsQuery the available Country Specs in Stripe.
EventsQuery the available events in Stripe.
OrdersQuery the available orders in Stripe.
PendingBalanceQuery the available balance in Stripe.
ProductsQuery the available products in Stripe.
SkusQuery the available SKUs in Stripe.

Limitations

  1. Not all fields can be filtered.
  2. When a field cannot be filtered, you can not perform an accumulative build on that field.