How to Get Your Stripe API secret key

The Stripe REST API keys include a secret key. Here’s how you generate these credentials:

  1. Log in to the Stripe Dashboard using the same credentials you use for your Stripe account.
  2. In the dashboard, enable test mode by toggling the “View test data” switch in the left-hand sidebar.
  3. Navigate to Developers > API keys.
  4. Copy your test API credentials:
    • Publishable key: Starts with pk_test_...
    • Secret key: Starts with sk_test_... (Click “Reveal live key token” to view it)
      Note: These test keys can only be used in test mode. You’ll need live keys for processing real transactions.
  5. To create a dedicated sandbox account:
  6. Stripe will mark you as the sandbox super administrator.
  7. You can switch between sandbox accounts anytime using the account picker.
  8. When going live:
    • Turn off test mode.
    • Use your live API keys.
    • Don’t use test card numbers in live mode.
  9. For more detailed information, refer to the Stripe Sandbox Documentation.
blank

$129.00

Billed annually

Buy Now