Stripe Checkout Setup
ProEvents Manager Pro - StripeRequires Events Manager Pro. Compare plans
With Stripe Checkout, a customer submits your booking form and is sent to a payment page hosted by Stripe. Stripe shows the tickets they chose, takes the payment and sends them back to your site, where the booking is approved.
If you would like customers to pay without leaving your booking form, use Stripe Elements. The Stripe page compares the two.
- Events Manager Pro 3.2.7 or later and the Events Manager Pro - Stripe plugin, both activated. This page describes Stripe add-on 2.6.0.
- A Stripe account, and access to its API keys and webhooks.
- Your site served over HTTPS. Without it the gateway is not offered on booking forms, and the key fields in wp-admin are locked.
Set up Stripe Checkout
Do these steps in test mode first, with Stripe's test keys, then repeat steps 2 to 4 with your live keys.
-
Go to Events then Payment Gateways and click Stripe Checkout. A new gateway starts in test mode: the banner above the tabs reads Test Mode Enabled and tells you its credentials come from the [Test] API Keys/Notifications tab.
-
In your Stripe Dashboard, switch to test mode (or a sandbox) and find your standard API keys. Stripe documents where they are in API keys. Copy the publishable key and the secret key.
-
Back in WordPress, open the [Test] API Keys/Notifications tab and paste them into Secret API Key and Publishable API Key. Click Save Changes.
The three credential fields, with the webhook endpoint URL and the supported events listed under Payment Notifications.
-
Create the webhook. See Create the webhook below. This is what approves bookings and records refunds, so don't skip it.
-
Go back to Events then Payment Gateways and click Activate under Stripe Checkout.
-
Book a priced event on your site and pay with one of Stripe's test cards. You should return to your site, and the booking should be Approved in Events then Bookings with a Completed transaction.
-
To go live, paste your live keys into the [Live] API Keys/Notifications tab, create a second webhook in Stripe's live mode, save its signing secret on the same tab, then click Enable Live Mode in the banner.
The gateway checks that the secret key on the Live tab is a live key. If you paste a test key there, the gateway treats itself as being in test mode and reads the Test tab instead.
Create the webhook
A webhook is how Stripe tells your site that a payment completed, was refunded or was disputed. Events Manager doesn't create it for you. You need one webhook endpoint for test mode and another for live mode.
-
On the [Test] API Keys/Notifications tab (or the Live tab), find Payment Notifications. Copy the address after Your Webhooks Endpoint url is. It looks like this:
https://example.com/wp-json/events-manager/v1/gateways/stripe_checkout/notify_testThe live address ends in
/notify. Copy it from the tab you are setting up. -
In Stripe, add a webhook endpoint with that address. The tab links to the right screens:
https://dashboard.stripe.com/test/webhooksfor test mode andhttps://dashboard.stripe.com/webhooksfor live mode. Stripe's own guide is Receive Stripe events in your webhook endpoint. -
Select these four events for the endpoint:
Event What Events Manager does with it checkout.session.completedRecords the payment and approves the booking. charge.refundedRecords each refund against the booking. charge.refund.updatedNotices a refund that later fails or is canceled, so it stops counting as refunded. charge.dispute.createdRecords a dispute against the booking. -
After saving the endpoint, reveal its signing secret in Stripe and paste it into Webhook Signing Secret on the same tab in WordPress. Click Save Changes.
Earlier instructions listed three events. If your webhook was created before Stripe add-on 2.5.4, edit the endpoint in Stripe and add charge.refund.updated. Without it, a refund that Stripe later reverses stays recorded as refunded.
Events Manager ignores any other event type, and ignores every event until a signing secret is saved. If you also use Stripe Elements, it needs its own endpoint with its own address and signing secret.
Settings
General Options
| Setting | What it does |
|---|---|
| Gateway Title | The name visitors see in the payment method menu. Default Pay with Stripe. |
| Booking Form Information | Text shown under the menu when this gateway is chosen. |
| QuickPay Payment Button | The button text when Quick Pay Buttons are on, or the full URL of an image to use as the button. |
| Success Message | Shown after the form is submitted, while the customer is sent to Stripe. The default asks them to wait while they are redirected. |
| Return URL | Where Stripe sends the customer after paying. Leave it empty to use the Events Manager thank you page, whose address is shown under the field. |
| Thank You Message | Shown on that thank you page. |
| Unpaid Bookings Expiry | Minutes an unpaid booking waits before it expires. 0 uses the site-wide setting. |
| Expired Booking Action | No Action, Delete or Cancel. See Unpaid bookings. |
| Manually approve completed transactions? | Tick it to leave paid bookings at Pending for you to approve. Bookings must also need approval in Events then Settings then Bookings. |
| Cancel URL | Where Stripe sends a customer who cancels on its page. Leave it empty to return them to the event, or to the checkout page in Multiple Bookings Mode. |
| Payment Cancelled Message | Shown to them when they arrive back. |
Gateway Options
| Setting | What it does |
|---|---|
| Include Taxes In Itemized Prices | No (the default) lists ticket prices without tax on the Stripe page and adds tax as its own line. Yes shows each ticket price with tax already included. |
| Send E-mail Receipt? | Yes (the default) asks Stripe to email the customer a receipt for every payment, whatever your Stripe account's receipt settings say. Choose No to leave receipts to your Stripe settings. |
The [Test] API Keys/Notifications tab also holds the Limited Test Mode and Hide Test Mode Gateway settings, described in Test mode.
What the customer sees
After submitting the booking form the customer lands on Stripe's page. It lists one line per ticket type with its name, description and quantity, the event's featured image, any surcharges, and tax as a line named Taxes with the rate. A coupon or other discount appears as a discount on the order. A deposit or balance payment is one line for the amount due.
Stripe offers the payment methods enabled in your Stripe account. The add-on has no setting for individual methods. The payment is described in Stripe as the event name and start date, and the customer is saved as a Stripe customer by email address, so repeat bookers are matched to the same record.
Unpaid, abandoned and declined payments
The booking is saved as Awaiting Online Payment before the customer reaches Stripe.
- The customer clicks back or cancel on Stripe's page. They return to your Cancel URL, the Stripe session is closed, the booking is deleted and the Payment Cancelled Message is shown. In Multiple Bookings Mode their cart is restored.
- The customer closes the tab, or their card is declined and they leave. The booking waits for the Unpaid Bookings Expiry. When it runs out, Events Manager asks Stripe whether the payment went through. If it did, the booking is approved. If not, the Stripe session is expired so it can't be paid later, and the Expired Booking Action is applied.
- The customer comes back later. My Bookings shows a Resume Payment button on the unpaid booking, or Pay now if the payment page is on.
Set an expiry, either here or site-wide. With none, abandoned bookings stay at Awaiting Online Payment and do not hold their spaces. The full rules are in Unpaid, abandoned and expired bookings.
Refunds
Refund a payment from your Stripe Dashboard. There is no refund button in WordPress. When Stripe notifies your site:
- Each refund is recorded once as a Refunded transaction with a negative amount.
- Refunds that add up to the booking price cancel the booking.
- A partial refund sets the booking to Pending, without sending a status email.
- If Stripe later reports that the refund failed, a Refund Failed transaction puts the amount back and the booking's status is left alone.
- A booking paying a deposit and balance is only cancelled once nothing is left paid.
Disputes
When a customer disputes a charge with their bank, Stripe sends charge.dispute.created and Events Manager records a Disputed transaction for the disputed amount. A dispute for the full booking price cancels the booking. A smaller one sets it to Pending.
Nothing happens on your site when the dispute is closed. If you win it, approve the booking again yourself. Respond to the dispute in your Stripe Dashboard as usual.
Troubleshooting
Stripe Checkout is not offered on the booking form
Check that the gateway is Active in Events then Payment Gateways, that the page is loaded over https://, and that the event has a ticket with a price. If the gateway is in test mode, look at Hide Test Mode Gateway on the Test tab: it may be limited to certain IP addresses or users.
Customers pay but bookings stay at Awaiting Online Payment
The webhook is not reaching your site or is being rejected. Check that the endpoint address in Stripe matches the one on the tab for the mode you are in, that checkout.session.completed is selected, and that the Webhook Signing Secret belongs to that endpoint. Stripe's webhook screen shows each delivery and the response your site gave. If an expiry is set, the booking is still approved when the expiry check asks Stripe directly.
The customer sees "An unknown error has occurred, please contact us for further assistance."
Stripe refused to create the payment page, usually because the API keys are wrong or belong to the other mode. The booking that was being made is discarded. Check the keys on the tab for the current mode.
The API key fields show asterisks and can't be edited
wp-admin is not loaded over HTTPS. See Safely Saving Gateway API Credentials.
A refund made in Stripe did not change the booking
Add charge.refunded and charge.refund.updated to the webhook endpoint for that mode. A refund on a booking made in test mode is sent to the test endpoint.