Skip to main content

Configuration

Intro

Configuration connects your WooCommerce store to your Khaime account with an API key, then lets you control where and how the currency switcher and payment method appear.

Context

This follows installation and is a prerequisite for everything else in the WooCommerce integration — the payment flow, multicurrency display, and webhooks all depend on a valid API key and webhook secret being set here first. Settings live in WooCommerce → Khaime.

Hows

Required settings

Get your API key and webhook secret from app.khaime.com → Settings → API.

Auto-detected settings

When you save your API key or click Test API connection, the plugin calls Khaime to detect: These are fetched from your account and stored automatically — there’s nothing to type in for either. The baseline currency is also synced to WooCommerce’s store currency setting, since product prices need to be interpreted in the same currency Khaime settles in.

Payment gateway settings

Go to WooCommerce → Settings → Payments → Khaime → Manage: The payment method displays small icons for supported payment methods (Visa, Mastercard, Amex, Apple Pay, Google Pay, Paystack) at checkout.

Webhook setup

The plugin always exposes a fixed webhook endpoint (it’s a standard WordPress REST route, present as soon as the plugin is active):
Copy this URL and add it to your Khaime Dashboard → Settings → API → Webhook URL.

Testing the connection

Click Test API connection on the settings page. A successful test confirms:
  • API key is valid
  • Backend is reachable
  • Merchant ID and baseline currency are detected and synced

Currency switcher display

Control which pages show the floating currency switcher using checkboxes:
Checkout is disabled by default to prevent currency changes during the payment flow.
The switcher can also be placed manually using:
  • Shortcode: [khaime_currency_switcher] or [khaime_currency_switcher style="buttons"]
  • Widget: Appearance → Widgets → Khaime Currency Switcher (supports dropdown or button style)
You can also whitelist which currencies appear in the switcher — leave it empty to show every currency your Khaime account supports.

Theme color inheritance

The floating switcher automatically inherits your theme’s primary color. It works out of the box with popular themes like Woodmart and WordPress block themes. If your theme doesn’t use standard CSS custom properties, the switcher falls back to Khaime’s default accent color.

Custom price selectors

If your theme or third-party plugins render prices outside of WooCommerce’s standard price elements, add their CSS selectors in the Custom Price Selectors textarea (one per line):
Prices inside those elements will then be converted automatically.

Whys

The API key is the only credential you enter by hand — merchant ID and baseline currency are derived from it rather than typed in, because a hand-typed merchant ID or currency can drift from what your Khaime account actually has configured (wrong ID, stale currency after a settlement-currency change). Deriving both from the key on every successful connection test keeps the store and the Khaime account from silently disagreeing. Checkout is excluded from the currency switcher by default for the same reason many payment providers lock currency at the point of payment: switching currency mid-checkout would change the total the customer is about to be charged after they’ve already reviewed it.

Why nots

  • The webhook URL isn’t something you configure in WordPress — it’s fixed and always present once the plugin is active. The only configuration step is pasting it into the Khaime Dashboard.
  • Don’t hand-edit Merchant ID or Baseline Currency. They’re populated automatically from your API key; there’s no field to override them because the plugin needs them to match what Khaime has on file.
  • The custom price selectors field is for exceptions, not the default path. Standard WooCommerce price markup is already converted — only reach for this when a theme or third-party plugin renders totals outside WooCommerce’s own price elements.