Create a one-time (or recurring, with a subscription field) payment charge without needing the product in Khaime’s catalog — the endpoint of choice for WooCommerce and custom integrations where products live on the merchant’s own platform.
This is the recommended endpoint for plugin integrations. Use Create Session if your product already lives in Khaime’s catalog.
Khaime Catalog Products?
For products in Khaime’s catalog (storefronts), use Create Payment Intent instead. It supports multi-item carts for physical products, digital products, and gift cards.
Context
Create Charge is the entry point for the whole payment flow described in Payments Overview: the charge_currency you send drives Gateway Routing, cross-currency amounts are validated against Calculate Pricing, subscription_frequency_key turns the charge into a subscription, and a successful charge’s transaction_id is what you later pass to Refunds. Payment outcome is confirmed over the payment.succeeded / payment.failed webhooks, not a return value from this call.
Hows
Request body
integer
required
Charge amount in smallest currency unit (cents, kobo) — the customer’s payment currency. Must be calculated using /pricing/calculate when currency conversion is involved — we validate it matches our calculation.
string
required
3-letter ISO currency code for what the customer pays. Example: USD, NGN, GBP
integer
required
The full amount the merchant is collecting, in smallest currency unit of merchant_currency. This is inclusive of all fees (shipping, handling, etc.) — not just the base product price.Why required: This field is the source of truth for what gets credited to the merchant’s wallet, and anchors our server-side conversion when multicurrency is involved.
No conversion: Pass the same value as charge_amount
Multicurrency: Pass the total in the merchant’s baseline currency (e.g. 8500 for $85.00 USD)
Marketplace: Pass the total in the sub-merchant’s baseline currency
Example: merchant prices a service at $85 USD with $5 shipping = $90 total, customer pays ₦144,000 NGN — set total_amount: 9000, total_currency: "USD".
original_product_amount is accepted as a deprecated alias and will continue to work.
string
required
ISO 4217 currency code for merchant_amount. This is the merchant’s (or sub-merchant’s) pricing currency.
No conversion: Pass the same value as charge_currency
Multicurrency / Marketplace: Pass the merchant’s baseline currency
original_product_currency is accepted as a deprecated alias and will continue to work.
integer
Your pre-computed conversion of merchant_amount into charge_currency (the customer’s payment currency). Optional — but strongly recommended when merchant_currency differs from charge_currency.When provided, we cross-validate:
converted_total_currency must equal charge_currency
converted_total_amount must equal charge_amount (within 1% tolerance)
This lets us catch discrepancies before hitting the exchange-rate API and gives you an explicit paper trail of what rate you applied.Must be provided together with converted_total_currency.
string
The currency of converted_total_amount. Must match charge_currency. Required when converted_total_amount is provided.
string
Human-readable description of the charge. Shown on payment receipts.
string
Your unique reference for this charge. Used for idempotency and reconciliation.
string
Canonical redirect URL after payment.
Paystack: customer returns here after hosted checkout
StartButton: sent through as redirectUrl during payment initialization
Embedded: use return_url in confirmPayment() on the client
string
Camel-case alias for callback_url. Useful for StartButton-oriented integrations.
string
Snake-case alias for callback_url.
string
Set to make this a recurring charge instead of a one-time payment — see Subscriptions for valid keys and behavior.
object
required
Show Customer fields
string
required
Customer’s email address.
string
Customer’s first name.
string
Customer’s last name.
string
Customer country code or country name. Recommended for reporting, fee detection, and customer geography analytics. Examples: GH, NG, United States.
string
Alias for customer.country. Use this if your checkout already stores ISO-2 country codes as country_code.
string
Alias for customer.country. Accepted as a top-level field for storefronts that already send user_country.
string
Alias for customer.country. Accepted as a top-level field and inside metadata.
string
Alias for customer.country. Accepted as a top-level field.
string
Billing country fallback when customer.country is absent. Accepted as a top-level field and inside metadata.
string
Shipping country fallback when customer.country is absent. Accepted as a top-level field and inside metadata.
Send any country value you already have. Khaime normalizes common country names and ISO-2 codes, then stores the resolved value on the transaction for customer geography reports. If no country is provided, embedded/redirect card country may be used after payment; otherwise the transaction may appear as Unknown in geography analytics.
object
Custom key-value pairs attached to the charge. Send strings, numbers, or booleans only — nested objects/arrays are not rejected by validation (there is no scalar-type check server-side), but they can fail silently downstream if the resolved gateway’s API rejects non-string metadata values. Treat this as a hard rule, not just a recommendation.
Force a specific gateway instead of Khaime’s automatic currency-based routing (see Gateway Routing). Only stripe or paystack are accepted — you cannot force startbutton or flutterwave through this field, regardless of currency.
boolean
default:"false"
When true, returns a fee and conversion breakdown without creating any database records or calling any payment gateway. Use this to show the customer exactly what they’ll pay before initiating the real charge.All validation still runs — amount mismatch, currency conversion, sub-merchant, etc. — so a successful preview response means your actual charge will go through.See Preview Mode below for the response shape.
Marketplace fields
This field is only relevant if your account is set up as a marketplace operator. See Setup Marketplace to enable marketplace mode.
integer
The Khaime business ID of the sub-merchant this charge is being collected for. Must have active status in your marketplace.When present, the charge is split between the sub-merchant and you. See How the split works below.
How the split worksOn webhook receipt after a successful payment:
The sub-merchant’s wallet is credited with merchant_amount minus Khaime’s fee and your commission.
Your wallet is credited with your commission.
Each credit is in the currency the customer paid (charge_currency) when that business holds it. Otherwise it is in the business’s settlement currency, converted at the market rate when needed.Commission is resolved in this order:
The sub-merchant must have status: active in your marketplace. Pending or suspended sub-merchants will be skipped — your marketplace wallet will still be credited normally.
Response
The response varies based on which gateway Khaime routes to:
Use client_secret and publishable_key to mount the embedded payment element. When merchant_account_id is present (direct/marketplace charges), pass it as connectedAccount when initializing Khaime Payment SDK.
Want Apple Pay / Google Pay in the Payment Element? Register your checkout domain first — see Register Payment Method Domain.
Redirect the customer to payment_url. If you supplied callback_url, redirectUrl, or redirect_url, Khaime forwards the resolved redirect to the gateway and stores it in metadata for downstream processing. Which of StartButton or Flutterwave handles a given African currency is a platform configuration detail — the response shape is the same either way (payment_gateway reflects whichever was used).
Gateway routing
The charge_currency field determines which gateway processes the payment — see Gateway Routing for the full mapping:
Currency
Gateway
NGN
Paystack
GHS, KES, ZAR, TZS, UGX, XAF, XOF
Flutterwave or StartButton
USD, EUR, GBP, CAD, AUD, and most other supported currencies
Stripe
Preview mode
Pass "preview": true in the request body to calculate fees and FX conversion without creating a charge. The response is identical in structure to a normal charge response except:
preview: true is set at the top level
No charge_id, client_secret, payment_url, or transaction_id — no gateway was called
customer and business are always in different currencies when multicurrency is involved — do not compare customer.base_amount with business.priced_amount directly. Use the conversion.exchange_rate to relate them. conversion is only present when charge_currency differs from merchant_currency.
Typical workflow:
1. POST /payments/charge { preview: true, ...fields } → Show breakdown to customer2. Customer confirms3. POST /payments/charge { ...same fields, no preview } → Actual charge created, payment URL / client secret returned
Amount validation (double check)
Both you and Khaime calculate the charge amount independently — they must match.Your workflow:
Call /pricing/calculate with your merchant_amount as amount, and target_currency
Use the returned local.amount as your charge_amount in the charge request
Optionally, pass converted_total_amount and converted_total_currency to make your pre-computed conversion explicit
We recalculate using the same conversion service and verify they match
Why double validation? This ensures both parties agree on the conversion. If there’s a mismatch, something is wrong — either a bug, stale rate, or manipulation attempt.
There are two different tolerance checks, easy to conflate: if you supply converted_total_amount, it’s compared against charge_amount with a 1% tolerance. Separately, whenever the server recalculates the expected charge amount itself (the normal path when converted_total_amount is omitted), it uses a wider 2% tolerance to absorb exchange-rate cache drift between your request and Khaime’s own rate refresh.
# Step 1: Get the converted amountcurl "https://api.khaime.com/api/v1/pricing/calculate?amount=9000&target_currency=NGN" \ -H "X-API-Key: pk_sandbox_your_key"# Returns: { "local": { "amount": 1440000, "currency": "NGN" } }# Step 2: Use that amount in your chargecurl -X POST "https://api.khaime.com/api/v1/payments/charge" \ -H "X-API-Key: pk_sandbox_your_key" \ -d '{ "charge_amount": 1440000, "charge_currency": "NGN", "merchant_amount": 9000, "merchant_currency": "USD", "converted_total_amount": 1440000, "converted_total_currency": "NGN", ... }'
Error codes
Status
Error code
Message
Fix
400
PAYMENT_AMOUNT_MISMATCH
Amount mismatch
Your charge_amount doesn’t match our calculation. Use /pricing/calculate to get the correct amount.
400
PAYMENT_AMOUNT_MISMATCH
converted_total_amount does not match amount
Your pre-computed conversion differs from charge_amount. Ensure both represent the charge total in the same currency.
400
PAYMENT_AMOUNT_MISMATCH
converted_total_currency must match the charge currency
converted_total_currency must equal charge_currency.
400
VALIDATION_MISSING_FIELD
Both converted_total_amount and converted_total_currency must be provided together
Supply both fields or neither.
422
VALIDATION_FAILED
"charge_amount" is required (likewise charge_currency, merchant_amount, merchant_currency)
Include all four. The earlier names amount, currency, total_amount and total_currency are not accepted.
Currency conversion failed — try again or use a supported currency.
404
BUSINESS_NOT_FOUND
Merchant not found
The authenticated merchant record couldn’t be resolved.
401
—
Invalid API key
Check your X-API-Key header.
—
(no validation error)
Nested metadata values are not rejected at request time — there is no server-side scalar check. A gateway may reject them downstream instead. Keep metadata values scalar as a precaution, not because you’ll get a clean error if you don’t.
merchant_amount / merchant_currency are required (not just charge_amount / charge_currency) because they’re the source of truth for what the merchant is owed — charge_amount alone tells Khaime what the customer paid, but not what that should convert back to for wallet crediting. Requiring both, plus the double-validation described above, lets Khaime catch a wrong conversion before money moves rather than after. Marketplace commission resolves through a fallback chain (per-merchant rate → portfolio default → zero) so operators can set sane platform-wide defaults without having to configure every sub-merchant individually.
Why nots
This endpoint does not require a Khaime catalog product — if you want catalog-backed checkout instead, use Create Payment Intent.
payment_gateway cannot force startbutton or flutterwave — only stripe and paystack are valid overrides.
Metadata values are not schema-validated for type — sending nested objects/arrays won’t be rejected here, but can fail silently at the gateway. Keep values scalar.
A charge to a pending or suspended sub-merchant is not rejected outright — it’s silently skipped for the sub-merchant credit while your marketplace wallet is still credited normally, so check sub_merchant_id status ahead of time if the split is load-bearing for your flow.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Khaime Documentation","colors":{"primary":"#42c3ff","light":"#42c3ff","dark":"#2a9fd6"},"logo":{"light":"https://app.khaime.com/khaime-logo.png","dark":"https://app.khaime.com/khaime-logo.png"},"favicon":"https://app.khaime.com/favicon.ico","api":{"playground":{"proxy":false},"mdx":{"auth":{"method":"key","name":"X-API-Key"},"server":["https://api.khaime.com/api/v1","https://api.khaimedev.com/api/v1","http://localhost:5050/api/v1"]}},"navbar":{"links":[{"href":"https://app.khaime.com","label":"Dashboard"}],"primary":{"type":"button","label":"Get Started","href":"https://app.khaime.com/register?utm_source=docs\u0026utm_medium=referral"}},"footer":{"socials":{"twitter":"https://twitter.com/khaime","linkedin":"https://linkedin.com/company/khaime"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/khaime"},{"anchor":"Status","icon":"signal","href":"https://status.khaime.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"khaimeai-4786d0b2","hasAudioNarration":false,"actualSubdomain":"khaimeai-4786d0b2","customDomains":["docs.khaime.com"],"gitSource":{"type":"github","owner":"khaime-team","repo":"khaime-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b05b9f73c6dde909824798a","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"API Reference","count":80},{"language":"default","tag":"Marketplace","count":26},{"language":"default","tag":"Documentation","count":16},{"language":"default","tag":"SDKs","count":13},{"language":"default","tag":"Commerce API","count":13},{"language":"default","tag":"Plugins","count":13},{"language":"default","tag":"Payments","count":12},{"language":"default","tag":"Store Data","count":11},{"language":"default","tag":"Installments","count":7},{"language":"default","tag":"WooCommerce","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/payments/create-charge","slug":"/api-reference/payments/create-charge","pageMetadata":{"title":"Create Charge","api":"POST /payments/charge","description":"Create a product-agnostic payment charge.","href":"/api-reference/payments/create-charge"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create a product-agnostic payment charge.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CodeBlock,Expandable,Heading,Note,ParamField,Tab,Table,Tabs,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`intro`,children:`Intro`}),`\n`,_jsx(_components.p,{children:`Create a one-time (or recurring, with a subscription field) payment charge without needing the product in Khaime’s catalog — the endpoint of choice for WooCommerce and custom integrations where products live on the merchant’s own platform.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This is the recommended endpoint for plugin integrations. Use `,_jsx(_components.a,{href:`/api-reference/payments/create-session`,children:`Create Session`}),` if your product already lives in Khaime’s catalog.`]})}),`\n`,_jsx(Card,{title:`Khaime Catalog Products?`,icon:`cart-shopping`,href:`/api-reference/commerce/payment-intent`,children:_jsxs(_components.p,{children:[`For products in Khaime’s catalog (storefronts), use `,_jsx(_components.strong,{children:`Create Payment Intent`}),` instead. It supports multi-item carts for physical products, digital products, and gift cards.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`context`,children:`Context`}),`\n`,_jsxs(_components.p,{children:[`Create Charge is the entry point for the whole payment flow described in `,_jsx(_components.a,{href:`/payments/overview`,children:`Payments Overview`}),`: the `,_jsx(_components.code,{children:`charge_currency`}),` you send drives `,_jsx(_components.a,{href:`/payments/gateway-routing`,children:`Gateway Routing`}),`, cross-currency amounts are validated against `,_jsx(_components.a,{href:`/api-reference/products/calculate-pricing`,children:`Calculate Pricing`}),`, `,_jsx(_components.code,{children:`subscription_frequency_key`}),` turns the charge into a `,_jsx(_components.a,{href:`/payments/subscriptions`,children:`subscription`}),`, and a successful charge’s `,_jsx(_components.code,{children:`transaction_id`}),` is what you later pass to `,_jsx(_components.a,{href:`/payments/refunds`,children:`Refunds`}),`. Payment outcome is confirmed over the `,_jsx(_components.code,{children:`payment.succeeded`}),` / `,_jsx(_components.code,{children:`payment.failed`}),` webhooks, not a return value from this call.`]}),`\n`,_jsx(Heading,{level:`2`,id:`hows`,children:`Hows`}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`charge_amount`,type:`integer`,required:true,id:`param-charge-amount`,children:_jsxs(_components.p,{children:[`Charge amount in smallest currency unit (cents, kobo) — the `,_jsx(_components.strong,{children:`customer’s payment currency`}),`. `,_jsxs(_components.strong,{children:[`Must be calculated using `,_jsx(_components.a,{href:`/api-reference/products/calculate-pricing`,children:`/pricing/calculate`})]}),` when currency conversion is involved — we validate it matches our calculation.`]})}),`\n`,_jsx(ParamField,{body:`charge_currency`,type:`string`,required:true,id:`param-charge-currency`,children:_jsxs(_components.p,{children:[`3-letter ISO currency code for what the `,_jsx(_components.strong,{children:`customer pays`}),`. Example: `,_jsx(_components.code,{children:`USD`}),`, `,_jsx(_components.code,{children:`NGN`}),`, `,_jsx(_components.code,{children:`GBP`})]})}),`\n`,_jsxs(ParamField,{body:`merchant_amount`,type:`integer`,required:true,id:`param-merchant-amount`,children:[_jsxs(_components.p,{children:[`The full amount the merchant is collecting, in smallest currency unit of `,_jsx(_components.code,{children:`merchant_currency`}),`. This is `,_jsx(_components.strong,{children:`inclusive of all fees`}),` (shipping, handling, etc.) — not just the base product price.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Why required:`}),` This field is the source of truth for what gets credited to the merchant’s wallet, and anchors our server-side conversion when multicurrency is involved.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No conversion:`}),` Pass the same value as `,_jsx(_components.code,{children:`charge_amount`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multicurrency:`}),` Pass the total in the merchant’s baseline currency (e.g. `,_jsx(_components.code,{children:`8500`}),` for $85.00 USD)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Marketplace:`}),` Pass the total in the sub-merchant’s baseline currency`]}),`\n`]}),_jsxs(_components.p,{children:[`Example: merchant prices a service at `,`$85 USD with $`,`5 shipping = $90 total, customer pays ₦144,000 NGN — set `,_jsx(_components.code,{children:`total_amount: 9000`}),`, `,_jsx(_components.code,{children:`total_currency: \"USD\"`}),`.`]}),_jsxs(Note,{children:[_jsx(_components.code,{children:`original_product_amount`}),` is accepted as a deprecated alias and will continue to work.`]})]}),`\n`,_jsxs(ParamField,{body:`merchant_currency`,type:`string`,required:true,id:`param-merchant-currency`,children:[_jsxs(_components.p,{children:[`ISO 4217 currency code for `,_jsx(_components.code,{children:`merchant_amount`}),`. This is the merchant’s (or sub-merchant’s) pricing currency.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No conversion:`}),` Pass the same value as `,_jsx(_components.code,{children:`charge_currency`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multicurrency / Marketplace:`}),` Pass the merchant’s baseline currency`]}),`\n`]}),_jsxs(Note,{children:[_jsx(_components.code,{children:`original_product_currency`}),` is accepted as a deprecated alias and will continue to work.`]})]}),`\n`,_jsxs(ParamField,{body:`converted_total_amount`,type:`integer`,id:`param-converted-total-amount`,children:[_jsxs(_components.p,{children:[`Your pre-computed conversion of `,_jsx(_components.code,{children:`merchant_amount`}),` into `,_jsx(_components.code,{children:`charge_currency`}),` (the customer’s payment currency). Optional — but `,_jsxs(_components.strong,{children:[`strongly recommended when `,_jsx(_components.code,{children:`merchant_currency`}),` differs from `,_jsx(_components.code,{children:`charge_currency`})]}),`.`]}),_jsx(_components.p,{children:`When provided, we cross-validate:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`converted_total_currency`}),` must equal `,_jsx(_components.code,{children:`charge_currency`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`converted_total_amount`}),` must equal `,_jsx(_components.code,{children:`charge_amount`}),` (within 1% tolerance)`]}),`\n`]}),_jsx(_components.p,{children:`This lets us catch discrepancies before hitting the exchange-rate API and gives you an explicit paper trail of what rate you applied.`}),_jsxs(_components.p,{children:[`Must be provided together with `,_jsx(_components.code,{children:`converted_total_currency`}),`.`]})]}),`\n`,_jsx(ParamField,{body:`converted_total_currency`,type:`string`,id:`param-converted-total-currency`,children:_jsxs(_components.p,{children:[`The currency of `,_jsx(_components.code,{children:`converted_total_amount`}),`. Must match `,_jsx(_components.code,{children:`charge_currency`}),`. Required when `,_jsx(_components.code,{children:`converted_total_amount`}),` is provided.`]})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Human-readable description of the charge. Shown on payment receipts.`})}),`\n`,_jsx(ParamField,{body:`reference`,type:`string`,id:`param-reference`,children:_jsx(_components.p,{children:`Your unique reference for this charge. Used for idempotency and reconciliation.`})}),`\n`,_jsxs(ParamField,{body:`callback_url`,type:`string`,id:`param-callback-url`,children:[_jsx(_components.p,{children:`Canonical redirect URL after payment.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Paystack:`}),` customer returns here after hosted checkout`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`StartButton:`}),` sent through as `,_jsx(_components.code,{children:`redirectUrl`}),` during payment initialization`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Embedded:`}),` use `,_jsx(_components.code,{children:`return_url`}),` in `,_jsx(_components.code,{children:`confirmPayment()`}),` on the client`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`redirectUrl`,type:`string`,id:`param-redirect-url`,children:_jsxs(_components.p,{children:[`Camel-case alias for `,_jsx(_components.code,{children:`callback_url`}),`. Useful for StartButton-oriented integrations.`]})}),`\n`,_jsx(ParamField,{body:`redirect_url`,type:`string`,id:`param-redirect-url-1`,children:_jsxs(_components.p,{children:[`Snake-case alias for `,_jsx(_components.code,{children:`callback_url`}),`.`]})}),`\n`,_jsx(ParamField,{body:`subscription_frequency_key`,type:`string`,id:`param-subscription-frequency-key`,children:_jsxs(_components.p,{children:[`Set to make this a recurring charge instead of a one-time payment — see `,_jsx(_components.a,{href:`/payments/subscriptions`,children:`Subscriptions`}),` for valid keys and behavior.`]})}),`\n`,_jsx(ParamField,{body:`customer`,type:`object`,required:true,id:`param-customer`,children:_jsxs(Expandable,{title:`Customer fields`,children:[_jsx(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Customer’s email address.`})}),_jsx(ParamField,{body:`first_name`,type:`string`,id:`param-first-name`,children:_jsx(_components.p,{children:`Customer’s first name.`})}),_jsx(ParamField,{body:`last_name`,type:`string`,id:`param-last-name`,children:_jsx(_components.p,{children:`Customer’s last name.`})}),_jsx(ParamField,{body:`country`,type:`string`,id:`param-country`,children:_jsxs(_components.p,{children:[`Customer country code or country name. Recommended for reporting, fee detection, and customer geography analytics. Examples: `,_jsx(_components.code,{children:`GH`}),`, `,_jsx(_components.code,{children:`NG`}),`, `,_jsx(_components.code,{children:`United States`}),`.`]})}),_jsx(ParamField,{body:`country_code`,type:`string`,id:`param-country-code`,children:_jsxs(_components.p,{children:[`Alias for `,_jsx(_components.code,{children:`customer.country`}),`. Use this if your checkout already stores ISO-2 country codes as `,_jsx(_components.code,{children:`country_code`}),`.`]})})]})}),`\n`,_jsx(ParamField,{body:`user_country`,type:`string`,id:`param-user-country`,children:_jsxs(_components.p,{children:[`Alias for `,_jsx(_components.code,{children:`customer.country`}),`. Accepted as a top-level field for storefronts that already send `,_jsx(_components.code,{children:`user_country`}),`.`]})}),`\n`,_jsx(ParamField,{body:`customer_country`,type:`string`,id:`param-customer-country`,children:_jsxs(_components.p,{children:[`Alias for `,_jsx(_components.code,{children:`customer.country`}),`. Accepted as a top-level field and inside `,_jsx(_components.code,{children:`metadata`}),`.`]})}),`\n`,_jsx(ParamField,{body:`country_code`,type:`string`,id:`param-country-code-1`,children:_jsxs(_components.p,{children:[`Alias for `,_jsx(_components.code,{children:`customer.country`}),`. Accepted as a top-level field.`]})}),`\n`,_jsx(ParamField,{body:`billing_country`,type:`string`,id:`param-billing-country`,children:_jsxs(_components.p,{children:[`Billing country fallback when `,_jsx(_components.code,{children:`customer.country`}),` is absent. Accepted as a top-level field and inside `,_jsx(_components.code,{children:`metadata`}),`.`]})}),`\n`,_jsx(ParamField,{body:`shipping_country`,type:`string`,id:`param-shipping-country`,children:_jsxs(_components.p,{children:[`Shipping country fallback when `,_jsx(_components.code,{children:`customer.country`}),` is absent. Accepted as a top-level field and inside `,_jsx(_components.code,{children:`metadata`}),`.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Send any country value you already have. Khaime normalizes common country names and ISO-2 codes, then stores the resolved value on the transaction for customer geography reports. If no country is provided, embedded/redirect card country may be used after payment; otherwise the transaction may appear as `,_jsx(_components.code,{children:`Unknown`}),` in geography analytics.`]})}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsxs(_components.p,{children:[`Custom key-value pairs attached to the charge. `,_jsx(_components.strong,{children:`Send strings, numbers, or booleans only`}),` — nested objects/arrays are not rejected by validation (there is no scalar-type check server-side), but they can fail silently downstream if the resolved gateway’s API rejects non-string metadata values. Treat this as a hard rule, not just a recommendation.`]}),_jsx(Expandable,{title:`Example`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"wc_order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"woocommerce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line_items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Widget`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`qty`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:2}]\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})})]}),`\n`,_jsx(ParamField,{body:`payment_gateway`,type:`string`,id:`param-payment-gateway`,children:_jsxs(_components.p,{children:[`Force a specific gateway instead of Khaime’s automatic currency-based routing (see `,_jsx(_components.a,{href:`/payments/gateway-routing`,children:`Gateway Routing`}),`). Only `,_jsx(_components.code,{children:`stripe`}),` or `,_jsx(_components.code,{children:`paystack`}),` are accepted — you cannot force `,_jsx(_components.code,{children:`startbutton`}),` or `,_jsx(_components.code,{children:`flutterwave`}),` through this field, regardless of currency.`]})}),`\n`,_jsxs(ParamField,{body:`preview`,type:`boolean`,default:`false`,id:`param-preview`,children:[_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, returns a fee and conversion breakdown `,_jsx(_components.strong,{children:`without creating any database records or calling any payment gateway`}),`. Use this to show the customer exactly what they’ll pay before initiating the real charge.`]}),_jsx(_components.p,{children:`All validation still runs — amount mismatch, currency conversion, sub-merchant, etc. — so a successful preview response means your actual charge will go through.`}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`#preview-mode`,children:`Preview Mode`}),` below for the response shape.`]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`marketplace-fields`,children:`Marketplace fields`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This field is only relevant if your account is set up as a `,_jsx(_components.strong,{children:`marketplace operator`}),`. See `,_jsx(_components.a,{href:`/api-reference/marketplace/setup`,children:`Setup Marketplace`}),` to enable marketplace mode.`]})}),`\n`,_jsxs(ParamField,{body:`sub_merchant_id`,type:`integer`,id:`param-sub-merchant-id`,children:[_jsxs(_components.p,{children:[`The Khaime business ID of the sub-merchant this charge is being collected for. Must have `,_jsx(_components.code,{children:`active`}),` status in your marketplace.`]}),_jsxs(_components.p,{children:[`When present, the charge is split between the sub-merchant and you. See `,_jsx(_components.strong,{children:`How the split works`}),` below.`]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`How the split works`})}),`\n`,_jsx(_components.p,{children:`On webhook receipt after a successful payment:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The sub-merchant’s wallet`}),` is credited with `,_jsx(_components.code,{children:`merchant_amount`}),` minus Khaime’s fee and your commission.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your wallet`}),` is credited with your commission.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Each credit is in the currency the customer paid (`,_jsx(_components.code,{children:`charge_currency`}),`) when that business `,_jsx(_components.a,{href:`/payments/multicurrency#holding-currencies`,children:`holds it`}),`. Otherwise it is in the business’s settlement currency, converted at the market rate when needed.`]}),`\n`,_jsx(_components.p,{children:`Commission is resolved in this order:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Per-merchant `,_jsx(_components.code,{children:`commission_rate`}),` set via `,_jsx(_components.a,{href:`/api-reference/marketplace/update-commission`,children:`Update Commission`})]}),`\n`,_jsxs(_components.li,{children:[`Your portfolio default `,_jsx(_components.code,{children:`marketplace_commission_rate`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`0`}),` if neither is set`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The sub-merchant wallet transaction stores the full breakdown in `,_jsx(_components.code,{children:`conversion_details`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"marketplace_split\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"marketplace_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"charge_currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NGN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gross_product_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`140000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"commission_rate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.05`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"commission_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"net_credited\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`133000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cart_identifier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intent_abc123\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The sub-merchant must have `,_jsx(_components.code,{children:`status: active`}),` in your marketplace. Pending or suspended sub-merchants will be skipped — your marketplace wallet will still be credited normally.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`The response varies based on which gateway Khaime routes to:`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Embedded`,id:`embedded`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"charge_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"charge_a1b2c3d4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_gateway\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stripe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"client_secret\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pi_3Abc_secret_Xyz\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"publishable_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pk_test_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"merchant_account_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"acct_1ABC...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fee_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"base_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_fee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`320`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5320`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_pays_fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`client_secret`}),` and `,_jsx(_components.code,{children:`publishable_key`}),` to mount the embedded payment element. When `,_jsx(_components.code,{children:`merchant_account_id`}),` is present (direct/marketplace charges), pass it as `,_jsx(_components.code,{children:`connectedAccount`}),` when initializing Khaime Payment SDK.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Want `,_jsx(_components.strong,{children:`Apple Pay / Google Pay`}),` in the Payment Element? Register your checkout domain first — see `,_jsx(_components.a,{href:`/api-reference/payments/register-payment-method-domain`,children:`Register Payment Method Domain`}),`.`]})})]}),_jsxs(Tab,{title:`Paystack`,id:`paystack`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"charge_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"charge_e5f6g7h8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_gateway\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paystack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://checkout.paystack.com/abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"access_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0peioxfhpn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"paystack_reference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intent_a1b2c3d4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"789\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fee_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"base_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`750000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_fee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`48000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`798000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_pays_fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Redirect the customer to `,_jsx(_components.code,{children:`payment_url`}),`. They return to your `,_jsx(_components.code,{children:`callback_url`}),` after payment.`]})]}),_jsxs(Tab,{title:`StartButton / Flutterwave`,id:`startbutton-%2F-flutterwave`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"charge_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"intent_0abc2d3c-558e-4db8-80bf-b2c267203f64\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_gateway\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"startbutton\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://pay-sandbox.startbutton.tech/#/shc-arw6qxtuxa\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startbutton_reference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sb_1776282522145_2lgw9sczh\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25563`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GHS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pending\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"live\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"one_time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order #2496 from testing-khaime-woocommerce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"partner_reference\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"wc_2496_xHzrUp9r\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`6815`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_v2_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`32875`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fee_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"base_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25563`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_fee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1534`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25563`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_pays_fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_international\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Redirect the customer to `,_jsx(_components.code,{children:`payment_url`}),`. If you supplied `,_jsx(_components.code,{children:`callback_url`}),`, `,_jsx(_components.code,{children:`redirectUrl`}),`, or `,_jsx(_components.code,{children:`redirect_url`}),`, Khaime forwards the resolved redirect to the gateway and stores it in metadata for downstream processing. Which of StartButton or Flutterwave handles a given African currency is a platform configuration detail — the response shape is the same either way (`,_jsx(_components.code,{children:`payment_gateway`}),` reflects whichever was used).`]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`gateway-routing`,children:`Gateway routing`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`charge_currency`}),` field determines which gateway processes the payment — see `,_jsx(_components.a,{href:`/payments/gateway-routing`,children:`Gateway Routing`}),` for the full mapping:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Currency`}),_jsx(_components.th,{children:`Gateway`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`NGN`}),_jsx(_components.td,{children:`Paystack`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`GHS, KES, ZAR, TZS, UGX, XAF, XOF`}),_jsx(_components.td,{children:`Flutterwave or StartButton`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`USD, EUR, GBP, CAD, AUD, and most other supported currencies`}),_jsx(_components.td,{children:`Stripe`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`preview-mode`,children:`Preview mode`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`\"preview\": true`}),` in the request body to calculate fees and FX conversion without creating a charge. The response is identical in structure to a normal charge response except:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`preview: true`}),` is set at the top level`]}),`\n`,_jsxs(_components.li,{children:[`No `,_jsx(_components.code,{children:`charge_id`}),`, `,_jsx(_components.code,{children:`client_secret`}),`, `,_jsx(_components.code,{children:`payment_url`}),`, or `,_jsx(_components.code,{children:`transaction_id`}),` — no gateway was called`]}),`\n`,_jsx(_components.li,{children:`No database records are created`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Charge preview calculated successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_gateway\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paystack\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_international\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"business_country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"US\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NG\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NGN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"base_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1440000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"transaction_fee\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`92160`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_charged\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1440000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pays_fees\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"business\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"priced_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"original_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`9000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"original_currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"converted_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1440000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"converted_currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NGN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exchange_rate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1600`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`customer`}),` and `,_jsx(_components.code,{children:`business`}),` are always in `,_jsx(_components.strong,{children:`different currencies`}),` when multicurrency is involved — do not compare `,_jsx(_components.code,{children:`customer.base_amount`}),` with `,_jsx(_components.code,{children:`business.priced_amount`}),` directly. Use the `,_jsx(_components.code,{children:`conversion.exchange_rate`}),` to relate them. `,_jsx(_components.code,{children:`conversion`}),` is only present when `,_jsx(_components.code,{children:`charge_currency`}),` differs from `,_jsx(_components.code,{children:`merchant_currency`}),`.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Typical workflow:`})}),`\n`,_jsx(CodeBlock,{numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. POST /payments/charge { preview: true, ...fields }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` → Show breakdown to customer`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. Customer confirms`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`3. POST /payments/charge { ...same fields, no preview }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` → Actual charge created, payment URL / client secret returned`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`amount-validation-double-check`,children:`Amount validation (double check)`}),`\n`,_jsx(_components.p,{children:`Both you and Khaime calculate the charge amount independently — they must match.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Your workflow:`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Call `,_jsx(_components.a,{href:`/api-reference/products/calculate-pricing`,children:`/pricing/calculate`}),` with your `,_jsx(_components.code,{children:`merchant_amount`}),` as `,_jsx(_components.code,{children:`amount`}),`, and `,_jsx(_components.code,{children:`target_currency`})]}),`\n`,_jsxs(_components.li,{children:[`Use the returned `,_jsx(_components.code,{children:`local.amount`}),` as your `,_jsx(_components.code,{children:`charge_amount`}),` in the charge request`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, pass `,_jsx(_components.code,{children:`converted_total_amount`}),` and `,_jsx(_components.code,{children:`converted_total_currency`}),` to make your pre-computed conversion explicit`]}),`\n`,_jsx(_components.li,{children:`We recalculate using the same conversion service and verify they match`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Why double validation?`}),` This ensures both parties agree on the conversion. If there’s a mismatch, something is wrong — either a bug, stale rate, or manipulation attempt.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`There are two different tolerance checks, easy to conflate: if you supply `,_jsx(_components.code,{children:`converted_total_amount`}),`, it’s compared against `,_jsx(_components.code,{children:`charge_amount`}),` with a `,_jsx(_components.strong,{children:`1% tolerance`}),`. Separately, whenever the server recalculates the expected charge amount itself (the normal path when `,_jsx(_components.code,{children:`converted_total_amount`}),` is omitted), it uses a wider `,_jsx(_components.strong,{children:`2% tolerance`}),` to absorb exchange-rate cache drift between your request and Khaime’s own rate refresh.`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 1: Get the converted amount`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.khaime.com/api/v1/pricing/calculate?amount=9000\u0026target_currency=NGN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Returns: { \"local\": { \"amount\": 1440000, \"currency\": \"NGN\" } }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Step 2: Use that amount in your charge`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.khaime.com/api/v1/payments/charge\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 9000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`error-codes`,children:`Error codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Error code`}),_jsx(_components.th,{children:`Message`}),_jsx(_components.th,{children:`Fix`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_AMOUNT_MISMATCH`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Amount mismatch`})}),_jsxs(_components.td,{children:[`Your `,_jsx(_components.code,{children:`charge_amount`}),` doesn’t match our calculation. Use `,_jsx(_components.code,{children:`/pricing/calculate`}),` to get the correct amount.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_AMOUNT_MISMATCH`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`converted_total_amount does not match amount`})}),_jsxs(_components.td,{children:[`Your pre-computed conversion differs from `,_jsx(_components.code,{children:`charge_amount`}),`. Ensure both represent the charge total in the same currency.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_AMOUNT_MISMATCH`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`converted_total_currency must match the charge currency`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`converted_total_currency`}),` must equal `,_jsx(_components.code,{children:`charge_currency`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_MISSING_FIELD`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Both converted_total_amount and converted_total_currency must be provided together`})}),_jsx(_components.td,{children:`Supply both fields or neither.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"charge_amount\" is required`}),` (likewise `,_jsx(_components.code,{children:`charge_currency`}),`, `,_jsx(_components.code,{children:`merchant_amount`}),`, `,_jsx(_components.code,{children:`merchant_currency`}),`)`]}),_jsxs(_components.td,{children:[`Include all four. The earlier names `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`currency`}),`, `,_jsx(_components.code,{children:`total_amount`}),` and `,_jsx(_components.code,{children:`total_currency`}),` are not accepted.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_MISSING_FIELD`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Missing required fields: amount, currency, customer.email`})}),_jsxs(_components.td,{children:[`Include `,_jsx(_components.code,{children:`customer.email`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_CURRENCY_UNSUPPORTED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Unable to convert from X to Y`})}),_jsx(_components.td,{children:`Currency conversion failed — try again or use a supported currency.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`BUSINESS_NOT_FOUND`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Merchant not found`})}),_jsx(_components.td,{children:`The authenticated merchant record couldn’t be resolved.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Invalid API key`}),_jsxs(_components.td,{children:[`Check your `,_jsx(_components.code,{children:`X-API-Key`}),` header.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:_jsx(_components.em,{children:`(no validation error)`})}),_jsxs(_components.td,{children:[`Nested metadata values are `,_jsx(_components.strong,{children:`not rejected`}),` at request time — there is no server-side scalar check. A gateway may reject them downstream instead. Keep metadata values scalar as a precaution, not because you’ll get a clean error if you don’t.`]}),_jsx(_components.td,{})]})]})]}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`whys`,children:`Whys`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`merchant_amount`}),` / `,_jsx(_components.code,{children:`merchant_currency`}),` are required (not just `,_jsx(_components.code,{children:`charge_amount`}),` / `,_jsx(_components.code,{children:`charge_currency`}),`) because they’re the source of truth for what the merchant is owed — `,_jsx(_components.code,{children:`charge_amount`}),` alone tells Khaime what the customer paid, but not what that should convert back to for wallet crediting. Requiring both, plus the double-validation described above, lets Khaime catch a wrong conversion before money moves rather than after. Marketplace commission resolves through a fallback chain (per-merchant rate → portfolio default → zero) so operators can set sane platform-wide defaults without having to configure every sub-merchant individually.`]}),`\n`,_jsx(Heading,{level:`2`,id:`why-nots`,children:`Why nots`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`This endpoint does not require a Khaime catalog product — if you want catalog-backed checkout instead, use `,_jsx(_components.a,{href:`/api-reference/payments/create-session`,children:`Create Payment Intent`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`payment_gateway`}),` cannot force `,_jsx(_components.code,{children:`startbutton`}),` or `,_jsx(_components.code,{children:`flutterwave`}),` — only `,_jsx(_components.code,{children:`stripe`}),` and `,_jsx(_components.code,{children:`paystack`}),` are valid overrides.`]}),`\n`,_jsx(_components.li,{children:`Metadata values are not schema-validated for type — sending nested objects/arrays won’t be rejected here, but can fail silently at the gateway. Keep values scalar.`}),`\n`,_jsxs(_components.li,{children:[`A charge to a pending or suspended sub-merchant is not rejected outright — it’s silently skipped for the sub-merchant credit while your marketplace wallet is still credited normally, so check `,_jsx(_components.code,{children:`sub_merchant_id`}),` status ahead of time if the split is load-bearing for your flow.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Charge","api":"POST /payments/charge","description":"Create a product-agnostic payment charge.","href":"/api-reference/payments/create-charge"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[431,436,"RequestExample,Tab,T"],[769,786,"RequestExample)_missingMdxReference(`RequestExample`,true);if(!Tab)_missingMdxRe"],[74806,77414,"_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Preview charge (fee breakdown only)`,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.khaime.com/api/v1/payments/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"preview\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 9000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Design consultation\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Jane\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Doe\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"NG\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Standard charge (same currency)`,numberOfLines:`22`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.khaime.com/api/v1/payments/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 5000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 5000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Order #123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference\": \"wc_123_abc\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"callback_url\": \"https://store.example.com/order-received/123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"jane@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Jane\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Doe\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"US\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"wc_order_id\": \"123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"source\": \"woocommerce\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Multicurrency (merchant prices in USD, customer pays NGN)`,numberOfLines:`23`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# First: GET /pricing/calculate?amount=9000\u0026target_currency=NGN → returns 1440000`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.khaime.com/api/v1/payments/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 9000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Design consultation + shipping\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference\": \"consult_0042\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"client@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Emeka\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Eze\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"NG\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"service_type\": \"design_consultation\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Marketplace (NGN customer, NGN sub-merchant)`,numberOfLines:`22`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.khaime.com/api/v1/payments/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 140000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 140000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Handmade leather bag - Ade Leatherworks\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference\": \"order_8821\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sub_merchant_id\": 42,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"buyer@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Tunde\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Bello\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"NG\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_id\": \"8821\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vendor\": \"ade-leatherworks\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Marketplace (NGN customer, USD sub-merchant)`,numberOfLines:`24`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`24`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# First: GET /pricing/calculate?amount=9000\u0026target_currency=NGN → returns 1440000`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.khaime.com/api/v1/payments/charge`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: pk_sandbox_your_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"charge_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_amount\": 9000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"merchant_currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_amount\": 1440000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"converted_total_currency\": \"NGN\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"Design consultation - Jane Designs\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference\": \"consult_0043\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sub_merchant_id\": 77,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"client@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Emeka\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Eze\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"NG\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"metadata\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"service_type\": \"design_consultation\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`whys`,children:`Whys`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`merchant_amount`}),` / `,_jsx(_components.code,{children:`merchant_currency`}),` are required (not just `,_jsx(_components.code,{children:`charge_amount`}),` / `,_jsx(_components.code,{children:`charge_currency`}),`) because they’re the source of truth for what the merchant is owed — `,_jsx(_components.code,{children:`charge_amount`}),` alone tells Khaime what the customer paid, but not what that should convert back to for wallet crediting. Requiring both, plus the double-validation described above, lets Khaime catch a wrong conversion before money moves rather than after. Marketplace commission resolves through a fallback chain (per-merchant rate → portfolio default → zero) so operators can set sane platform-wide defaults without having to configure every sub-merchant individually.`]}),`\n`,_jsx(Heading,{level:`2`,id:`why-nots`,children:`Why nots`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`This endpoint does not require a Khaime catalog product — if you want catalog-backed checkout instead, use `,_jsx(_components.a,{href:`/api-reference/payments/create-session`,children:`Create Payment Intent`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`payment_gateway`}),` cannot force `,_jsx(_components.code,{children:`startbutton`}),` or `,_jsx(_components.code,{children:`flutterwave`}),` — only `,_jsx(_components.code,{children:`stripe`}),` and `,_jsx(_components.code,{children:`paystack`}),` are valid overrides.`]}),`\n`,_jsx(_components.li,{children:`Metadata values are not schema-validated for type — sending nested objects/arrays won’t be rejected here, but can fail silently at the gateway. Keep values scalar.`}),`\n`,_jsxs(_components.li,{children:[`A charge to a pending or suspended sub-merchant is not rejected outright — it’s silently skipped for the sub-merchant credit while your marketplace wallet is still credited normally, so check `,_jsx(_components.code,{children:`sub_merchant_id`}),` status ahead of time if the split is load-bearing for your flow.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"Intro","slug":"intro","depth":2,"children":[]},{"title":"Context","slug":"context","depth":2,"children":[]},{"title":"Hows","slug":"hows","depth":2,"children":[{"title":"Request body","slug":"request-body","depth":3,"children":[]},{"title":"Marketplace fields","slug":"marketplace-fields","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Gateway routing","slug":"gateway-routing","depth":3,"children":[]},{"title":"Preview mode","slug":"preview-mode","depth":3,"children":[]},{"title":"Amount validation (double check)","slug":"amount-validation-double-check","depth":3,"children":[]},{"title":"Error codes","slug":"error-codes","depth":3,"children":[]}]},{"title":"Whys","slug":"whys","depth":2,"children":[]},{"title":"Why nots","slug":"why-nots","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Preview charge (fee breakdown only)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.khaime.com/api/v1/payments/charge\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-Key: pk_sandbox_your_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"preview\": true,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_amount\": 1440000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_amount\": 9000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Design consultation\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"first_name\": \"Jane\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"last_name\": \"Doe\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"NG\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Standard charge (same currency)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"22\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.khaime.com/api/v1/payments/charge\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-Key: pk_sandbox_your_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_amount\": 5000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_amount\": 5000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Order #123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"reference\": \"wc_123_abc\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"callback_url\": \"https://store.example.com/order-received/123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"jane@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"first_name\": \"Jane\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"last_name\": \"Doe\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"US\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"wc_order_id\": \"123\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"source\": \"woocommerce\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Multicurrency (merchant prices in USD, customer pays NGN)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"23\">\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># First: GET /pricing/calculate?amount=9000\u0026#x26;target_currency=NGN → returns 1440000\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.khaime.com/api/v1/payments/charge\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-Key: pk_sandbox_your_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_amount\": 1440000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_amount\": 9000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"converted_total_amount\": 1440000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"converted_total_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Design consultation + shipping\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"reference\": \"consult_0042\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"client@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"first_name\": \"Emeka\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"last_name\": \"Eze\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"NG\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"service_type\": \"design_consultation\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Marketplace (NGN customer, NGN sub-merchant)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"22\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.khaime.com/api/v1/payments/charge\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-Key: pk_sandbox_your_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_amount\": 140000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_amount\": 140000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Handmade leather bag - Ade Leatherworks\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"reference\": \"order_8821\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"sub_merchant_id\": 42,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"buyer@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"first_name\": \"Tunde\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"last_name\": \"Bello\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"NG\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"order_id\": \"8821\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"vendor\": \"ade-leatherworks\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Marketplace (NGN customer, USD sub-merchant)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"24\">\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># First: GET /pricing/calculate?amount=9000\u0026#x26;target_currency=NGN → returns 1440000\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api.khaime.com/api/v1/payments/charge\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"X-API-Key: pk_sandbox_your_key\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_amount\": 1440000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"charge_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_amount\": 9000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"merchant_currency\": \"USD\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"converted_total_amount\": 1440000,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"converted_total_currency\": \"NGN\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"Design consultation - Jane Designs\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"reference\": \"consult_0043\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"sub_merchant_id\": 77,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"customer\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"email\": \"client@example.com\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"first_name\": \"Emeka\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"last_name\": \"Eze\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"country\": \"NG\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"metadata\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"service_type\": \"design_consultation\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Charge","path":"/payments/charge","servers":[{"url":"https://api.khaime.com/api/v1"},{"url":"https://api.khaimedev.com/api/v1"},{"url":"http://localhost:5050/api/v1"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"X-API-Key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"charge_amount":[{"type":"integer","description":"Charge amount in smallest currency unit (cents, kobo) — the customer’s payment currency . Must be calculated using /pricing/calculate when currency conversion is involved — we validate it matches our calculation.","required":true}],"charge_currency":[{"type":"string","description":"3-letter ISO currency code for what the customer pays . Example: `USD` , `NGN` , `GBP`","required":true}],"merchant_amount":[{"type":"integer","description":"The full amount the merchant is collecting, in smallest currency unit of `merchant_currency` . This is inclusive of all fees (shipping, handling, etc.) — not just the base product price. Why required: This field is the source of truth for what gets credited to the merchant’s wallet, and anchors our server-side conversion when multicurrency is involved. No conversion: Pass the same value as `charge_amount` Multicurrency: Pass the total in the merchant’s baseline currency (e.g. `8500` for $85.00 USD) Marketplace: Pass the total in the sub-merchant’s baseline currency Example: merchant prices a service at $85 USD with $ 5 shipping = $90 total, customer pays ₦144,000 NGN — set `total_amount: 9000` , `total_currency: \"USD\"` .","required":true}],"merchant_currency":[{"type":"string","description":"ISO 4217 currency code for `merchant_amount` . This is the merchant’s (or sub-merchant’s) pricing currency. No conversion: Pass the same value as `charge_currency` Multicurrency / Marketplace: Pass the merchant’s baseline currency","required":true}],"converted_total_amount":[{"type":"integer","description":"Your pre-computed conversion of `merchant_amount` into `charge_currency` (the customer’s payment currency). Optional — but strongly recommended when `merchant_currency` differs from `charge_currency` . When provided, we cross-validate: `converted_total_currency` must equal `charge_currency` `converted_total_amount` must equal `charge_amount` (within 1% tolerance) This lets us catch discrepancies before hitting the exchange-rate API and gives you an explicit paper trail of what rate you applied. Must be provided together with `converted_total_currency` ."}],"converted_total_currency":[{"type":"string","description":"The currency of `converted_total_amount` . Must match `charge_currency` . Required when `converted_total_amount` is provided."}],"description":[{"type":"string","description":"Human-readable description of the charge. Shown on payment receipts."}],"reference":[{"type":"string","description":"Your unique reference for this charge. Used for idempotency and reconciliation."}],"callback_url":[{"type":"string","description":"Canonical redirect URL after payment. Paystack: customer returns here after hosted checkout StartButton: sent through as `redirectUrl` during payment initialization Embedded: use `return_url` in `confirmPayment()` on the client"}],"redirectUrl":[{"type":"string","description":"Camel-case alias for `callback_url` . Useful for StartButton-oriented integrations."}],"redirect_url":[{"type":"string","description":"Snake-case alias for `callback_url` ."}],"subscription_frequency_key":[{"type":"string","description":"Set to make this a recurring charge instead of a one-time payment — see Subscriptions for valid keys and behavior."}],"customer":[{"type":"object","properties":{"email":[{"type":"string","description":"Customer’s email address.","required":true}],"first_name":[{"type":"string","description":"Customer’s first name."}],"last_name":[{"type":"string","description":"Customer’s last name."}],"country":[{"type":"string","description":"Customer country code or country name. Recommended for reporting, fee detection, and customer geography analytics. Examples: `GH` , `NG` , `United States` ."}],"country_code":[{"type":"string","description":"Alias for `customer.country` . Use this if your checkout already stores ISO-2 country codes as `country_code` ."}]},"required":true}],"user_country":[{"type":"string","description":"Alias for `customer.country` . Accepted as a top-level field for storefronts that already send `user_country` ."}],"customer_country":[{"type":"string","description":"Alias for `customer.country` . Accepted as a top-level field and inside `metadata` ."}],"country_code":[{"type":"string","description":"Alias for `customer.country` . Accepted as a top-level field."}],"billing_country":[{"type":"string","description":"Billing country fallback when `customer.country` is absent. Accepted as a top-level field and inside `metadata` ."}],"shipping_country":[{"type":"string","description":"Shipping country fallback when `customer.country` is absent. Accepted as a top-level field and inside `metadata` ."}],"metadata":[{"type":"object","properties":{},"description":"Custom key-value pairs attached to the charge. Send strings, numbers, or booleans only — nested objects/arrays are not rejected by validation (there is no scalar-type check server-side), but they can fail silently downstream if the resolved gateway’s API rejects non-string metadata values. Treat this as a hard rule, not just a recommendation."}],"payment_gateway":[{"type":"string","description":"Force a specific gateway instead of Khaime’s automatic currency-based routing (see Gateway Routing ). Only `stripe` or `paystack` are accepted — you cannot force `startbutton` or `flutterwave` through this field, regardless of currency."}],"preview":[{"type":"boolean","description":"When `true` , returns a fee and conversion breakdown without creating any database records or calling any payment gateway . Use this to show the customer exactly what they’ll pay before initiating the real charge. All validation still runs — amount mismatch, currency conversion, sub-merchant, etc. — so a successful preview response means your actual charge will go through. See Preview Mode below for the response shape."}],"sub_merchant_id":[{"type":"integer","description":"The Khaime business ID of the sub-merchant this charge is being collected for. Must have `active` status in your marketplace. When present, the charge is split between the sub-merchant and you. See How the split works below."}]}}],"examples":{"example":{"value":{"charge_amount":123,"charge_currency":"\u003cstring>","merchant_amount":123,"merchant_currency":"\u003cstring>","converted_total_amount":123,"converted_total_currency":"\u003cstring>","description":"\u003cstring>","reference":"\u003cstring>","callback_url":"\u003cstring>","redirectUrl":"\u003cstring>","redirect_url":"\u003cstring>","subscription_frequency_key":"\u003cstring>","customer":{"email":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","country":"\u003cstring>","country_code":"\u003cstring>"},"user_country":"\u003cstring>","customer_country":"\u003cstring>","country_code":"\u003cstring>","billing_country":"\u003cstring>","shipping_country":"\u003cstring>","metadata":{},"payment_gateway":"\u003cstring>","preview":true,"sub_merchant_id":123}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"khaimeai-4786d0b2","siteName":"Khaime Documentation","title":"Create Charge - Khaime Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T20:02:37.792Z","originalFileLocation":"api-reference/payments/create-charge.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a product-agnostic payment charge.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Khaime Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/x-icon\" sizes=\"180x180\" href=\"https://app.khaime.com/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"32x32\" href=\"https://app.khaime.com/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"16x16\" href=\"https://app.khaime.com/favicon.ico\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://app.khaime.com/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Charge - Khaime Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a product-agnostic payment charge.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Khaime Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.khaime.com/api-reference/payments/create-charge\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://khaimeai-4786d0b2.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Create+Charge\u0026amp;description=Create+a+product-agnostic+payment+charge.\u0026amp;theme=ca430f12ef21b225783627af\u0026amp;signature=fea6bf9879170f260200aa790c63dab723b4bc110687745b25fb596518bae3b7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Charge - Khaime Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a product-agnostic payment charge.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://khaimeai-4786d0b2.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Create+Charge\u0026amp;description=Create+a+product-agnostic+payment+charge.\u0026amp;theme=ca430f12ef21b225783627af\u0026amp;signature=fea6bf9879170f260200aa790c63dab723b4bc110687745b25fb596518bae3b7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/khaimeai-4786d0b2/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Khaime Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#42c3ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.khaime.com/api-reference/payments/create-charge\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/payments/create-charge.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Khaime Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Khaime Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/payments/create-charge.md","siteName":"Khaime Documentation","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/khaime"},{"anchor":"Status","icon":"signal","href":"https://status.khaime.com"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Core Concepts","href":"/concepts"},{"title":"AI shopping agents","href":"/agents/overview"}]},{"group":"Payments","pages":[{"title":"Payments Overview","href":"/payments/overview"},{"title":"Multicurrency","href":"/payments/multicurrency"},{"title":"Gateway Routing","href":"/payments/gateway-routing"},{"title":"Subscriptions","href":"/payments/subscriptions"},{"title":"Installments","href":"/payments/installments"},{"title":"Refunds","href":"/payments/refunds"}]},{"group":"Webhooks","pages":[{"title":"Webhooks Overview","href":"/webhooks/overview"},{"title":"Webhook Events","href":"/webhooks/events"},{"title":"Signature Verification","href":"/webhooks/verification"},{"title":"API Versioning","href":"/webhooks/versioning"},{"title":"Best Practices","href":"/webhooks/best-practices"}]},{"group":"Analytics","pages":[{"title":"Store Pulse for API integrations","href":"/store-pulse/api-integrations"}]}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Overview","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Account","pages":[{"title":"Get Account Info","api":"GET https://api.khaime.com/api/v1/account","href":"/api-reference/account/get-account"}]},{"group":"Store Data","pages":[{"title":"Store data overview","href":"/api-reference/store-data/overview"},{"title":"Get traffic headline","api":"GET https://api.khaime.com/api/v1/analytics/headline","href":"/api-reference/store-data/headline"},{"title":"Get checkout funnel","api":"GET https://api.khaime.com/api/v1/analytics/funnel","href":"/api-reference/store-data/funnel"},{"title":"Get traffic sources","api":"GET https://api.khaime.com/api/v1/analytics/sources","href":"/api-reference/store-data/sources"},{"title":"Get top countries","api":"GET https://api.khaime.com/api/v1/analytics/countries","href":"/api-reference/store-data/countries"},{"title":"Get product performance","api":"GET https://api.khaime.com/api/v1/analytics/products","href":"/api-reference/store-data/products"},{"title":"Get live visitors","api":"GET https://api.khaime.com/api/v1/analytics/live","href":"/api-reference/store-data/live"},{"title":"Get sales summary","api":"GET https://api.khaime.com/api/v1/analytics/sales","href":"/api-reference/store-data/sales"},{"title":"List business orders","api":"GET https://api.khaime.com/api/v1/analytics/orders","href":"/api-reference/store-data/list-orders"},{"title":"Get business order","api":"GET https://api.khaime.com/api/v1/analytics/orders/{order_id}","href":"/api-reference/store-data/get-order"},{"title":"List customers","api":"GET https://api.khaime.com/api/v1/analytics/customers","href":"/api-reference/store-data/list-customers"}]},{"group":"Products \u0026 Pricing","pages":[{"title":"List Products","api":"GET /products","href":"/api-reference/products/list-products"},{"title":"Get Product Pricing","api":"GET /product/{product_id}/pricing","href":"/api-reference/products/get-pricing"},{"title":"Calculate Pricing","api":"GET /pricing/calculate","href":"/api-reference/products/calculate-pricing"},{"title":"Get Currencies","api":"GET /currencies","href":"/api-reference/products/get-currencies"}]},{"group":"Payments","pages":[{"title":"Create Payment Intent","api":"POST /payment/intent","href":"/api-reference/payments/create-intent"},{"title":"Create Payment Session","api":"POST /payments/sessions","href":"/api-reference/payments/create-session"},{"title":"Get Session","api":"GET /payments/sessions/{session_id}","href":"/api-reference/payments/get-session"},{"title":"Get Transaction","api":"GET /transactions/{transaction_id}","href":"/api-reference/payments/get-transaction"},{"title":"Register Payment Method Domain","api":"POST /payment-method-domains","href":"/api-reference/payments/register-payment-method-domain"},{"title":"Get Payment Method Domain Status","api":"GET /payment-method-domains/status","href":"/api-reference/payments/payment-method-domain-status"}]},{"group":"Integration Guides","pages":[{"title":"Prices, Fees and Totals","href":"/api-reference/pricing-and-checkout-guide"},{"title":"Build a Complete Checkout","href":"/api-reference/checkout-tutorial"},{"title":"Checkout Integration Guide","href":"/api-reference/checkout-integration-guide"},{"title":"API Response Schemas","href":"/api-reference/api-response-schemas"},{"title":"SDK Quick Reference","href":"/api-reference/sdk-quick-reference"}]},{"group":"Commerce API","pages":[{"title":"Commerce API Overview","href":"/api-reference/commerce/overview"},{"title":"List Products","api":"GET /products","href":"/api-reference/commerce/list-products"},{"title":"Get Product","api":"GET /product/{id}","href":"/api-reference/commerce/get-product"},{"title":"Register Customer","api":"POST /register","href":"/api-reference/commerce/register"},{"title":"Customer Login","api":"POST /login","href":"/api-reference/commerce/login"},{"title":"Validate Coupon","api":"POST /coupon/validate","href":"/api-reference/commerce/validate-coupon"},{"title":"Validate Cart","api":"POST /cart/validate","href":"/api-reference/commerce/validate-cart"},{"title":"Preview Payment","api":"POST /cart-payment/preview","href":"/api-reference/commerce/cart-payment-preview"},{"title":"Create Product Payment Intent","api":"POST /product-payment/intent","href":"/api-reference/commerce/payment-intent"},{"title":"Digital Product Cart Checkout","href":"/api-reference/commerce/digital-cart-checkout"},{"title":"List Orders","api":"GET /orders","href":"/api-reference/commerce/list-orders"},{"title":"Get Order","api":"GET /order/{id}","href":"/api-reference/commerce/get-order"},{"title":"Product Custom Fields","href":"/api-reference/commerce/product-custom-fields"}]},{"group":"Subscriptions","pages":[{"title":"List Subscriptions","api":"GET /subscriptions","href":"/api-reference/subscriptions/list-subscriptions"},{"title":"Get Subscription","api":"GET /subscriptions/{subscription_id}","href":"/api-reference/subscriptions/get-subscription"},{"title":"Cancel Subscription","api":"PATCH /subscriptions/{subscription_id}/cancel","href":"/api-reference/subscriptions/cancel-subscription"}]},{"group":"Installments","pages":[{"title":"Installment Quote","api":"GET /products/{product_id}/installment-quote","href":"/api-reference/installments/quote"},{"title":"Installment Checkout","api":"POST /installment-plans/checkout","href":"/api-reference/installments/checkout"},{"title":"List Installment Plans","api":"GET /installment-plans","href":"/api-reference/installments/list"},{"title":"Get Installment Plan","api":"GET /installment-plans/{plan_id}","href":"/api-reference/installments/get"},{"title":"Charge Installment","api":"POST /installment-plans/{plan_id}/installments/{position}/charge","href":"/api-reference/installments/charge"},{"title":"Installment Pay Link","api":"POST /installment-plans/{plan_id}/installments/{position}/pay-link","href":"/api-reference/installments/pay-link"},{"title":"Cancel Installment Plan","api":"PATCH /installment-plans/{plan_id}/cancel","href":"/api-reference/installments/cancel"}]},{"group":"Marketplace","pages":[{"title":"Setup Marketplace","href":"/api-reference/marketplace/setup"},{"title":"Create Merchant","api":"POST /merchants","href":"/api-reference/marketplace/create-merchant"},{"title":"Link Merchant","api":"POST /merchants/link","href":"/api-reference/marketplace/link-merchant"},{"title":"Import Merchants","api":"POST /merchants/import","href":"/api-reference/marketplace/import-merchants"},{"title":"Get Merchant Details","api":"GET /merchants/{merchantId}","href":"/api-reference/marketplace/get-merchant"},{"title":"Update Merchant","api":"PATCH /merchants/{merchantId}","href":"/api-reference/marketplace/update-merchant"},{"title":"Remove Merchant","api":"DELETE /merchants/{merchantId}","href":"/api-reference/marketplace/remove-merchant"},{"title":"Update Commission","api":"PATCH /merchants/{merchantId}/commission","href":"/api-reference/marketplace/update-commission"},{"title":"Update Holding Currencies","api":"PATCH /merchants/{merchantId}/holding-currencies","href":"/api-reference/marketplace/update-holding-currencies"},{"title":"Get My Marketplace","api":"GET /marketplace","href":"/api-reference/marketplace/my-marketplace"},{"title":"Submit Merchant KYC","api":"POST /merchants/{merchantId}/kyc","href":"/api-reference/marketplace/submit-kyc"},{"title":"Get Merchant KYC Status","api":"GET /merchants/{merchantId}/kyc","href":"/api-reference/marketplace/get-kyc-status"},{"title":"Resubmit Merchant KYC","api":"POST /merchants/{merchantId}/kyc/resubmit","href":"/api-reference/marketplace/resubmit-kyc"},{"title":"Get Merchant Balance","api":"GET /merchants/{merchantId}/balance","href":"/api-reference/marketplace/get-balance"},{"title":"Get Supported Payout Banks","api":"GET /payout/banks","href":"/api-reference/marketplace/get-payout-banks"},{"title":"Setup Merchant Payout","api":"POST /merchants/{merchantId}/payout","href":"/api-reference/marketplace/setup-payout"},{"title":"Update Merchant Payout","api":"PATCH /merchants/{merchantId}/payout","href":"/api-reference/marketplace/update-payout"},{"title":"Initiate Merchant Payout","api":"POST /merchants/{merchantId}/payouts","href":"/api-reference/marketplace/initiate-payout"},{"title":"List Payout Requests","api":"GET /payouts","href":"/api-reference/marketplace/list-payout-requests"},{"title":"Approve Merchant Payout","api":"POST /merchants/{merchantId}/payouts/{reference}/approve","href":"/api-reference/marketplace/approve-payout"},{"title":"Reject Merchant Payout","api":"POST /merchants/{merchantId}/payouts/{reference}/reject","href":"/api-reference/marketplace/reject-payout"},{"title":"List Merchants","api":"GET /merchants","href":"/api-reference/marketplace/list-merchants"},{"title":"Marketplace Products","href":"/api-reference/marketplace/products"},{"title":"Create/Replace Product Variants","api":"POST /marketplace/products/{productId}/variants","href":"/api-reference/marketplace/create-variants"},{"title":"Get Product Variants","api":"GET /marketplace/products/{productId}/variants","href":"/api-reference/marketplace/get-variants"},{"title":"Update Marketplace Settings","api":"PATCH /marketplace","href":"/api-reference/marketplace/update-settings"}]}]},{"tab":"Plugins","groups":[{"group":"Plugins","pages":[{"title":"Plugins Overview","href":"/plugins/overview"}]},{"group":"WooCommerce","pages":[{"title":"Installation","href":"/plugins/woocommerce/installation"},{"title":"Configuration","href":"/plugins/woocommerce/configuration"},{"title":"Multicurrency","href":"/plugins/woocommerce/multicurrency"},{"title":"Payment Flow","href":"/plugins/woocommerce/payment-flow"},{"title":"Webhooks","href":"/plugins/woocommerce/webhooks"},{"title":"Developer Reference","href":"/plugins/woocommerce/developer-hooks"}]},{"group":"WordPress","pages":[{"title":"WordPress Plugins","href":"/plugins/wordpress/overview"},{"title":"Storefront","href":"/plugins/wordpress/storefront"},{"title":"Cart Page","href":"/plugins/wordpress/cart"},{"title":"Live Chat","href":"/plugins/wordpress/live-chat"},{"title":"Contact Form","href":"/plugins/wordpress/contact-form"}]}]},{"tab":"SDKs","groups":[{"group":"Build with AI","pages":[{"title":"Build your store with Lovable","href":"/ai-builders/lovable"},{"title":"Ask about your store in Lovable","href":"/ai-builders/lovable-chat"},{"title":"Show your store's data","href":"/ai-builders/show-store-data"}]},{"group":"Embedded SDK","pages":[{"title":"SDKs Overview","href":"/sdks/overview"},{"title":"Pay Button Quickstart","href":"/sdks/embedded/quickstart"},{"title":"Storefront + Cart","href":"/sdks/embedded/storefront-cart"},{"title":"Programmatic Checkout","href":"/sdks/embedded/programmatic"},{"title":"Events","href":"/sdks/embedded/events"},{"title":"Customization","href":"/sdks/embedded/customization"}]},{"group":"React SDK","pages":[{"title":"React SDK","href":"/sdks/react/overview"},{"title":"Installation","href":"/sdks/react/installation"},{"title":"Components","href":"/sdks/react/components"},{"title":"API Options","href":"/sdks/react/api-options"}]}]}]},"basePath":"","title":"Create Charge - Khaime Documentation","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CalkZbx8.js","snippetPresets-DtvvunBK.js","utils-Bn5byECU.js","style-to-object-BY3JEAdk.js","utils-DOTAoFcT.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CDauU9aU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k2aHAqp5.js","_Uint8Array-CQuRedKT.js","isObject-FP1Yky1u.js","ApiExamples-CSBS2nDe.js","usePlaygroundInputsStore-BkN7uKke.js","shallow-6IMgYiEa.js","isEqual-DicuCknl.js","CodeSnippets-C268fsRY.js","CodeSnippet-BBA8eWiP.js","getApiPlaygroundDisplay-DMK5GRGS.js","Page-Dz3zehSO.js","api-description-markdown-DwoksVHI.js","DynamicMarkdown-XsrWkK-b.js","SectionHeading-AR_EzDYe.js","MethodPill-CvOL8UTX.js","getPastedJson-BazkMjRw.js","Check2Icon-BL_xILK9.js","axios-CsQoIw0U.js"]}