Stripe

Connecting to Stripe

You can optionally set the following to refine the data returned from Stripe.

  • AccountId: Set this to the Connected Account Id which you would like to get data for. To get the account Id, navigate to the stripe dashboard and click on connected accounts from the left hand menu. You can get the account id from the connected accounts list.

Authenticating to Stripe

Stripe supports both the OAuth authentication standard, and authenticating with an API Key.

Live API Key

Set the AuthScheme to APIKey. From the Stripe dashboard, navigate to Developers --> API keys --> Secret key --> Reveal live API Key and set LiveAPIKey to this value.

OAuth

InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken. .

AuthScheme - Set this to OAuth.

CData embeds an OAuth application into the provider so you can connect without setting any connection properties for your user credentials. When you connect, the provider opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then completes the OAuth process. For more information on the Embedded Credentials or information on creating a custom OAuth application.

Creating a Custom OAuth App

There are two authentication methods available for connecting to Stripe:

  • Using API keys

  • Using OAuth

Using API Keys

Use your personal API keys to test and to access your own data. To obtain the API keys, follow the steps below:

  1. Log into Stripe.

  2. Click Developers and then click API Keys.

  3. Set the OAuthAccessToken property to a test or live secret key in the API Keys section.

Using OAuth

Use OAuth to access your own data and to enable other users to access their own data.

OAuth requires the authenticating user to interact with Stripe using the browser. The provider facilitates this in various ways as described in the following sections.

Create an App

You can follow the procedure below to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret:

  1. (Optional) If Connect has not already been enabled on the Stripe account, click "Connect" from the left menu --> Get Started --> Build an extension --> Continue

  2. Log into your Stripe dashboard and click Settings -> Connect Settings.

  3. Enter a name, description, and other information to be displayed to users when they log in to grant permissions to your app.

  4. If you are making a desktop application, set the Redirect URL to https://oauth.cdata.com/oauth/ .

    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.

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

  • OAuthClientId: Set this to the client ID in the Settings -> Connect Settings section of your account.

  • OAuthClientSecret: Set this to a Secret key in the Developers -> API Keys section of your account.

  • CallbackURL: Set this to the Redirect URI in the Settings -> Connect Settings section of your account.

  • 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 provider opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then 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.

Last updated