Resources · Getting started

Setting up Stripe payments for Site Calendar Pro

A complete walkthrough — from creating a Stripe account to verifying your first ticket sale. Written for non-technical site owners.

Why use Stripe?

Stripe handles the entire payment flow on your behalf — collecting card details on a secure page, processing the charge, fraud-checking, and depositing money into your bank account. You never see or store card numbers yourself, which means you're not on the hook for PCI compliance. Site Calendar Pro talks to Stripe through their official API, so when a customer pays for a ticket, Stripe tells your site (via a webhook) and Site Calendar Pro creates the attendee record automatically.

If you'd rather use WooCommerce — for instance, if you already have a WooCommerce shop on the site — see Setting up WooCommerce ticketing instead. Stripe is faster to set up and cheaper to run for events-only sites; WooCommerce makes sense if you're already invested in its ecosystem.

Important — Test mode vs Live mode. Stripe gives you two completely separate environments accessed by the same dashboard. Test mode is a sandbox using fake cards, costing nothing. Live mode processes real money. Keys, webhooks, products and customers are not shared between them. We'll configure test mode first, verify everything works, then switch to live mode in a separate guide. This is the single most important rule in this article.

Step 1 — Create your Stripe account

If you don't already have a Stripe account, go to dashboard.stripe.com/register and sign up with your business email. You'll need to confirm your email address and set a password. Stripe will ask for your country, business type, and a few basic details — you can fill these in now or finish them later. Right now, just get past the initial sign-up.

Stripe gives you instant access to Test mode as soon as you sign up. You can configure everything in test mode without verifying your identity, accepting any payouts, or processing real money.

Stripe sandbox dashboard with the sandbox banner across the top confirming you're testing in a sandbox environment
The Stripe sandbox dashboard. The banner across the top confirms you're in test mode — no real money is moved here.

Keep an eye on the Test mode indicator throughout setup. While you're in the sandbox, everything you create — keys, products, webhooks, customers — stays in the sandbox. When you switch to Live mode, you're working with real money, separate keys, separate webhooks, separate everything.


Step 2 — Get your API keys

In the Stripe dashboard, click Developers in the top nav, then API keys. You'll see two values:

  • Publishable key — starts with pk_test_… (or pk_live_… in live mode). Safe to expose publicly; used by Stripe's checkout form to identify your account.
  • Secret key — starts with sk_test_… (or sk_live_…). Treat this like a password. Never paste it in any public place, never commit it to a public Git repository, and rotate it immediately if it leaks.
Stripe Developers API keys page showing publishable and secret keys with the full key values
Both keys live on the same page. Click "Reveal" next to the secret key to copy it. Never share your secret key publicly.

