How to connect your Stripe account with Avistra for paid event and membership registration

If your site takes money, a paid event or membership dues, it takes it through Stripe, on your own Stripe account. The money goes straight to you, the card number never touches your site, and we are not in the middle of it. Connecting the two takes about ten minutes, once, and this note walks through it. If you have not opened the edit tool before, How to make edits on an Avistra website shows the sign-in.

What you need

  • A Stripe account. Stripe handles card payments for a large share of the web, and an account is free to open at stripe.com. You are asked for your business details and a bank account for payouts. Stripe keeps a fee from each payment, 2.9 percent plus 30 cents at the time of writing, and pays the rest to your bank on a schedule you choose.
  • Your site's edit tool, signed in with your passkey, as a full admin. Connecting Stripe hands over where the money goes, so only a full admin can do it, and only after the passkey step. It lives in the Dashboard, under Payments, then Settings.

Nothing is installed, and nothing is paid to us for any of it. It is your Stripe account and your money.

Step one: a key from Stripe

Your site needs a way to tell Stripe "start a payment for this". That is a key: a long string of letters and numbers you make once in Stripe and paste once into your site. Stripe lets you make a restricted key that can do only the few things your site needs and nothing else, which is the kind to make.

Getting a restricted key from Stripe: on the Developers page under API keys, Create restricted key opens a form; the key is named, the permissions the site needs are set to Write and everything else left at None, and Create key makes it.

  1. Sign in at dashboard.stripe.com. New accounts open in a sandbox, a practice version where no real money moves. That is the right place to start. There is a switch for it at the top of the page.
  2. Open Developers, then API keys. On a new account the Developers link is at the bottom left.
  3. Choose Create restricted key. If Stripe asks how you will use it, pick "Powering an integration you built", then "Choose your own" rather than a template.
  4. Give it a name you will recognize later, such as "My website".
  5. Set the permissions. The search box above the list finds each one quickly. Leave everything else at None.

For paid events, these three:

  • Checkout Sessions: Write
  • Products: Write
  • Refunds: Write, so a refund can be given from your site

If your site also takes membership dues, add four more. A membership that renews is a subscription, and a subscription is not a checkout:

  • Subscriptions: Write
  • PaymentIntents: Write
  • Customers: Write
  • Coupons: Write, so a joining code works on a membership that renews
  1. Choose Create key. Stripe shows it once. Copy it. It begins with rk_test_ in the sandbox, or rk_live_ once you are live.

That key can take a payment for your own site and give one back, and nothing more. It cannot pay out, cannot send money anywhere else, and cannot change anything about your account.

Do not skip any of the permissions your site needs. When you save the key, your site checks it with Stripe by asking one question about checkouts, which a key with only the first two permissions answers happily. So a key that is too narrow saves without complaint, and the trouble only shows up later: a refund, a renewal or a cancellation is refused. Grant them all now and you will never meet it.

Step two: paste it into your site

Connecting Stripe to an Avistra website: Dashboard in the bar, then Payments on the left, then Settings; Connect Stripe opens the key panel, the key is pasted and saved, and the panel then shows only the last four characters and that it is in test mode.

  1. On your site, signed in to the edit tool, choose Dashboard, then Payments on the left, then Settings, then Connect Stripe.
  2. Paste the key into the box and choose Save the key. The site checks it with Stripe before keeping it, so a key copied badly is refused on the spot.
  3. Settings then reads "Connected, test mode", with the last four characters of the key. The key itself is never shown again, to you or to anybody, and it is stored scrambled on your own site.

There is a second box for a webhook signing secret. It is optional, and it matters more once you have members. Without it, a payment is confirmed when the person comes back to your site from Stripe's page, and any unfinished payments are checked again whenever you open a registration list. With it, Stripe tells your site the moment a payment lands, even if the person closed the tab, and, for dues, whenever a renewal goes through or a card fails a year from now, which is the only way the site hears that somebody has stopped paying. The panel says exactly where in Stripe to make one, which events to choose, and what to paste.

Step three: a paid event

