Skip to main content

WooCommerce Payment Flow

Intro

Khaime slots in as a standard WooCommerce payment method: the customer pays through Stripe or Paystack under the hood, and WooCommerce marks the order paid once Khaime confirms it.

Context

This assumes the plugin is already installed and configured with a valid API key. It depends on multicurrency display for the total the customer sees, and on webhooks for the automatic “paid” confirmation described below.

Hows

Checkout compatibility

Khaime works with both WooCommerce checkout types, with no extra setup:
  • Classic checkout — the traditional shortcode-based checkout
  • Block-based checkout — the Gutenberg block checkout (default since WooCommerce 8.3+)

How a payment works

  1. The customer selects Khaime at checkout and places their order.
  2. Depending on the payment method, the customer either enters their card details on the payment page (embedded payment) or is redirected to complete payment (e.g. Paystack).
  3. After paying, the customer returns to your store’s order-confirmation page.
  4. The order is marked paid automatically once Khaime confirms the payment.
For redirect-based gateways, the order may briefly show as on-hold right after the customer returns, until Khaime’s webhook confirms the charge and flips it to paid — this is normal and usually resolves within moments. The customer is charged exactly the total they saw at checkout — including products, shipping, fees, and taxes — in their own currency.

Refunds

Refunds use WooCommerce’s built-in refund flow. From the order page in WooCommerce → Orders, issue a refund as you normally would: the plugin sends it to Khaime immediately and adds a note to the order once Khaime’s API confirms the refund request. You don’t need to do anything on the Khaime dashboard separately.

Order details

After payment, each order records the payment reference details (charge and transaction identifiers, the gateway used, and the amount and currency the customer paid) so you can reconcile it against your Khaime dashboard.

Whys

The plugin defers to WooCommerce’s own order and refund flows instead of building a parallel “Khaime orders” screen, so refunds, order notes, and order status all show up exactly where a store owner already looks. Charging the exact total the customer saw at checkout — rather than re-deriving it from stored product prices — avoids a class of bugs where add-ons, coupons, or shipping computed by a third-party plugin would otherwise be missed and the customer under- or over-charged relative to what they approved.

Why nots

  • Refunds are not asynchronous. Unlike payment confirmation, a WooCommerce-initiated refund is sent to Khaime synchronously when you click refund — it does not wait for a webhook. If the Khaime API call fails, WooCommerce reports the refund as failed immediately rather than leaving it pending.
  • Not a multi-step checkout. There’s no separate “confirm payment” screen the plugin adds — Stripe’s embedded payment element or the Paystack redirect is the entire payment step.
  • Doesn’t support partial capture / manual capture flows. The gateway processes a full charge for the order total; authorize-then-capture is not part of this flow.