How to Get Your Stripe API Key

Complete guide on how to get your Stripe API key and OAuth credentials. Learn how to create a Stripe App, find your Client ID and Client Secret, configure redirect URIs, and connect Stripe to accounting integrations using Apideck.

Kateryna PoryvayKateryna Poryvay

Kateryna Poryvay

5 min read
How to Get Your Stripe API Key

Stripe handles payments for millions of businesses, from startups to enterprises. If you're building an integration that syncs financial data from Stripe, you'll need OAuth credentials rather than a standard API key. This guide walks through creating a Stripe App and retrieving the credentials required to connect Stripe to other platforms.

For a unified approach to accounting integrations, check out the Apideck Stripe connector, which lets you pull Stripe data alongside 30+ other accounting platforms through a single API.

What is Stripe?

Stripe is a payment processing platform that enables businesses to accept online payments and manage recurring billing. Beyond payment processing, Stripe exposes financial data through its API, including transactions and customer records. For accounting integrations, this data is typically accessed via Stripe Apps using OAuth rather than raw API keys.

Prerequisites

Before you start, make sure you have:

Creating a Stripe App

Apideck's Stripe connector uses the Stripe Apps platform for OAuth authentication. For the complete walkthrough, see Apideck's OAuth Credentials Guide. Here's a summary of the key steps:

  1. Install the Stripe CLI if you haven't already.
  2. Run stripe login to authenticate with your Stripe account.
  3. Verify your CLI version is 1.12.4 or newer with stripe version.
  4. Install the Stripe Apps plugin: stripe plugin install apps
  5. Verify the apps plugin version (should be 1.5.12 or later): stripe apps -v
  6. Create a new app: stripe apps create apideck-integration
  7. Follow the prompts for your app ID and display name.
  8. Navigate to your app directory: cd apideck-integration
  9. Upload your app: stripe apps upload

Once uploaded, you can access your app's OAuth credentials in the Stripe Dashboard under Developers > Created apps.

Getting Your Client ID and Client Secret

After uploading your Stripe App:

  1. In the Stripe Dashboard, go to Developers > Created apps.
  2. Click your app to open its details page.
  3. Open the External test/live tab.
  4. Your Client ID is displayed here (starts with ca_).
  5. Generate a Client Secret if you haven't already. Store this securely as it won't be shown again.

Setting Up the Redirect URI

OAuth requires a redirect URI where users return after authorizing the connection. For Stripe Apps, you configure this in your app manifest file (stripe-app.json):

{
  "allowed_redirect_uris": [
    "https://unify.apideck.com/vault/callback"
  ]
}

After updating your manifest, run stripe apps upload to apply the changes. Without the correct redirect URI, the OAuth flow will fail with an invalid redirect error.

Finding Your Channel Link ID

Apideck's Stripe connector requires a Channel Link ID, which identifies your app's OAuth install link.

  1. In the Stripe Dashboard, go to Developers > Created apps.
  2. Click your app to open its details page.
  3. Open the External test/live tab.
  4. Locate the OAuth install link in the Test OAuth section.
  5. The Channel Link ID is part of this URL, formatted as chnlink_xxxxx.

Copy this value for use in the Apideck connector configuration.

About Stripe Account IDs

When users connect their Stripe accounts through your integration, they may need to provide their Stripe Account ID. This is different from the OAuth credentials you just created. The Account ID:

  • Starts with acct_
  • Is found in the Stripe Dashboard under Settings > Account details
  • Identifies the specific Stripe account being connected

This ID is used by your integration to access bank account information and other account-specific data.

Common Mistakes

Wrong redirect URI: The most frequent OAuth error. Double-check that the redirect URI in your Stripe App matches exactly what your integration expects. Trailing slashes matter.

Mixing test and live credentials: Stripe maintains separate credentials for test mode and live mode. If your integration isn't seeing real data, verify you're using live credentials, not test ones.

Missing scopes: If your integration can't access certain data, check whether you've enabled the required scopes. For accounting integrations, the stripe_apps scope provides full access to account data.

Client Secret exposure: Never commit your Client Secret to version control or expose it in client-side code. Treat it like a password.

Rate Limits

Stripe's API uses rate limiting to ensure stability. The default rate limit is 100 operations per second in live mode and 25 operations per second in sandbox mode. Some endpoints have stricter limits. If you hit rate limits, Stripe returns a 429 Too Many Requests response. The Stripe-Rate-Limited-Reason header indicates which limit was exceeded.

For high-volume integrations, consider implementing exponential backoff and caching frequently accessed data.

Connecting Stripe via Apideck

Apideck's unified Accounting API lets you connect to Stripe alongside platforms like QuickBooks and Xero through a single integration. Once you have your Stripe App credentials, configuring the connector takes a few minutes.

Admin Configuration

  1. Log into your Apideck account and navigate to the Configuration page.
  2. Under Unified APIs, select Accounting.
  3. Find the Stripe connector and click to expand its settings.

How to Get Your Stripe API Key 1

  1. Enter your Client ID and Client Secret from your Stripe App.
  2. Scroll down to the Scopes section and enable stripe_apps for full access to account data.
  3. In the OAuth Configuration section, enter your Channel Link ID (format: chnlink_xxxxx).

How to Get Your Stripe API Key 2 7. Click Save settings.

User Connection Flow

Once admin configuration is complete, your users can connect their Stripe accounts through Apideck Vault:

  1. When a user initiates the connection, they'll see the Stripe authorization modal.
  2. The user enters their Stripe Account ID (found in their Stripe Dashboard under Settings > Account details).
  3. They click Authorize to complete the OAuth flow.

How to Get Your Stripe API Key 3

After authorization, you can pull financial data from Stripe through Apideck's unified Accounting API.

Ready to connect to Stripe and 30+ other accounting platforms through a single API? Get started for free.

Ready to get started?

Scale your integration strategy and deliver the integrations your customers need in record time.

Ready to get started?
Talk to an expert

Trusted by fast-moving product & engineering teams

JobNimbus
Blue Zinc
Exact
Drata
Octa
Apideck Blog

Insights, guides, and updates from Apideck

Discover company news, API insights, and expert blog posts. Explore practical integration guides and tech articles to make the most of Apideck's platform.