Copy both keys somewhere you can retrieve them in a moment — a sticky note or password manager is fine for the test keys. For live keys, use a proper password manager (1Password, Bitwarden, your browser's vault).


Step 3 — Paste your keys into Site Calendar

In your WordPress admin, go to Site Calendar → Settings → Tickets.

Site Calendar Pro Stripe configuration settings page showing Test mode toggle, Publishable key, Secret key, Webhook signing secret, and Webhook URL fields
The Tickets settings tab is where Stripe credentials live. Note the Webhook URL at the bottom — you'll need that in Step 4.

Fill in:

  • Mode: tick "Test mode (use sk_test_… keys)" for now
  • Publishable key: paste your pk_test_… value
  • Secret key: paste your sk_test_… value
  • Webhook signing secret: leave blank for now — we'll fill this in Step 5

Don't click Save yet — we still need to configure the webhook in the next step. But note the Webhook URL that Site Calendar Pro displays on this page. It'll look like:

https://yoursite.com/wp-json/pcal/v1/stripe-webhook

You'll need this URL in Step 4.


Step 4 — Configure the Stripe webhook

This is the most important step and the one that catches everyone out the first time. Stripe needs to tell your WordPress site when a payment completes, and it does this by sending an HTTP request to a special URL on your site — the webhook URL from Step 3.

In the Stripe dashboard, go to Developers → Webhooks (or Workbench → Webhooks in newer Stripe UI). Click + Add destination (some Stripe accounts label this + Add endpoint — same thing).

Stripe Webhooks landing page showing an empty state with the Add destination button highlighted
If the Webhooks list is empty, you'll see "Add destination" in the centre of the page.

Configure the destination as follows:

  • Events from: Your account
  • Payload style: Snapshot
  • API version: leave as the default Stripe pre-selects
  • Events to listen for: select the five events listed below

The five events Site Calendar Pro needs to receive:

  1. checkout.session.completed — fires when a customer completes payment. Triggers attendee creation and confirmation email.
  2. customer.subscription.updated — fires on renewal of subscription-based products. Updates expiry dates.
  3. customer.subscription.deleted — fires on subscription cancellation. Marks records inactive.
  4. invoice.payment_succeeded — fires on each successful renewal billing.
  5. invoice.payment_failed — fires when a renewal payment fails. Lets you flag the customer.
Stripe webhook event selection wizard with the five required events ticked: checkout.session.completed, customer.subscription.deleted, customer.subscription.updated, invoice.payment_failed, and invoice.payment_succeeded
Use the search box to filter events quickly. The "Selected events" counter at the top should read 5 when you're done.

Click Continue through the wizard. On the next screen, fill in the destination details:

  • Destination name: Site Calendar Pro — Test (or — Live when you set up the live webhook later)
  • Endpoint URL: paste the Webhook URL from Step 3 — exactly as displayed, starting with https://
  • Description: optional but useful for future reference: "Receives Stripe checkout and subscription events for Site Calendar Pro ticket sales."
Stripe webhook destination configuration form showing Destination name, Endpoint URL, and Description fields filled in
The Endpoint URL must start with https:// and match the URL shown in Site Calendar's settings exactly.

Click Create destination. Stripe creates the webhook and shows you the destination's detail page, where the most important field is the Signing secret — a value starting with whsec_… that lets your site verify incoming webhooks really came from Stripe (not from an attacker pretending to be Stripe).

Stripe webhook destination overview page showing the signing secret with whsec_ prefix and a reveal icon
Click the eye icon next to the signing secret to reveal it, then copy the full whsec_… value.

Click the eye icon (or "Click to view") next to the signing secret. Copy the entire whsec_… string.


Step 5 — Paste the signing secret into Site Calendar

Back in WordPress admin → Site Calendar → Settings → Tickets, find the Webhook signing secret field and paste the whsec_… value. Now click Save Settings.

Site Calendar Pro Stripe configuration page with all fields filled in: Test mode ticked, Publishable key, Secret key, Webhook signing secret all populated
All four credential fields populated. Save Settings at the bottom of the page when complete.

Step 6 — Verify with a test purchase

Create a test event with a ticket attached:

  1. Site Calendar → Events → Add New
  2. Title: "Test event — please ignore"
  3. Date: any future date
  4. Scroll to the Tickets meta box → Add a ticket:
    • Name: "Test ticket"
    • Price: 1.00 (one unit in your currency; the minimum Stripe accepts)
    • Capacity: 5
  5. Publish the event
  6. Open the event's front-end page in an incognito window
  7. Click the ticket purchase button
  8. On Stripe's checkout form, enter the test card number 4242 4242 4242 4242, any future expiry date, any 3-digit CVC, and any postcode
  9. Complete the checkout

You should be redirected back to your event page with a confirmation message. Within 30 seconds, an attendee record should appear in Site Calendar → Attendees, and a confirmation email should arrive at the email address you used during checkout.

Verify the webhook fired correctly. In Stripe dashboard → Developers → Webhooks → click the destination you created → scroll to Recent deliveries. You should see the checkout.session.completed event listed with HTTP response code 200 in green. If it shows red 4xx or 5xx, see Troubleshooting below.

Step 7 — When you're ready, switch to live mode

When you're ready to accept real money, repeat Steps 2–5 in Stripe's Live mode. You cannot copy test-mode keys, webhooks, or product IDs into live mode — they're entirely separate environments, and this is the single most common mistake when going live.

The dedicated walkthrough for the test-to-live transition is at Switching Stripe from test to live mode. It covers every pitfall and includes a "test webhook" verification step that confirms live mode is working before any real customer pays.


Troubleshooting

"Webhook returns 401 or 403 in Stripe's Recent deliveries"

Almost always means the signing secret in Site Calendar's settings doesn't match the secret Stripe is using to sign the webhook. Most common cause: you copied the test-mode secret but Stripe is sending live-mode events (or vice versa). Re-copy the signing secret from the correct Stripe environment and paste again. Save Settings.

"Webhook returns 500"

There's a PHP error on your site when the webhook arrives. Enable WP_DEBUG_LOG in your wp-config.php and check wp-content/debug.log for any line referring to class-pcal-webhook.php or starting with [Site Calendar]. The error message names the cause. If the line mentions a missing class or undefined function, your Pro plugin is out of date — update to the latest version.

"Customer reaches the success page but no attendee record is created"

The webhook isn't reaching your site at all. Most common cause: no webhook destination exists in the correct Stripe mode — for example, you're in live mode but you only configured the test-mode webhook. Confirm a destination exists in the same mode as the keys you're using on the site.

"Customer is charged but no confirmation email arrives"

The attendee record was created (check Site Calendar → Attendees to confirm) but the email send failed silently. Most common cause: the site's transactional email isn't configured. Install WP Mail SMTP and connect a reliable sender like Postmark, Brevo, or Mailgun. See Branded confirmation emails for the full email setup walkthrough.

"Test card 4242 4242 4242 4242 is declined"

You're using live-mode Stripe keys with the test card number. Either switch Site Calendar's keys to test mode (and update the webhook to point at the test-mode destination), or use a real card on a real-mode account.

"Site Calendar settings show 'Webhook URL' as blank or with /?rest_route= prefix"

Your site is using "ugly" permalinks. Go to Settings → Permalinks → choose "Post name" (or any non-default option) → Save Changes. The webhook URL will now appear in the clean format. Update your Stripe webhook destination URL to match.


What's next

Stuck? Email support@getsitecalendar.com and we'll help directly. Pro licence holders get priority response.