Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/riazahmad0027/booking-deposits-for-stripe/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A WordPress plugin for appointment booking with a deposit paid through Stripe Checkout. Built from scratch in PHP, with no third-party booking plugin.
Status: version 1.0.0. Passes the official WordPress Plugin Check with no errors or warnings. Being prepared for the WordPress.org plugin directory.
Features
- Booking form with a shortcode:
[bdfs_booking] - Settings page: Stripe keys, currency, fee, deposit percent, time slots, hold time
- Double-booking protection
- Deposit paid through Stripe Checkout (any Stripe currency, including zero-decimal ones like JPY)
- The payment is checked with the Stripe API before a booking is confirmed
- Stripe webhook with signature verification and replay protection
- Unpaid bookings hold the slot for a set time, then free it automatically
- Confirmation emails to the customer and the site owner, never sent twice
- Admin bookings page with status and a Cancel button
- Translation-ready, and uninstall removes all plugin data
How it works
- The customer fills in the form → the booking is saved as pending.
- The customer pays the deposit on Stripe Checkout.
- The booking becomes confirmed in two independent ways (whichever comes first):
- the return page asks the Stripe API whether the session is paid
- the Stripe webhook (
checkout.session.completed) confirms it
- The database update only changes unconfirmed rows, so emails are sent once.
Files
booking-deposits-for-stripe.php: main file, autoloader, database tableincludes/Settings.php: settings page and all settingsincludes/BookingForm.php: form, validation, Stripe Checkoutincludes/Booking.php: database rules (confirm, cancel, slot check)includes/Webhook.php: REST endpoint with Stripe signature verificationincludes/StripeApi.php,includes/Money.php,includes/Emails.php,includes/AdminPage.php,includes/Log.phpuninstall.php: removes the table and settingsreadme.txt: WordPress.org readme
Setup
- Install and activate the plugin.
- Go to Bookings → Settings and add your Stripe secret key (
sk_test_...for testing). - In Stripe, add a webhook to the URL shown on the settings page, with the events
checkout.session.completedandcheckout.session.expired, and paste its signing secret (whsec_...). - Add
[bdfs_booking]to any page.
Tested with
WordPress 7.1 and 7.2-alpha, PHP 8.3, Stripe test mode, Stripe CLI. Automated tests cover booking, double booking, payment checks, webhook signatures, expiry and emails.
Author
Riaz Ahmad, WordPress and WooCommerce developer
License
GPL-2.0-or-later