Help Get paid

Connect Stripe

Connect Stripe so customers can pay by card. You switch Stripe on in aMember and paste in two keys from your Stripe account.

Beginner

Before you start: A Stripe account with your business details verified, and your aMember admin login.

The video shows the whole process in Stripe's test mode, including a test purchase. The written steps follow the same order.

Stripe lets customers pay by credit or debit card, without leaving for another website.

1. Switch on Stripe in aMember

  1. Log in to aMember (your-domain.com/members/admin).
  2. In the left menu, click Configuration → Add-ons.
  3. In the search box, type stripe.
  4. On the Stripe plugin, click Activate, then confirm.
aMember Add-ons: (2) the Add-ons menu, (3) the search box, (4) Activate on Stripe
aMember Add-ons: (2) the Add-ons menu, (3) the search box, (4) Activate on Stripe
  1. Now open the Stripe settings: Configuration → Setup/Configuration → Stripe. Keep this page open in one browser tab.
  2. Fill in Payment System Title (for example Stripe) and Payment System Description (for example Credit card payments).

2. Get your keys from Stripe

aMember needs two keys from Stripe: your publishable key (it starts with pk_live_) and a restricted key (it starts with rk_live_) that lets your store take payments and nothing more.

  1. In a second browser tab, log in to your Stripe Dashboard.
  2. Make sure you're in live mode (not test mode) for real payments.
  3. Open the API keys page: Developers → API keys. (In newer Stripe accounts: Workbench → Overview → API keys → Manage.)
  4. Under Standard keys, copy the Publishable key. You'll paste it into aMember in a moment.
  5. Under Restricted keys, click Create restricted key.
  6. Give it a name, for example membershops.
  7. Give Write permission to each of these: Charges, Customers, Disputes, PaymentIntents, PaymentMethods, SetupIntents and Checkout Sessions. Leave the rest as they are.
  8. Click Create key. Back on the API keys page, click Reveal next to your new key and copy it. It starts with rk_live_.

Put each key in its own field

The publishable key (pk_…) goes in Publishable Key; the restricted key (rk_…) goes in Restricted API Key. Never use the full Secret key (sk_…), and keep the restricted key private, like a password.

3. Paste the keys into aMember

  1. Go back to the aMember tab (the Stripe settings page).
  2. Paste the publishable key into Publishable Key.
  3. Paste the restricted key into Restricted API Key.
  4. Click Save. You'll see "Config values updated".

A webhook lets Stripe tell your store about events such as refunds. The right-hand side of aMember's Stripe page lists the Webhook Endpoint (it looks like https://your-domain.com/members/payment/stripe/ipn) and the events to send.

  1. In Stripe, go to Developers → Webhooks and click Add endpoint.
  2. Paste the Webhook Endpoint address from aMember.
  3. Select the events listed on aMember's Stripe page (they include charge.refunded, charge.succeeded and checkout.session.completed).
  4. Save.

For aMember's own instructions, see the aMember Stripe guide.

Testing with Stripe test mode (optional)

To try a payment without real money, as in the video, switch Stripe to test mode and repeat step 2. The keys start with pk_test_ and rk_test_. Pay with one of Stripe's test card numbers, listed in Stripe's documentation. When you're done, put the live keys back.

Check it worked

Make a test purchase: see Test your store as a customer. The payment should show in your Stripe Dashboard and in aMember, and the plan should be active.

If something goes wrong

  • "Invalid API key" or a similar error: the keys may be in the wrong fields. The pk_ key goes in Publishable Key, the rk_ key in Restricted API Key.
  • Payments fail with a permissions error: edit the restricted key in Stripe and check every resource in step 2 has Write permission.
  • Real payments don't work after testing: you probably still have the test keys in aMember. Paste the live ones.