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:
Log into Stripe.
Click Developers and then click API Keys.
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:
(Optional) If Connect has not already been enabled on the Stripe account, click "Connect" from the left menu --> Get Started --> Build an extension --> Continue
Log into your Stripe dashboard and click Settings -> Connect Settings.
Enter a name, description, and other information to be displayed to users when they log in to grant permissions to your app.
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:
Extracts the access token from the callback URL and authenticates requests.
Refreshes the access token when it expires.
Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Last updated