Stripe API

Set up API access for payment processing with Stripe.

⏱ 5 minutes payments fintech dashboard.stripe.com
getapi stripe

Prerequisites

  • A Stripe account

Credentials

Variable Description Sensitive
STRIPE_SECRET_KEY Secret key for server-side API calls Secret
STRIPE_PUBLISHABLE_KEY Publishable key for client-side use Public

Setup Steps

  1. 1 Info

    We'll get your Stripe API keys. Stripe gives you both test and live keys — we'll start with test keys so you can develop safely.

  2. 2 Choice

    Which keys do you need?

    • Test keys (for development)
      Configures: stripe_mode
    • Live keys (for production)
      Configures: stripe_mode
  3. 3 Open URL

    Opening the Stripe API keys page. Sign in if prompted.

    https://dashboard.stripe.com/apikeys
  4. 4 Info

    stripe_mode

  5. 5 Input

    Copy your Publishable key and paste it here:

    → STRIPE_PUBLISHABLE_KEY
    Starts with pk_. At least 20 characters
  6. 6 Input

    Now click 'Reveal test key' (or 'Reveal live key') and paste your Secret key:

    → STRIPE_SECRET_KEY
    At least 20 characters
  7. 7 Validate

    Checking your API key works...

    Stripe API key verified.
    Couldn't verify the key. Make sure you copied the correct key.

Things to Know

  • Test and live keys are completely separate. Transactions made with test keys don't move real money.
  • The secret key should NEVER be exposed client-side. Use the publishable key in the browser.
  • Restricted keys are available if you want to limit what the key can access.
  • Stripe's test card number is 4242 4242 4242 4242 with any future expiry and any CVC.