---
title: "How to Get Your Stripe API Key"
description: "Learn how to find and create your Stripe API keys step by step. Understand test vs live keys, security best practices, and how to integrate Stripe data into your application."
author: "Kateryna Poryvay"
published: "2026-04-13T14:00+01:00"
updated: "2026-04-14T12:09:44.186Z"
url: "https://www.apideck.com/blog/how-to-get-your-stripe-api-key"
tags: ["Accounting", "Guides & Tutorials"]
---

# How to Get Your Stripe API Key

Stripe provides API keys that let you integrate payment processing, billing, and financial data into your applications. This guide walks through finding and creating API keys in the Stripe Dashboard.

For a unified approach to accounting integrations, check out the [Apideck Stripe connector](https://www.apideck.com/integrations/stripe), 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. Through its API, you can access financial data including customers, invoices, payments, subscriptions, and transaction history.

## Prerequisites

Before you start, make sure you have:

- A [Stripe account](https://dashboard.stripe.com/register)
- Admin or developer access to the Stripe Dashboard

## Finding Your API Keys

Stripe provides two types of API keys: publishable keys (for client-side code) and secret keys (for server-side code). Each type has both test and live versions.

1. Log into the [Stripe Dashboard](https://dashboard.stripe.com/).
2. Click **Developers** in the left sidebar.
3. Select **API keys** from the menu.

Your publishable key (`pk_live_` or `pk_test_`) and secret key (`sk_live_` or `sk_test_`) are displayed here. In test mode, you can reveal the secret key as many times as needed. In live mode, you can only reveal a secret key once, so copy and store it immediately.

## Creating a Restricted API Key

For better security, you can create restricted keys that limit access to specific resources. This is recommended when integrating with third-party services.

1. In the API keys page, click **Create restricted key**.
2. Give the key a descriptive name.
3. Set permissions for each resource type. For read-only integrations, select **Read** for the resources you need access to.
4. Click **Create key**.

Common permissions for accounting integrations include read access to: Customers, Charges, PaymentIntents, Invoices, Subscriptions, and Products.

## Test Mode vs Live Mode

Stripe maintains separate environments for testing and production:

- **Test mode** uses keys starting with `pk_test_` and `sk_test_`. No real money is processed.
- **Live mode** uses keys starting with `pk_live_` and `sk_live_`. Real transactions occur.

Toggle between modes using the **Test mode** switch in the Dashboard. Make sure you're using the correct keys for your environment.

## Common Mistakes

**Exposing your secret key**: Never include your secret key in client-side code, commit it to version control, or share it publicly. Treat it like a password.

**Using test keys in production**: If your integration isn't processing real payments, verify you're using live mode keys, not test keys.

**Overly permissive keys**: Use restricted keys with minimal permissions rather than your main secret key. This limits potential damage if a key is compromised.

**Forgetting to rotate keys**: If you suspect a key has been exposed, roll it immediately from the API keys page.

## Rate Limits

Stripe's API enforces rate limits to ensure platform stability. The default limit for most endpoints is 25 requests per second, though Stripe may increase this for accounts with higher usage. Some endpoints have stricter limits (the Search API and Files API are limited to 20 operations per second). Test mode has lower limits than live mode. If you exceed these limits, Stripe returns a `429 Too Many Requests` response.

For high-volume integrations, implement exponential backoff and cache frequently accessed data.

## Connecting Stripe via Apideck

Apideck's [unified Accounting API](https://www.apideck.com/accounting-api) lets you connect to [Stripe](https://www.apideck.com/integrations/stripe) alongside platforms like [QuickBooks](https://www.apideck.com/blog/how-to-get-your-quickbooks-api-key) and [Sage](https://www.apideck.com/integrations/sage-intacct) through a single integration.

Note that Apideck's Stripe connector uses OAuth rather than standard API keys. You'll need to create a Stripe App first to get your Client ID, Client Secret, and Channel Link ID. See our [How to Create a Stripe App](https://www.apideck.com/blog/how-to-create-a-stripe-app) guide for the full walkthrough.

### Configuring the Connector

With your Stripe App credentials ready, open the Apideck dashboard and navigate to **Configuration > Accounting > Stripe**.

![How to Get Your Stripe API Key 1](//images.ctfassets.net/d6o5ai4eeewt/5ML5OXJKhKrQrHeYYUSnGl/8f36e3b1f4838e68b7279753bdca119a/964_1x_shots_so.png)

Enter your Client ID and Client Secret, then scroll down to configure scopes and add your Channel Link ID.

![How to Get Your Stripe API Key 2](//images.ctfassets.net/d6o5ai4eeewt/YtnoKh7urpjwDUAcxIJtn/68f2aaa56ef6fde3aebe3bb803592413/358_1x_shots_so.png)

### What Your Users See

When your users connect their Stripe account through Vault, they'll be prompted for their Stripe Account ID (found under Settings > Account details in Stripe, starts with `acct_`).

![How to Get Your Stripe API Key 3](//images.ctfassets.net/d6o5ai4eeewt/50HD22csaVTGmjx1PtHFMm/91dbcf21079f16892b859fdfd2f3cc38/853_1x_shots_so.png)

After authorization, Stripe data flows through Apideck's unified API alongside your other accounting integrations.

Ready to connect to Stripe and 30+ other accounting platforms through a single API? [Get started for free](https://www.apideck.com/signup).