Skip to main content

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.

Gateway Routing

Khaime automatically routes each payment to the best gateway based on the customer’s currency and region. You don’t need to configure or select gateways — it’s handled for you.

How It Works

  1. You send a charge request with the customer’s currency
  2. Khaime selects the optimal gateway for that currency and region
  3. The response tells you which checkout flow to use

Checkout Flows

The charge response includes a payment_gateway field. Your integration needs to handle two checkout types:
FlowWhenWhat to do
Embeddedclient_secret is returnedMount a payment element on your page using client_secret + publishable_key
Redirectpayment_url is returnedRedirect the customer to the hosted payment page

Example Response

// Embedded flow
{
  "payment_gateway": "...",
  "client_secret": "pi_xxx_secret_xxx",
  "publishable_key": "pk_xxx",
  "charge_id": "charge_xxx"
}

// Redirect flow
{
  "payment_gateway": "...",
  "payment_url": "https://...",
  "charge_id": "charge_xxx"
}

Supported Regions

Khaime supports payments across multiple regions including:
  • Africa — Nigeria, Ghana, Kenya, South Africa, and more
  • North America — United States, Canada
  • Europe — UK, Eurozone
  • Asia-Pacific — Australia and expanding
The list of supported currencies and regions is growing. Check the multicurrency page for the full list.

Integration Reference

See the WooCommerce plugin payment flow for a working example that handles both embedded and redirect checkout flows.