How to Get Your Stripe API secret key

To connect your site or plugin to Stripe’s REST API, you need a secret key (along with a publishable key). Stripe provides both test and live API keys to separate your development and production environments.

🧭 Steps to Get Your Stripe API Keys

1. Log in to Stripe Dashboard

Go to https://dashboard.stripe.com and log in with your Stripe account credentials.

2. Enable Test Mode

On the left sidebar, toggle “View test data” to switch to test mode.
This allows you to access your test API keys and simulate transactions safely.

3. Go to API Keys

Navigate to:

Developers > API Keys

Here you’ll see two types of keys:

  • Publishable Key: Starts with pk_test_...
  • Secret Key: Starts with sk_test_...

Click the “Reveal live key token” button next to the secret key to view and copy it.

⚠️ Keep your secret key secure. It provides full access to your Stripe account’s API.

4. Use Test vs Live Keys

ModeUsageKey FormatNotes
Test ModeDevelopment & testingpk_test_..., sk_test_...Use Stripe test cards only.
Live ModeReal transactionspk_live_..., sk_live_...Only enable in production.

🧪 Create a Dedicated Sandbox Account

You can also create a sandbox team environment in Stripe:

  • Stripe will mark you as the sandbox super admin.
  • You can switch between sandbox environments using the account picker in the top left corner of the dashboard.
  • Use this feature for staging or development workflows separate from your production data.

🚀 When Going Live

  • Toggle off test mode.
  • Use your live API keys (pk_live_... and sk_live_...).
  • Do not use test card numbers or test webhooks in live mode.

📘 For more details, refer to the Stripe Sandbox Documentation.

If you’re integrating with AST PRO or another plugin, paste the appropriate keys into your plugin settings as required.

blank

$129.00

Billed annually

Buy Now