---
title: Bookly Square Integration — Card Capture Issue & Fix
type: article
created: '2025-12-29'
updated: '2025-12-29'
source_docs:
- raw/2025-12-29-monday-call-w-melissa-111041612.md
tags:
- woocommerce
- square
- payments
- bookly
- authorization-vs-charge
- client-la-marie
layer: 2
client_source: LaMarie Beauty
industry_context: ecommerce
transferable: false
---

# 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 [[meetings/2025-12-29-monday-call-melissa|2025-12-29 Monday Call with Melissa]].

---

## 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

1. In the WordPress admin, go to **WooCommerce → Settings → Payments**
2. Locate **Square** and click **Manage**
3. Find the **Transaction Type** field
4. Change the value from **Charge** to **Authorization**
5. 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: [[clients/current/lamarie/_index|La Marie Client Overview]]