A paid event: on the event's Tickets tab a ticket gets a price and a member price, and Pay online by card and Pay in person are both ticked. On the page, a visitor chooses how to pay; Pay online goes to Stripe's checkout page, and when the payment is done they come back to the site and their registration reads paid.

  1. Choose Dashboard in the bar, then Events on the left, and start a new event or open one. How to add an event on an Avistra website covers the rest of that form.
  2. On the Tickets tab, give a ticket its price, and a Member price if members pay less.
  3. Tick how people may pay. Pay online by card sends them to Stripe's page. Pay in person puts them on the list and tells them how to pay when they arrive, in words you write, such as "Cash or card at the door". Tick either, or both; with both, the page asks each person which they would like.
  4. Publish. The price shows on the event's page, and the registration form takes it from there.

When somebody pays online, their registration shows in the event's Registrations list as paid, with the amount. When somebody chooses to pay in person, it shows what they owe, with Mark paid for the day. If you add somebody yourself, from a phone call, the same choices are there. The list shows what has been collected and what is still owed.

Refunds

A refund starts from what was paid for. Open the registration in Registrations, or find the payment in the Dashboard under Payments, and choose Refund: all of it or part, and the reason. The money goes back to their card in 5 to 10 days, and they are emailed. If you look after events but not money, you can Ask for a refund instead, and whoever looks after payments decides it under Payments, then Refunds.

Payments is also where every payment on the site is listed, card and check alike, each with its numbered receipt.

Step four: membership dues

Dues work the same way underneath, but they are set once on the level rather than on each thing sold. Give a level a price and say how often: a year, a month, or free, or arranged for one you settle outside the site.

Making a level: a name, a price and how often it is paid, where it sits in the level order, whether it is for one person or an organization, and a list of what it includes for the join page.

Then, in Membership, then Renewals, under How people may pay, tick which of the three you want to offer. The amount always comes from the level; this only decides what somebody may choose when they join or renew:

  • One payment, good for a year. Nothing renews on its own. They get a reminder before it runs out. This one needs the least of Stripe, and is the gentlest thing to offer.
  • A subscription that renews every year. Charged automatically until they stop it.
  • A subscription paid monthly. A twelfth of the level's price, unless the level sets its own monthly amount.

The last two are the ones that need Subscriptions, PaymentIntents, Customers and Coupons on your key.

If new members are approved first, the card is held and not charged while you decide. Approving somebody is what takes the money. Declining never does. How people join and pay on an Avistra website covers those settings in full.

Once somebody is paying, their record in People shows their membership and until when, and the People list shows you at a glance who is Active and who is Inactive.

Trying it out first

While your Stripe account is in the sandbox, use a test card on Stripe's page: 4242 4242 4242 4242, any future expiration date, any three-digit code, any ZIP. The payment goes through, nothing is charged, and the registration or the membership comes back marked paid. 4000 0000 0000 0002 is declined, if you want to see what that looks like, and 4000 0025 0000 3155 asks for the extra bank confirmation some real cards do.

Run one paid registration, one refund and, if you have members, one join, before you go live. Ten minutes now is worth a puzzled email later.

Going live

Activate your Stripe account if you have not already, switch the sandbox off, make a second restricted key in exactly the same way with the same permissions, and paste it in with Change the key under Payments, then Settings. Settings says "Connected, live" instead of "test mode". Events and levels made before the switch keep working; only the key changes.

If something goes wrong

  • Stripe refuses the key when you save it. It was probably copied with a space on the end, or it is the wrong kind. Make a new restricted key and try again.
  • Somebody says they paid but shows as unpaid. Open the event's Registrations list. Unfinished payments are re-checked with Stripe every time it opens, and one that went through is marked paid right then.
  • A refund, a renewal or a cancellation is refused. That is the narrow key described above. Make a new one with every permission your site needs and paste it in with Change the key; nothing else has to be redone.
  • You would rather not take cards at all. Leave Pay online by card unticked and set your levels to free, or arranged. Everything else works with no Stripe account: people register, people join, and you use Record a payment when the money arrives.
  • Anything else, send a support request from the bar and we will look at it with you. How to submit a support request on an Avistra website shows how.