Setting up Stripe

Available in:Pro

Stripe is the payment service HappenBoard Pro uses to sell tickets, and to take booking payments if you want. Buyers pay on Stripe’s secure page, so card details never reach your site.

You connect Stripe once, in HappenBoard → Settings → Stripe. You need two keys from your Stripe account, plus a webhook and its signing secret.

Selling tickets needs HappenBoard Pro. See what Pro adds.

Before you start

Add your test keys

Start in test mode: test keys never move real money.

  1. Go to HappenBoard → Settings → Stripe.
  2. Click Open Stripe dashboard and make sure Stripe is in test mode.
  3. Copy the publishable key (it starts with pk_test_) into Publishable key.
  4. Copy the secret key (it starts with sk_test_) into Secret key.
  5. Choose your Currency.
  6. Click Save changes.

The keys decide whether real money moves. Test keys run on Stripe’s test environment. Live keys (pk_live_ and sk_live_) take real payments. Once a secret key is saved, the tab says which kind it is, for example Mode: Test, and warns you when the publishable key comes from the other mode.

Once saved, the secret key is never shown again. The field shows its last four characters instead. Leave it empty on later saves to keep the stored key.

Choose the currency

Currency offers USD, EUR, GBP, CAD, AUD, JPY, CHF, SEK, NOK, DKK, NZD, SGD, HKD, BRL, MXN and INR. The default is USD. Stripe must accept the currency in your account’s country.

Pick it before you create tickets. A ticket keeps the currency it was created with:

  • The first ticket of an event takes the currency set here.
  • The next tickets of that event take the event’s currency, even if you change this setting in between.
  • A buyer pays for a cart in one currency. A cart that mixes two currencies is refused, with a message asking the buyer to book the tickets separately.

Creating ticket types explains the rest of the ticket settings.

Add the webhook

A webhook is a message Stripe sends to your site when something happens, such as a successful payment. Without it, a buyer can pay and get no ticket.

  1. In the Webhook endpoint card, click Copy. The address looks like https://example.com/wp-json/happenboard/v1/stripe/webhook.
  2. In your Stripe dashboard, open Developers → Webhooks and add a destination (an endpoint) with that address.
  3. Select these events: checkout.session.completed, checkout.session.expired and charge.refunded.
  4. If you take payments for booking types that need approval, also select payment_intent.amount_capturable_updated, payment_intent.succeeded and payment_intent.canceled.
  5. Copy the destination’s signing secret (it starts with whsec_) into Webhook signing secret.
  6. Click Save changes.

checkout.session.completed confirms the payment: your site then adds the buyer to the attendee list and sends the confirmation email. checkout.session.expired gives back the seats of an abandoned checkout straight away. charge.refunded records refunds, including those made in the Stripe dashboard. Extra event types do no harm: HappenBoard ignores them.

Your site checks every message against the signing secret. Without the right secret, it refuses them all: buyers are charged and nothing is recorded on your site.

Test the connection

Click Test Stripe connection. The button is available once a secret key is saved. It checks the key with Stripe and tells you whether Stripe accepted it, or what went wrong (wrong key, missing permission, or your server cannot reach Stripe). It also says whether the key is a test or a live key.

This test does not check the webhook. To test the whole chain, make a test purchase:

  1. Create a ticket type on a test event.
  2. Buy a ticket on the event page.
  3. On Stripe’s page, pay with the test card 4242 4242 4242 4242, any future expiry date and any security code.
  4. Check that the buyer appears in your attendee list and in the Orders screen.

Switch to real payments

Test and live mode have separate keys and separate webhooks in Stripe.

  1. In Stripe, switch to live mode and copy your live publishable key and secret key.
  2. Add the same webhook address in live mode, with the same events, and copy its new signing secret.
  3. In HappenBoard, paste the three live values.
  4. Click Save changes. The tab now shows Mode: Live.
  5. Buy one cheap ticket yourself, then refund the order to check both directions.

How seats are protected

When a buyer starts a paid checkout, their seats are held for about 30 minutes while they pay. To stop anyone from holding a whole show without paying, one visitor (one internet address) can start up to 10 paid checkouts and hold up to 60 seats per hour. Past that limit, they are asked to wait. A developer can change these limits with the happenboard_pro_checkout_limits filter (see the ticketing and payment hooks).

Take booking payments online

The Bookings card has one switch, Take booking payments online, off by default. Turn it on to charge priced booking types through Stripe when a visitor books: the full price, or a deposit. For booking types that need approval, the card is held when the visitor asks and charged only when you approve.

Booking prices are typed in the Currency of the general settings. Set the same currency in both places: when they differ, a warning appears under Currency on this tab. The full flow is in booking payments, deposits and pricing rules.

Sell through WooCommerce instead

To sell tickets through your WooCommerce shop instead of Stripe Checkout, use the WooCommerce ticketing card at the bottom of the tab. See selling tickets through WooCommerce.

If something goes wrong

  • Buyers pay but do not appear in your attendee list: the webhook is missing, its address is wrong, or the signing secret belongs to the other mode (test or live).
  • The ticket form says online checkout is not configured: the publishable key is not saved.
  • The ticket form appears but payment fails with an error: the secret key is missing or wrong. Use Test Stripe connection.

Next steps