Connect your Stripe account to AveeCare with your API keys

Find your Stripe Publishable key and create a full secret or restricted key, paste both into Settings, Payment Integrations, and test the connection. Covers live versus test keys and the shortened key Stripe shows in its list.

6 stepsUpdated for AveeCare

If your agency already has a Stripe account, you can connect it to AveeCare with two API keys. Clients' cards are then saved and charged through your own Stripe account, and AveeCare can send Stripe invoices that clients pay online. This guide shows exactly where each key is in Stripe and the two mistakes that cause almost every failed connection: pasting the shortened key from Stripe's list, and mixing test keys with live ones.

Quick answer

In Stripe, open Developers, then API keys, with test mode off. Copy the Publishable key (starts with pk_live_). Click Create secret key (or Create restricted key) and copy the whole new key from the window Stripe opens; it starts with sk_live_ or rk_live_ and is about 100 characters long. In AveeCare, open Settings, Payment Integrations, click Connect Stripe, paste both keys, click Connect, then Test Connection.

Open Stripe settings

1. Open your live API keys in Stripe

  1. Sign in to Stripe and open Developers, then API keys.

    This link goes straight there: dashboard.stripe.com/apikeys. The page has two parts: Restricted keys at the top and Standard keys below it.
    Stripe Developers page on the API keys tab, showing the Restricted keys and Standard keys sections.
  2. Make sure you are looking at live keys, not a sandbox or test mode.

    If a dark bar at the top says you are testing in a sandbox, open the account menu at the top left and click Exit sandbox. If the page says Viewing test API keys, flip that switch off. Test keys start with pk_test_ and sk_test_ and never move real money.
    Stripe in a sandbox, with the account menu open and an arrow pointing to Exit sandbox.

2. Copy your Publishable key

  1. Under Standard keys, click the Publishable key to copy it.

    The Publishable key starts with pk_live_ and is always shown in full, so you can copy it any time. Paste it somewhere for a moment; you will need it in step 5.
    The Standard keys section in Stripe with the Publishable key token boxed. Most of the key is hidden in this picture.

3. Create and copy the full secret key

Stripe shows a full secret key only once, in the window that opens when you create it. After you close that window, the list only shows a shortened copy like sk_live_...9a99, and that shortened copy does not work anywhere.

  1. Click Create secret key, name it AveeCare, and copy the key before you close the window.

    The key you copy starts with sk_live_, is around 100 characters long, and has no spaces and no dots in it. If what you copied has "..." in the middle, the key's name, or other columns from the table, it is the shortened copy: create a new key and copy it from the window instead. Stripe explains its keys here: docs.stripe.com/keys.
    Stripe API keys page with an arrow pointing to the Create secret key button under Standard keys.
  2. Or create a restricted key if Stripe asks you to.

    Stripe may suggest a restricted key for apps like AveeCare. That works just as well. Click Create restricted key, set each of these to Write and leave everything else at None: Customers, PaymentMethods, SetupIntents, PaymentIntents, Invoices, Credit notes, Refunds. Copy the whole key from the window that opens. A restricted key starts with rk_live_ instead of sk_live_.

4. Open Stripe Integration in AveeCare

Open Billing

  1. From Billing: click Setup Payments, choose Stripe API, and click Next.

    Stripe API is the second choice, under AveeCare Payments. Its Setup guide link opens this page. Next takes you to the Stripe Integration card in Settings.
    The Set up payments window with Stripe API selected and an arrow pointing to the Next button.
  2. Or open Settings, then the Payment Integrations tab, and click Connect Stripe.

    The Stripe Integration card is near the top. If Stripe is already connected with a key that does not work, click Disconnect first to clear out the old key, then Connect Stripe.
    The Stripe Integration card in AveeCare Settings with an arrow pointing to the Connect Stripe button.

5. Paste both keys, connect, and test

Open Stripe settings

  1. Leave Test Mode off and paste the two keys.

    Paste the pk_live_ key into Publishable Key (blue) and the full sk_live_ or rk_live_ key into Restricted or Secret Key (red). Then click Connect (green). AveeCare checks both keys with Stripe before it saves them and tells you in plain words if one is the shortened copy, in the wrong box, or from test mode.
    The Stripe connect form in AveeCare with arrows to the Publishable Key box, the Restricted or Secret Key box, and the Connect button.
  2. Click Test Connection.

    You should see Stripe connection is working. If you made an earlier key you are not using (for example one called AveeCare Stripe Integration), you can retire it in Stripe from the ... menu next to it with Expire key.

6. Save a card and bill a client

  1. Save a client's card from their Billing tab.

    Open the client from Patients, go to their Billing tab and click Add Payment Method. Type the card into the secure form. The card details go straight to Stripe and are never stored in AveeCare.
  2. Create an invoice and choose a Stripe billing method.

    Go to Billing, open the Invoices tab and click Create Invoice. Pick the client, then tick their visits under Start from visits or type in line items. Under Billing method, choose Stripe invoice (emailed) to have Stripe email the client a link to pay online (the client needs an email address on file), or Charge stored card to charge the saved card right away. Then click Send Now. Paid Stripe invoices show as paid in AveeCare on their own.

Common pitfalls

  • The shortened key from Stripe's list. sk_live_...9a99 with the key's name next to it is not the key. Stripe shows the full key once, when you create it. Create a new one and copy it from that window.
  • Test keys or a sandbox. Keys from a sandbox or test mode start with pk_test_, sk_test_ or rk_test_ and never charge real cards. Exit the sandbox and copy the live keys, and leave Test Mode off in AveeCare.
  • Keys in the wrong boxes. pk_ goes in Publishable Key; sk_ or rk_ goes in Restricted or Secret Key.
  • A restricted key without the right permissions. Set Customers, PaymentMethods, SetupIntents, PaymentIntents, Invoices, Credit notes and Refunds to Write, or charges and invoices fail.
  • Replacing a bad key without disconnecting. Click Disconnect on the Stripe Integration card first, then Connect Stripe with the new keys.

Frequently asked questions

Two: the Publishable key (starts with pk_live_) and either a secret key (starts with sk_live_) or a restricted key (starts with rk_live_). Both come from Developers, API keys in your Stripe account.
That is the shortened copy Stripe shows in its list after a key is created. Stripe shows the full key only once. Create a new secret key and copy the whole key from the window that opens; it is about 100 characters with no spaces or dots.
Yes. Create a restricted key with Customers, PaymentMethods, SetupIntents, PaymentIntents, Invoices, Credit notes and Refunds set to Write, and paste it into Restricted or Secret Key. It starts with rk_live_.
No, not for real payments. Test Mode is only for Stripe test keys (pk_test_ and sk_test_). Leave it off and use your live keys.
Stripe connection is working. If it fails, disconnect, create a fresh key in Stripe, and connect again with the full key.
No. Cards are typed into Stripe's secure form and go straight to Stripe. The card number is never stored in AveeCare.
Record that payment in AveeCare. The amount the Stripe payment link asks for goes down by the same amount, so nobody is charged twice.
Written by
Founding Partner, AveeCare

Builds AveeCare full-time. The AveeCare Help Center is written and maintained by the team that builds the product, so the steps in every article come from the same people who ship the features.