Billed
Latest Articles

How do I get my Stripe API Key

Step-by-step guide to finding your Stripe API key and connecting it to Billed so you can accept credit card payments on your invoices.

B
Billed Team
4 min read
How do I get my Stripe API Key

Connecting Stripe to Billed lets your clients pay invoices with a credit or debit card directly from the invoice page. To set up the integration you need your Stripe Secret API Key. This guide shows you exactly where to find it, how to connect it, and how to keep it secure.

What is a Stripe API key?

Stripe uses API keys to authenticate requests between your account and third-party applications like Billed. There are two types:

  • Publishable key (starts with pk_live_) — Used on the client side to identify your account. This key is safe to expose in front-end code.
  • Secret key (starts with sk_live_) — Used on the server side to process payments. This key must be kept private. Billed needs the secret key to charge your clients on your behalf.

Step-by-step instructions

  1. Log in to your Stripe account at dashboard.stripe.com.
  2. In the left sidebar, click Developers.
  3. Click API Keys.
  4. Next to Secret key, click Reveal live key token.
  5. Copy the key — it starts with sk_live_.
  6. In Billed, go to Settings > Payment Gateways > Stripe and paste the key.
  7. Click Save to activate the connection.

Stripe API keys dashboard

Once connected, every invoice you send will include a Pay Now button that lets clients pay with Visa, Mastercard, American Express, and other cards Stripe supports. Payments are deposited directly into your linked bank account on Stripe's standard payout schedule.

Test mode vs. live mode

Stripe provides two sets of API keys: test and live. Test keys (prefixed sk_test_) let you simulate payments without moving real money. This is useful for verifying the connection before you start billing real clients.

To switch between modes, use the Test mode toggle at the top of your Stripe Dashboard. When testing is complete, switch back to live mode and make sure you have entered the live secret key in Billed.

Keeping your key secure

Your secret key grants full access to your Stripe account's payment processing. Follow these precautions:

  • Never share it publicly. Do not post it in forums, emails, or chat messages.
  • Do not commit it to a code repository. If you use Stripe in custom integrations, store the key in environment variables.
  • Restrict access. Only account owners and administrators should be able to view API keys in Stripe.
  • Roll the key if compromised. If you suspect your key has been exposed, click Roll key in the Stripe Dashboard to generate a new one. Update the new key in Billed immediately — the old key stops working after a short grace period.

Troubleshooting common issues

  • "Invalid API Key" error in Billed — Make sure you copied the Secret key, not the Publishable key. The secret key starts with sk_live_.
  • Payments not appearing — Confirm you are using your live key, not a test key. Test transactions only show in Stripe's test mode and do not process real money.
  • Key not visible in Stripe — You may need account owner permissions to view or reveal API keys. Ask your account administrator if the option is greyed out.
  • Payments failing after key roll — If you recently rolled your key, make sure you updated the new key in Billed under Settings > Payment Gateways > Stripe.

Why accept card payments on invoices?

Offering card payments removes friction for your clients. Instead of writing a check or setting up a bank transfer, they click a button and pay in seconds. Businesses that accept online payments on invoices typically get paid faster — often within one to three days instead of the standard 30-day cycle.

Billed also supports PayPal as a payment gateway. You can enable both Stripe and PayPal to give clients the flexibility to choose their preferred payment method.

Put Your Billing On Autopilot With Billed

Start creating professional invoices, tracking expenses, and managing your business today. No credit card required.

No credit card required. Cancel anytime.