Payment Integrations PRO
FluentBooking Pro supports paid bookings via two native gateways and one offline option. Configure them under FluentBooking → Settings → Payments.
Built-in Methods
| Method | Source | Notes |
|---|---|---|
| Stripe | app/Services/Integrations/PaymentMethods/Stripe/Stripe.php | Connect-based account flow; one-time charges; refunds from the admin. |
| PayPal | app/Services/Integrations/PaymentMethods/Paypal/Paypal.php | Standard PayPal Checkout with IPN. |
| Offline | app/Services/Integrations/PaymentMethods/Offline/Offline.php | Manual / pay-later. |
Stripe and PayPal are registered automatically inside GlobalPaymentHandler via (new Stripe())->register() and (new Paypal())->register().
Event-Level Settings
Each calendar event can override the global payment defaults:
- Enable/disable payments
- Price + currency
- Refund policy
- Allowed payment methods (subset of the globally connected gateways)
The admin REST endpoints live under /calendars/{id}/events/{event_id}/payment-settings.
Booking + Payment Flow
- Attendee selects a slot on a paid event.
- FluentBooking creates a draft order before the booking is finalized (
fluent_booking/create_draft_orderfilter,fluent_booking/after_draft_order_createdaction). - Attendee is redirected to (or processed inline with) the gateway.
- On success, the gateway's IPN/webhook fires
fluent_booking/payment/status_changedandfluent_booking/payment/status_changed_<gateway>. - When status becomes
paid, the booking is confirmed (fluent_booking/payment/update_payment_status_paid). - Failures keep the booking pending and the order updated.
Registering a Custom Gateway
The plugin emits do_action('fluent_booking/register_payment_methods') (no args). Your custom gateway extends BasePaymentMethod and registers itself by calling register() inside the action handler.
use FluentBookingPro\App\Services\Integrations\PaymentMethods\BasePaymentMethod;
class MyGateway extends BasePaymentMethod
{
public function __construct()
{
parent::__construct(
__('My Gateway', 'my-plugin'),
'mygateway', // slug used throughout hook names
'#3b82f6' // brand color
);
}
public function getGlobalFields()
{
// Admin "Global Payment Settings" form for this gateway
return [/* field definitions */];
}
public function makePayment($order, $booking, $paymentArgs)
{
// Called from action fluent_booking/payment/pay_order_with_<slug>
// Return ['redirect_url' => '...'] for redirect-style gateways,
// or process inline and call $this->updatePaymentStatus() on success.
}
public function onPaymentEventTriggered()
{
// Called from action fluent_booking/payment/ipn_endpoint_<slug>
}
public function refundPayment($transaction, $amount = null)
{
// Called from action fluent_booking/refund_payment_<slug>
}
}
add_action('fluent_booking/register_payment_methods', function () {
(new MyGateway())->register();
});BasePaymentMethod::init() (called from register()) wires the gateway into the standard hook surface:
fluent_booking/payment/get_global_payment_settings_<slug>(filter) — admin settings fieldsfluent_booking/payment/get_global_payment_methods(filter) — registers the gateway in the global gateway listfluent_booking/payment/payment_settings_update_<slug>(action) — saves admin settingsfluent_booking/payment/pay_order_with_<slug>(action, 3 args) — runs the chargefluent_booking/refund_payment_<slug>(action, 2 args) — refundsfluent_booking/payment/ipn_endpoint_<slug>(action) — handles IPN callbackfluent_booking/payment/status_changed_<slug>(action, 3 args) — gateway status transitionfluent_booking/payment/get_all_methods(filter) — exposes the gateway to the booking formfluent_booking/booking_data(filter) — annotates incoming booking data with the chosen payment method
Read app/Services/Integrations/PaymentMethods/BasePaymentMethod.php for the full surface area before subclassing.
Currency
Add currencies / symbols via the two global filters:
add_filter('fluent_booking/accepted_currencies', function ($currencies) {
$currencies['XYZ'] = 'XYZ Coin';
return $currencies;
});
add_filter('fluent_booking/global_currency_symbols', function ($symbols) {
$symbols['XYZ'] = 'XYZ';
return $symbols;
});Coupons
Coupons hook into the order pipeline before charge. Defaults can be filtered:
add_filter('fluent_booking/default_coupon_data', function ($data) {
$data['stackable'] = 'no';
return $data;
});See Action Hooks → Coupons for the lifecycle hooks.
Useful Hooks
Action hooks under Action Hooks → Payments & Orders:
fluent_booking/after_draft_order_createdfluent_booking/after_order_items_createdfluent_booking/payment/status_changedfluent_booking/payment/update_payment_status_paidfluent_booking/refund_payment_<slug>fluent_booking/transaction_updated
Filter hooks under Filter Hooks → Payments & Advanced:
fluent_booking/payment/get_payment_settingsfluent_booking/payment/get_all_methodsfluent_booking/create_draft_orderfluent_booking/create_draft_transactions
Refunds
Issue refunds from the admin booking detail page. The plugin records the refund as a new row in fcal_transactions and fires fluent_booking/refund_payment_<slug>. Hook that action to trigger downstream cleanup (revoke licenses, notify CRM, etc.).