Bookly Square Integration — Card Capture Issue & Fix
Overview
La Marie's WooCommerce/Square integration was failing to capture card details for service bookings without immediately charging the client. The business need is to hold a card on file at checkout so staff can add upsells (e.g., fillers, Botox) during the in-person appointment and collect the full amount at that time.
This issue was discussed in the [1].
Problem
When a client books a service through Bookly, the integration was not reliably capturing card details. A previous developer (E-Shock) had written custom code to zero out the cart total for services, but this approach was fragile — installing Zapier broke the Square connection, and the custom zero-amount workaround created complications when a cart contained both a service and a product (where the product should be charged immediately).
Root cause: A WooCommerce payment setting was misconfigured. The Square payment gateway was set to Charge (immediate collection) rather than Authorization (hold only).
Solution
Change the WooCommerce Square transaction type from Charge to Authorization.
Steps
- In the WordPress admin, go to WooCommerce → Settings → Payments
- Locate Square and click Manage
- Find the Transaction Type field
- Change the value from Charge to Authorization
- Save settings
⚠️ Test on staging only. Do not make this change directly on the production site.
How Authorization Works
Setting the transaction type to Authorization means:
- At checkout, Square blocks the authorized amount on the customer's card (funds are reserved but not transferred)
- The business can then collect the actual amount later — either through Square's dashboard or at the point of in-person service
- The custom zero-amount code from E-Shock should no longer be needed
Analogy: This is the same mechanism used by hotels (pre-authorizing the room total at check-in) and restaurants (authorizing before the tip is added). The card is confirmed valid and funds are reserved, but the final charge happens later.
Handling Mixed Carts (Service + Product)
A complication exists when a cart contains both a service (should be auth-only) and a product (should be charged immediately). This edge case was flagged but not fully resolved as of this meeting. Further investigation is needed to determine whether WooCommerce/Square supports per-line-item transaction types or whether a workaround is required.
Action Items
- [ ] Implement Authorization setting on La Marie Bookly staging site and verify the full capture flow (@Melissa Cusumano)
- [ ] Confirm whether the E-Shock custom zero-amount code can be removed once Authorization mode is active
- [ ] Investigate mixed-cart scenario (service + product in same checkout)
Broader Context
The client (Lisa) has a long-term vision for the site that goes beyond what WordPress/WooCommerce can cleanly support. Her desired UX — including the booking and payment flow — would be better served by a custom-coded application rather than a WordPress build. Melissa has flagged this to the client and noted that the team has capacity for custom development (Dimitri). The Bookly integration is considered a near-term fix; a platform migration may be a future proposal.
See also: [2]