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.
Stripe supports both the OAuth authentication standard, and authenticating with an 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.
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.
There are two authentication methods available for connecting to Stripe:
Using API keys
Using OAuth
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.
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.
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.
The provider surfaces tables from two PayPal APIs. The APIs use different authentication methods.
To choose the API you want to work with, set the Schema property to REST or SOAP. By default, the SOAP schema will be used.
The REST API uses the OAuth standard. To authenticate to the REST API, you will need to set the AuthScheme to OAuth, the OAuthClientId, and OAuthClientSecret properties.
The SOAP API requires Signature API credentials. To authenticate to the SOAP API, you will need to set the AuthScheme to Basic, set the Username, Password, and Signature properties. You generate these API credentials when you enable the SOAP API.
For testing purposes, set UseSandbox to true and use Sandbox credentials.
You can use the SOAP API to retrieve all transactions for the current account. The SOAP API uses the Signature API-credentials type, which has three credential values:
API Username
API Password
API Signature
To generate the API credentials:
Log in to your PayPal business account and select Profile > My Selling Tools.
In the Selling Online section, click Update for the API Access item.
To generate the API signature, click Request API Credentials on the API Access page.
Select Request API Signature and click Agree and Submit to generate the API signature.
After setting the following connection properties, you are ready to connect:
User: Set this to the API Username.
Password: Set this to the API Password.
Signature: Set this to the Signature.
UseSandbox: Set this to true if you are using sandbox credentials.
To register an app and obtain the OAuth client credentials, the Client Id, and Client Secret:
Log in to your PayPal developer account and My Apps & Credentials (under Dashboard).
Scroll to the REST API apps section and click Create App.
Enter the App Name.
From the drop down list, select the sandbox account that will be used to get data from.
PayPal generates a set of sandbox and live OAuth keys for the application. The sandbox credentials are shown after creating the app. For the live credentials, select the Live option.
The sandbox credentials will be used to get data only for the sandbox account selected when creating the App, while the Live credentials will be used to get data only for the developer account used to create this app.
After setting the following connection properties, you are ready to connect:
InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken connection property.
OAuthClientId: Set this to the Client Id in your app settings.
OAuthClientSecret: Set this to the Client Secret in your app settings.
UseSandbox: Set this to true if you are using sandbox credentials.
When you connect, the provider completes the OAuth process.
Exchanges the OAuthClientId and OAuthClientSecret for the OAuthAccessToken.
Refreshes the access token when it expires.
Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
You can obtain the necessary connection values by logging into your Merchant account and clicking Account -> Settings. The LoginID and TransactionKey are then displayed in the Security Settings section.
LoginID: The API login Id associated with your payment gateway account. This property is used to authenticate that you are authorized to submit website transactions. Note that this value is not the same as the login Id that you use to log in to the Merchant Interface.
TransactionKey: The transaction key associated with your payment gateway account. This property is used to authenticate that you are authorized to submit website transactions.
UseSandbox: The Authorize.Net API to be used to process transactions. If you are using a production account, this property can be left blank. If you are using a developer test account, set this to 'TRUE'.
Below is an example connection string for Authorize.Net:
LoginID=myLoginID;TransactionKey=myTransactionKey
Connecting to Square
Set the LocationId property to specify a default business location. Or, set the LocationId in the search criteria of your query.
To retrieve the Id, query the Locations table after you authenticate.
You can use a personal access token to authenticate to Square or use the OAuth standard. Use a personal token to access your own data or to test through the sandbox. Use OAuth to allow other users to access their own data.
Set the OAuthAccessToken connection property to your personal token, which can be obtained by following the steps below:
Navigate to the Developer Dashboard and Create an OAuth App as explained below.
Once the app is created, the token is listed on the Credentials tab.
Version 2 of the Connect API allows you to test in a sandbox environment. Transactions created in the sandbox are not sent through to card networks, and cards are never charged.
To connect to the sandbox, set OAuthAccessToken to the sandbox access token, which is available alongside your standard personal access token:
Navigate to the Developer Dashboard and Create an OAuth App as explained below.
Once the app is created, the sandbox token is listed on the Credentials tab.
In addition to OAuthAccessToken, set Schema to "V2", UseSandbox to "True".
OAuth requires the authenticating user to interact with Square using the browser. See Connecting to Square below. You can connect without setting any connection properties for your user credentials. After setting InitiateOAuth to GETANDREFRESH, you are ready to connect. When you connect the provider opens the Square OAuth endpoint in your default browser. Log in and grant permissions to the provider. The provider then completes the OAuth process.
Extracts the access token from the CallbackURL and authenticates requests.
Refreshes the access token when it expires.
Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Note: The provider is already registered with Square as an OAuth application and will automatically use its embedded OAuthClientId and OAuthClientSecret to connect. If you want to use your own custom OAuth app, see Create an OAuth App to obtain these connection properties. In this OAuth flow, you can authenticate without setting any connection properties for your user credentials. Click Connect and the provider opens the Square OAuth endpoint. Log in and grant permissions to the provider. The provider then completes the OAuth process.
You can use a personal access token to authenticate to Square or use the OAuth standard. Use a personal token to access your own data or to test through the sandbox. Use OAuth to enable other users to access their own data.
Set the OAuthAccessToken connection property to your personal token, which can be obtained by following the steps below:
Navigate to the Developer Dashboard and see Create an OAuth App below.
Once the app is created, the token is listed on the Credentials tab.
Version 2 of the Connect API allows you to test in a sandbox environment. Transactions created in the sandbox are not sent through to card networks, and cards are never charged.
To connect to the sandbox, set OAuthAccessToken to the sandbox access token, which is available alongside your standard personal access token:
Navigate to the Developer Dashboard and see Create an OAuth App below.
Once the app is created, the sandbox token is listed on the Credentials tab.
OAuth requires the authenticating user to interact with Square using the browser. The provider facilitates this in various ways as described below.
You can connect without setting any connection properties for your user credentials. After setting InitiateOAuth to GETANDREFRESH, you are ready to connect. You can use the GETANDREFRESH configuration 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.
Obtains a new access token when the old one expires.
Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Note: The provider is already registered with Square as an OAuth application and will automatically use its embedded OAuthClientId and OAuthClientSecret to connect. If you want to use your own custom OAuth app, see Create an OAuth App below to obtain these connection properties.
You can follow the procedure below to register a custom OAuth app and obtain the OAuth client credentials, the Application Id and Application Secret. You will need to sign up for a Square account before starting this procedure.
Navigate to the Developer Dashboard and create an app.
Enter a name to be displayed to users when they log in to grant permissions to your app.
Click Create App. Set the Redirect URL on the OAuth tab to http://localhost:33333 or a different port number of your choice. If you are making a desktop application, set the Redirect URL, on the OAuth tab, to http://localhost:33333 or a different port number of your choice.
If you are making a Web application, set the Redirect URL, on the OAuth tab, to a page on your Web app you would like the user to be returned to after they have authorized your application. Set CallbackURL to be equal to the value of the Redirect URL.
Set OAuthClientId to be equal with the Application Id on the Credentials page and set OAuthClientSecret to be equal to the Application Secret on the OAuth tab.