When building a unified WooCommerce checkout that handles both product purchases and service bookings, a key requirement is the ability to capture a credit card at checkout without immediately charging it — and then charge that card later (e.g., at time of service, or if a no-show fee applies). This is distinct from simply processing a zero-dollar transaction.
This pattern is sometimes called payment tokenization: storing a card reference (token) that can be used for future charges, without storing raw card data.
WooCommerce itself does not natively store credit card details for future charges. It delegates payment processing entirely to third-party gateways (Stripe, Square, etc.). The challenge is that:
This distinction surfaced during the [1] project, where engineer Ishak built a unified checkout that correctly shows the service price but sets the subtotal to zero, allowing product payment while reserving the service slot. However, the ability to re-charge that card later remained unresolved.
"The actual saving of the credit card through WooCommerce, where we use some sort of tokenization, where we then are able to recharge that card — I'm not sure that we've found that solution yet."
— Chris Østergaard, 2025-11-11 call
Some WooCommerce payment gateway plugins (particularly the official WooCommerce Square plugin) include built-in tokenization support. This may surface as a "Save card for future use" checkbox in the checkout form. The key questions to verify:
If native plugin support is insufficient, a custom hook may be required. WooCommerce provides action and filter hooks throughout the checkout and order lifecycle. Relevant hooks to investigate:
woocommerce_payment_token_create — fires when a token is savedwoocommerce_add_payment_method — for explicitly saving a payment methodThis approach requires more development effort but gives full control over when and how the card is stored.
Square has a dedicated Cards API for storing cards on file. If WooCommerce's gateway plugin does not expose tokenization natively, a custom integration could:
card_id to be associated with the WooCommerce order or customer record.card_id for future charges via the Payments API.This is the most robust path but requires the most custom development.
Owner: Ishak (engineer) — investigating as of the 2025-11-11 call. Results to be presented at the following week's meeting.
This question arose in the context of a broader architecture where:
See [2] for the full system design.
The tokenization requirement exists because La Marie Beauty needs to hold a card on file for potential no-show charges — a common pattern in appointment-based businesses.