Documentation Index
Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
After installing the plugin, configure it in WooCommerce → Settings → KhaimePay.Required Settings
| Setting | Description | Example |
|---|---|---|
| Environment | Sandbox for testing, Live for production | Sandbox |
| API Key | Your Partner API key | pk_sandbox_bff301... |
| Webhook Secret | For verifying webhook signatures | whsec_abc123... |
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 Connection, the plugin automatically detects:| Setting | Source |
|---|---|
| Merchant ID | Retrieved from the Khaime API using your API key |
| Baseline Currency | Your store’s base currency configured in your Khaime dashboard |
Payment Gateway Settings
Go to WooCommerce → Settings → Payments → KhaimePay → Manage:| Setting | Default | Description |
|---|---|---|
| Enable/Disable | Disabled | Toggle the payment method on/off |
| Title | ”KhaimePay” | Shown to customers at checkout |
| Description | ”Pay securely with your local currency.” | Shown below the title |
Webhook Setup
The plugin automatically registers a webhook endpoint:Custom API URL
For development/testing with a local backend, set the Custom API URL:- Live:
https://api.khaime.com/api/v1 - Sandbox:
https://api.khaimedev.com/api/v1
Testing the Connection
After entering your credentials, click Test Connection on the settings page. A successful test confirms:- API key is valid
- Backend is reachable
- Merchant account is active
- Merchant ID and baseline currency are auto-detected and synced
Currency Switcher Display
Control which pages show the floating currency switcher using checkboxes:| Page Type | Default |
|---|---|
| Home / Front Page | Enabled |
| Shop / Archive Pages | Enabled |
| Single Product Pages | Enabled |
| Cart | Enabled |
| Checkout | Disabled |
| All Other Pages | Enabled |
Checkout is disabled by default to prevent currency changes during the payment flow.
- Shortcode:
[khaime_currency_switcher]or[khaime_currency_switcher style="buttons"] - Widget: Appearance → Widgets → Khaime Currency Switcher (supports dropdown or button style)
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 KhaimePay’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):Diagnostics Panel
The settings page includes a live diagnostics panel for debugging currency issues.Geolocation Detection
Shows the detected client IP, whether the geolocation API responded, the detected country and currency, and whether the result is cached.Active Currency Resolution
Displays the priority chain and highlights which source determined the customer’s currency:- Cookie — wins if set by the currency switcher
- WooCommerce session
- IP geolocation
- Baseline currency (fallback)
