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
Go to https://dashboard.stripe.com and log in with your Stripe account credentials.
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.
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.
| Mode | Usage | Key Format | Notes |
|---|---|---|---|
| Test Mode | Development & testing | pk_test_..., sk_test_... | Use Stripe test cards only. |
| Live Mode | Real transactions | pk_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.
