Creates a payment intent for products in your Khaime catalog. Supports physical products (with shipping), digital products, and gift cards.
Show the final total before you create the intent. Send this same body to Preview Payment on your review step: it returns the exact subtotal, fee and total without creating anything. Prices, Fees and Totals shows how the pricing calls fit together.
This endpoint is for Khaime catalog products. If your products live on your own platform (e.g., WooCommerce), use Create Payment Intent instead.
Requirements vary by product type:
Physical products: Requires cart_unique_id from /cart/validate and delivery_details
Digital/Gift Card/Others: No cart validation needed - cart_unique_id is auto-generated
Request
string
required
Your API key
Body Parameters
string
required
Type of product being purchased. Determines required fields and checkout flow.Values:physical_product, digital, gift_card
array
required
Array of cart items.
Show Cart Item Schema
Required Fields:
Field
Type
Description
product_id
integer
Product ID from your Khaime catalog
quantity
integer
Quantity to purchase (must be positive)
price
integer
Unit price in cents (minor currency units)
product_image
string
Product image URL
has_variation
boolean
Whether product has variants
product_variant_data
string
Variant description (e.g., "Large / Blue") or "none"
Variation Fields (required when has_variation is true):
Customer’s answers to the custom fields defined on that product, keyed by each field’s id. Pass an array of one object per unit when quantity is greater than 1 — see below. See Product Custom Fields.
Custom Field Types:
Type
Example Value
text
"Happy Birthday!"
textarea
"Please handle with care..."
number
42
date
"2024-12-25"
email
"jane@example.com"
phone
"+2348012345678"
select
"script"
checkbox
true
range
5
Answers are keyed by the field’s id, never its label. A key matching no
defined field is rejected, naming the unrecognised key and listing the ids
the product actually defines — a typo fails the request rather than producing a
successful checkout with a missing answer.Every required field is enforced on every cart line, whether or not that line
submitted anything. A line that omits additional_information entirely is
rejected the same way as one that omits a single required answer.One set of answers per unit. When a line’s quantity is greater than 1 and
the product defines any required field, pass an array with exactly one object
per unit. A single object covering several units is rejected, because the
answers describe each unit individually — one insured person, one engraving,
one ticket holder — and collapsing them loses all but the first.
The array length must equal quantity exactly. Errors name the person, not
just the field — "Date of Birth" is required for JulsCare Dependent (person 2 of 2) — so you can tell which unit is incomplete.Dates are validated as real calendar dates: 2015-02-31 is rejected rather
than silently rolling forward to 3 March.Example cart item with custom fields:
Payment type. Use one for one-time payments.Values:one, multiple_time
string
Cart ID from /cart/validate. Required for physical products. Auto-generated for digital products if not provided.
object
Shipping address and delivery preferences. Required for physical products. Not needed for digital products.
string
Customer’s country code (e.g., US, NG). Auto-detected from IP if not provided.
string
Preferred payment gateway. Auto-selected based on currency if not provided.Values:stripe, paystack, paypal, square
boolean
default:"false"
Whether a coupon code is being applied
string
Coupon code to apply (if is_coupon_used is true)
string
required
Who is paying. Values:customer, business, educator
Required, and it must be customer for a normal purchase. Omitting it is
rejected with a validation error. Sending any other value is accepted, but the
payment then settles down a different path and no merchant wallet is
credited — the charge succeeds and the money is not attributed. If a payment
completes at the gateway but no wallet balance moves, check this field first.
number
required
Order total in the smallest currency unit. For an installment, send the plan total.
Installments
The product must be sold in installments, alone in the cart.
boolean
default:"false"
true to pay in installments.
integer
Installment to pay. Required with is_split. 1 opens a new plan.
integer
Plan to pay. Required for position 2 and later.
Each installment must be above the gateway minimum (e.g. $0.50 on Stripe, ₦50 on Paystack).
Selling a sub-merchant’s product
A marketplace operator can sell a product from a sub-merchant’s catalogue
through this endpoint. There is nothing extra to send: call it with your own API
key and put the sub-merchant’s product_id in the cart. Ownership, authorisation
and commission are all resolved server-side from the product itself.
Never send the seller’s id in the body. Ownership comes from the product record,
so a caller cannot name a merchant they are not entitled to sell for. A cart
containing a product you have no active marketplace relationship with is
rejected with 403 AUTH_PERMISSION_DENIED.
Rules that apply to a marketplace cart:
Every product in one cart must belong to the same merchant. A mixed-owner cart
is rejected with 400 MARKETPLACE_MIXED_OWNER_CART — an order settles to a
single merchant, so there is no correct split for a mixed one.
Prices come from the catalogue, not from the request. The price you send on
each cart line is used for display reconciliation only; the server re-derives
the total from the stored product price, any active deal, and the buyer’s
market. If they disagree, the catalogue wins.
Commission is a percentage of the sale, set per sub-merchant by the
operator. There is no fixed-fee or markup option — to leave a sub-merchant
exactly $10.00 of a $15.00 sale, set the rate to 33.33%.
How the money divides. The sub-merchant’s share is fixed by the commission
the operator agreed, and the Khaime transaction fee is carried by the operator
out of their commission:
On a $15.00 sale at 33.33%, with the customer absorbing the fee:
Customer pays
$16.20
Sub-merchant receives
$10.00
Operator receives
$5.00
Khaime fee
$1.20
If the operator absorbs the fee instead, the sub-merchant still receives exactly
$10.00 and the operator receives $3.80. The sub-merchant’s number does not move.
The commission must cover the Khaime fee. If it does not, the intent is rejected
with 400 MARKETPLACE_COMMISSION_BELOW_FEES, naming both amounts — raise the
commission rate for that merchant, or have the customer pay the transaction fee.
The split is recorded when the intent is created, so the rate in force at
purchase is the rate that settles, whatever the operator changes afterwards.
Wallets are credited when the payment succeeds, not when the intent is created.
Signed token for @khaimehq/react checkout. HMAC-SHA256 signed, expires in 15 minutes.
cart_identifier
Unique cart/transaction identifier for tracking
amount
Final amount in cents (includes fees, shipping, tax)
currency
Currency code
status
Payment status (pending)
breakdown
Payment breakdown: subtotal, discount, shipping, tax, transaction_fee, and customer_pays_fees. Amount fields are omitted when zero.
Showing the fee to the customer
When breakdown.customer_pays_fees is true, the transaction fee is included in amount and returned as breakdown.transaction_fee. Show it as its own line in your order summary, before the customer pays — it’s best practice for transparency, and a total higher than the catalog price with no explanation erodes trust and invites disputes. See Fees.Who pays is the business’s customer_pays_transaction_fee setting. When an operator sells a sub-merchant’s product, it’s the operator’s decision.
Field
Show as
breakdown.subtotal
Items
breakdown.discount
Discount (negative)
breakdown.shipping
Shipping
breakdown.tax
Tax
breakdown.transaction_fee
”Transaction fee” — only when customer_pays_fees is true
amount
Total to pay
The total you display must equal amount, because that’s what the customer is charged. To show the breakdown while the customer is still reviewing their cart, call Preview Payment first — it returns the same numbers without creating an intent.
transaction_fee is returned even when the merchant absorbs the fee. Decide whether to show the line from customer_pays_fees, not from whether transaction_fee is present — otherwise you’ll show customers a fee they aren’t paying.
Token Expiration: Tokens expire after 15 minutes. If a customer takes too long to complete payment, you’ll need to create a new payment intent.
Examples
Physical Product Checkout
Requires cart validation first to calculate shipping.
Simplified schema for digital products: Do NOT include product_title, product_thumbnail, main_variant, least_sub_variant_id, or shipping_rate in cart items. These are only for physical products. You can still include additional_information for custom fields.
Digital Product with Custom Fields
Example showing a digital product (e.g., personalized certificate) with custom fields.
Accessing custom field values: The additional_information data is included in order webhooks and the Order API response. Use this to fulfill personalized orders correctly.
Gift Card Checkout
Same flow as digital products. Each gift card item creates a separate gift card code.
See the full React SDK documentation for all available options
Option 2: Redirect Checkout
Redirect the customer to Khaime’s hosted checkout page:
window.location.href = response.data.payment_url;
Errors
Error Code
Description
CART_EXPIRED
Cart ID is no longer valid (carts expire after 30 minutes)
CART_NOT_FOUND
Invalid cart ID
CART_INVALID
Missing cart_unique_id for physical products, or an empty cart
PRODUCT_NOT_FOUND
Product no longer available. The message names the missing product_id.
PAYMENT_INTENT_FAILED
Error creating payment intent
VALIDATION_FAILED
Invalid request parameters — also returned for an unrecognised additional_information key, a wrong-length per-unit array, or a value failing its field’s type (a date that is not a real calendar date, a malformed email, a select value outside the defined options). The message names the field and, for multi-unit lines, which unit.
VALIDATION_MISSING_FIELD
A required custom field has no answer. The message names the field, the product, and which unit of a multi-unit line.
AUTH_PERMISSION_DENIED
Selling a product belonging to a merchant you have no active marketplace relationship with
MARKETPLACE_MIXED_OWNER_CART
One cart contains products from more than one merchant
MARKETPLACE_COMMISSION_BELOW_FEES
The commission on this sale does not cover the Khaime transaction fee. The message names both amounts.
INSTALLMENT_PLAN_NOT_FOUND
No such plan for this customer and product
INSTALLMENT_NOT_FOUND
No installment at that position
INSTALLMENT_ALREADY_PAID
Installment already paid
INSTALLMENT_NOT_ALLOWED
Plan completed, cancelled or defaulted
Every error carries a stable string error_code alongside a human-readable
message. Switch on error_code — the message wording changes, the code does
not. VALIDATION_ERROR was never a real code; use VALIDATION_FAILED.
Confirming Payment
Always verify payments via webhooks before fulfilling orders. Frontend callbacks are for UI purposes only.
Related
Digital Cart Checkout
Complete guide for digital product multi-item carts
Physical Checkout Guide
Complete guide for physical products with shipping
Cart Validation
Validate cart and calculate shipping (physical products)
Webhooks
Listen for payment completion events
{"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":"6afd09730320fc3e7f155e73","clientVersion":"0.0.4270","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/commerce/payment-intent","slug":"/api-reference/commerce/payment-intent","pageMetadata":{"title":"Create Product Payment Intent","api":"POST /product-payment/intent","description":"Create a payment intent for Khaime catalog products","href":"/api-reference/commerce/payment-intent"},"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 payment intent for Khaime catalog products\"\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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,Step,Steps,Table,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`create-product-payment-intent`,children:`Create Product Payment Intent`}),`\n`,_jsx(_components.p,{children:`Creates a payment intent for products in your Khaime catalog. Supports physical products (with shipping), digital products, and gift cards.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Show the final total before you create the intent.`}),` Send this same body to `,_jsx(_components.a,{href:`/api-reference/commerce/cart-payment-preview`,children:`Preview Payment`}),` on your review step: it returns the exact subtotal, fee and total without creating anything. `,_jsx(_components.a,{href:`/api-reference/pricing-and-checkout-guide`,children:`Prices, Fees and Totals`}),` shows how the pricing calls fit together.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This endpoint is for Khaime catalog products.`}),` If your products live on your own platform (e.g., WooCommerce), use `,_jsx(_components.a,{href:`/api-reference/payments/create-intent`,children:`Create Payment Intent`}),` instead.`]})}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Requirements vary by product type:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Physical products:`}),` Requires `,_jsx(_components.code,{children:`cart_unique_id`}),` from `,_jsx(_components.code,{children:`/cart/validate`}),` and `,_jsx(_components.code,{children:`delivery_details`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Digital/Gift Card/Others:`}),` No cart validation needed - `,_jsx(_components.code,{children:`cart_unique_id`}),` is auto-generated`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(ParamField,{header:`X-API-Key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsx(_components.p,{children:`Your API key`})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`product_type`,type:`string`,required:true,id:`param-product-type`,children:[_jsx(_components.p,{children:`Type of product being purchased. Determines required fields and checkout flow.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`physical_product`}),`, `,_jsx(_components.code,{children:`digital`}),`, `,_jsx(_components.code,{children:`gift_card`})]})]}),`\n`,_jsxs(ParamField,{body:`cart`,type:`array`,required:true,id:`param-cart`,children:[_jsx(_components.p,{children:`Array of cart items.`}),_jsxs(Expandable,{title:`Cart Item Schema`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Required Fields:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_id`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Product ID from your Khaime catalog`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`quantity`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Quantity to purchase (must be positive)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`price`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Unit price in cents (minor currency units)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_image`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Product image URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`has_variation`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether product has variants`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_variant_data`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Variant description (e.g., `,_jsx(_components.code,{children:`\"Large / Blue\"`}),`) or `,_jsx(_components.code,{children:`\"none\"`})]})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Variation Fields`}),` (required when `,_jsx(_components.code,{children:`has_variation`}),` is `,_jsx(_components.code,{children:`true`}),`):`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`least_sub_variant_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Variant SKU or identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`main_variant`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Primary variant value (e.g., `,_jsx(_components.code,{children:`\"Large\"`}),`)`]})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Optional Fields:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Product name for display`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_thumbnail`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Thumbnail image URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`shipping_rate`})}),_jsx(_components.td,{children:`object | null`}),_jsx(_components.td,{children:`Pre-calculated shipping rate (physical products only)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subscription_frequency_key`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Subscription frequency (for recurring products)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subscription_plan_key`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Subscription plan identifier`})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Additional Information:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`additional_information`})}),_jsx(_components.td,{children:`object | array`}),_jsxs(_components.td,{children:[`Customer’s answers to the custom fields defined on that product, keyed by each field’s `,_jsx(_components.code,{children:`id`}),`. Pass an `,_jsx(_components.strong,{children:`array of one object per unit`}),` when `,_jsx(_components.code,{children:`quantity`}),` is greater than 1 — see below. See `,_jsx(_components.a,{href:`/api-reference/commerce/product-custom-fields`,children:`Product Custom Fields`}),`.`]})]})})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Custom Field Types:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Example Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"Happy Birthday!\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textarea`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"Please handle with care...\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`42`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`date`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`\"2024-12-25\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`email`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"jane@example.com\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`\"+2348012345678\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`select`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"script\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checkbox`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`range`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})})]})]})]}),_jsxs(_components.p,{children:[`Answers are keyed by the field’s `,_jsx(_components.code,{children:`id`}),`, never its `,_jsx(_components.code,{children:`label`}),`. A key matching no\ndefined field is `,_jsx(_components.strong,{children:`rejected`}),`, naming the unrecognised key and listing the ids\nthe product actually defines — a typo fails the request rather than producing a\nsuccessful checkout with a missing answer.`]}),_jsxs(_components.p,{children:[`Every required field is enforced on every cart line, whether or not that line\nsubmitted anything. A line that omits `,_jsx(_components.code,{children:`additional_information`}),` entirely is\nrejected the same way as one that omits a single required answer.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`One set of answers per unit.`}),` When a line’s `,_jsx(_components.code,{children:`quantity`}),` is greater than 1 and\nthe product defines any required field, pass an array with exactly one object\nper unit. A single object covering several units is rejected, because the\nanswers describe each unit individually — one insured person, one engraving,\none ticket holder — and collapsing them loses all but the first.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,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:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3807`}),_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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1200`}),_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:` \"additional_information\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"full_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Chidi Okafor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"date_of_birth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2014-09-03\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"full_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ngozi Okafor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"date_of_birth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2017-01-22\"`}),_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:[`The array length must equal `,_jsx(_components.code,{children:`quantity`}),` exactly. Errors name the person, not\njust the field — `,_jsx(_components.code,{children:`\"Date of Birth\" is required for JulsCare Dependent (person 2 of 2)`}),` — so you can tell which unit is incomplete.`]}),_jsxs(_components.p,{children:[`Dates are validated as real calendar dates: `,_jsx(_components.code,{children:`2015-02-31`}),` is rejected rather\nthan silently rolling forward to 3 March.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example cart item with custom fields:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,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:`13`,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:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`}),_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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4999`}),_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:` \"product_image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/bracelet.jpg\"`}),_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:` \"has_variation\"`}),_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:` \"product_variant_data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"none\"`}),_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:` \"additional_information\"`}),_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:` \"engraving_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Happy Anniversary\"`}),_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:` \"gift_wrap\"`}),_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:` \"font_style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"script\"`})]}),`\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(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Customer’s email address`})}),`\n`,_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name`,children:_jsx(_components.p,{children:`Customer’s first name`})}),`\n`,_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name`,children:_jsx(_components.p,{children:`Customer’s last name`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,required:true,id:`param-currency`,children:_jsxs(_components.p,{children:[`Currency code (e.g., `,_jsx(_components.code,{children:`USD`}),`, `,_jsx(_components.code,{children:`NGN`}),`, `,_jsx(_components.code,{children:`GBP`}),`)`]})}),`\n`,_jsxs(ParamField,{body:`payment_type`,type:`string`,required:true,id:`param-payment-type`,children:[_jsxs(_components.p,{children:[`Payment type. Use `,_jsx(_components.code,{children:`one`}),` for one-time payments.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`one`}),`, `,_jsx(_components.code,{children:`multiple_time`})]})]}),`\n`,_jsx(ParamField,{body:`cart_unique_id`,type:`string`,id:`param-cart-unique-id`,children:_jsxs(_components.p,{children:[`Cart ID from `,_jsx(_components.code,{children:`/cart/validate`}),`. `,_jsx(_components.strong,{children:`Required for physical products.`}),` Auto-generated for digital products if not provided.`]})}),`\n`,_jsx(ParamField,{body:`delivery_details`,type:`object`,id:`param-delivery-details`,children:_jsxs(_components.p,{children:[`Shipping address and delivery preferences. `,_jsx(_components.strong,{children:`Required for physical products.`}),` Not needed for digital products.`]})}),`\n`,_jsx(ParamField,{body:`user_country`,type:`string`,id:`param-user-country`,children:_jsxs(_components.p,{children:[`Customer’s country code (e.g., `,_jsx(_components.code,{children:`US`}),`, `,_jsx(_components.code,{children:`NG`}),`). Auto-detected from IP if not provided.`]})}),`\n`,_jsxs(ParamField,{body:`payment_gateway`,type:`string`,id:`param-payment-gateway`,children:[_jsx(_components.p,{children:`Preferred payment gateway. Auto-selected based on currency if not provided.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`stripe`}),`, `,_jsx(_components.code,{children:`paystack`}),`, `,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`square`})]})]}),`\n`,_jsx(ParamField,{body:`is_coupon_used`,type:`boolean`,default:`false`,id:`param-is-coupon-used`,children:_jsx(_components.p,{children:`Whether a coupon code is being applied`})}),`\n`,_jsx(ParamField,{body:`coupon_code`,type:`string`,id:`param-coupon-code`,children:_jsxs(_components.p,{children:[`Coupon code to apply (if `,_jsx(_components.code,{children:`is_coupon_used`}),` is true)`]})}),`\n`,_jsxs(ParamField,{body:`payment_by`,type:`string`,required:true,id:`param-payment-by`,children:[_jsxs(_components.p,{children:[`Who is paying. `,_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`customer`}),`, `,_jsx(_components.code,{children:`business`}),`, `,_jsx(_components.code,{children:`educator`})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Required, and it must be `,_jsx(_components.code,{children:`customer`}),` for a normal purchase.`]}),` Omitting it is\nrejected with a validation error. Sending any other value is accepted, but the\npayment then settles down a different path and `,_jsx(_components.strong,{children:`no merchant wallet is\ncredited`}),` — the charge succeeds and the money is not attributed. If a payment\ncompletes at the gateway but no wallet balance moves, check this field first.`]})})]}),`\n`,_jsx(ParamField,{body:`order_total_charge`,type:`number`,required:true,id:`param-order-total-charge`,children:_jsx(_components.p,{children:`Order total in the smallest currency unit. For an installment, send the plan total.`})}),`\n`,_jsx(Heading,{level:`3`,id:`installments`,children:`Installments`}),`\n`,_jsxs(_components.p,{children:[`The product must be sold in `,_jsx(_components.a,{href:`/payments/installments`,children:`installments`}),`, alone in the cart.`]}),`\n`,_jsx(ParamField,{body:`is_split`,type:`boolean`,default:`false`,id:`param-is-split`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` to pay in installments.`]})}),`\n`,_jsx(ParamField,{body:`payment_split_position`,type:`integer`,id:`param-payment-split-position`,children:_jsxs(_components.p,{children:[`Installment to pay. Required with `,_jsx(_components.code,{children:`is_split`}),`. `,_jsx(_components.code,{children:`1`}),` opens a new plan.`]})}),`\n`,_jsx(ParamField,{body:`installment_plan_id`,type:`integer`,id:`param-installment-plan-id`,children:_jsx(_components.p,{children:`Plan to pay. Required for position 2 and later.`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Each installment must be above the gateway minimum (e.g. $0.50 on Stripe, ₦50 on Paystack).`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`selling-a-sub-merchant’s-product`,children:`Selling a sub-merchant’s product`}),`\n`,_jsxs(_components.p,{children:[`A marketplace operator can sell a product from a sub-merchant’s catalogue\nthrough this endpoint. There is nothing extra to send: call it with your own API\nkey and put the sub-merchant’s `,_jsx(_components.code,{children:`product_id`}),` in the cart. Ownership, authorisation\nand commission are all resolved server-side from the product itself.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never send the seller’s id in the body. Ownership comes from the product record,\nso a caller cannot name a merchant they are not entitled to sell for. A cart\ncontaining a product you have no active marketplace relationship with is\nrejected with `,_jsx(_components.code,{children:`403 AUTH_PERMISSION_DENIED`}),`.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Rules that apply to a marketplace cart:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Every product in one cart must belong to the same merchant. A mixed-owner cart\nis rejected with `,_jsx(_components.code,{children:`400 MARKETPLACE_MIXED_OWNER_CART`}),` — an order settles to a\nsingle merchant, so there is no correct split for a mixed one.`]}),`\n`,_jsxs(_components.li,{children:[`Prices come from the catalogue, not from the request. The `,_jsx(_components.code,{children:`price`}),` you send on\neach cart line is used for display reconciliation only; the server re-derives\nthe total from the stored product price, any active deal, and the buyer’s\nmarket. If they disagree, the catalogue wins.`]}),`\n`,_jsxs(_components.li,{children:[`Commission is a `,_jsx(_components.strong,{children:`percentage`}),` of the sale, set per sub-merchant by the\noperator. There is no fixed-fee or markup option — to leave a sub-merchant\nexactly `,`$10.00 of a $`,`15.00 sale, set the rate to `,_jsx(_components.code,{children:`33.33%`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`How the money divides.`}),` The sub-merchant’s share is fixed by the commission\nthe operator agreed, and the Khaime transaction fee is carried by the operator\nout of their commission:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,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:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`sub-merchant = sale price − commission`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`operator = commission − Khaime fee`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`On a $15.00 sale at 33.33%, with the customer absorbing the fee:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Customer pays`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$16.20`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sub-merchant receives`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$10.00`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Operator receives`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$5.00`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Khaime fee`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$1.20`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`If the operator absorbs the fee instead, the sub-merchant still receives exactly\n`,`$10.00 and the operator receives $`,`3.80. The sub-merchant’s number does not move.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The commission must cover the Khaime fee. If it does not, the intent is rejected\nwith `,_jsx(_components.code,{children:`400 MARKETPLACE_COMMISSION_BELOW_FEES`}),`, naming both amounts — raise the\ncommission rate for that merchant, or have the customer pay the transaction fee.`]})}),`\n`,_jsx(_components.p,{children:`The split is recorded when the intent is created, so the rate in force at\npurchase is the rate that settles, whatever the operator changes afterwards.\nWallets are credited when the payment succeeds, not when the intent is created.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`product-type-requirements`,children:`Product Type Requirements`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Physical`}),_jsx(_components.th,{children:`Digital/Gift Card`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cart_unique_id`})}),_jsxs(_components.td,{children:[`Required (from `,_jsx(_components.code,{children:`/cart/validate`}),`)`]}),_jsx(_components.td,{children:`Auto-generated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`delivery_details`})}),_jsx(_components.td,{children:`Required`}),_jsx(_components.td,{children:`Not needed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`user_country`})}),_jsx(_components.td,{children:`From address`}),_jsx(_components.td,{children:`Auto-detected from IP`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Cart validation step`}),_jsx(_components.td,{children:`Required`}),_jsx(_components.td,{children:`Not required`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`token`})}),_jsxs(_components.td,{children:[`Signed token for `,_jsx(_components.code,{children:`@khaimehq/react`}),` checkout. HMAC-SHA256 signed, expires in 15 minutes.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cart_identifier`})}),_jsx(_components.td,{children:`Unique cart/transaction identifier for tracking`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`Final amount in cents (includes fees, shipping, tax)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{children:`Currency code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[`Payment status (`,_jsx(_components.code,{children:`pending`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown`})}),_jsxs(_components.td,{children:[`Payment breakdown: `,_jsx(_components.code,{children:`subtotal`}),`, `,_jsx(_components.code,{children:`discount`}),`, `,_jsx(_components.code,{children:`shipping`}),`, `,_jsx(_components.code,{children:`tax`}),`, `,_jsx(_components.code,{children:`transaction_fee`}),`, and `,_jsx(_components.code,{children:`customer_pays_fees`}),`. Amount fields are omitted when zero.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`showing-the-fee-to-the-customer`,children:`Showing the fee to the customer`}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`breakdown.customer_pays_fees`}),` is `,_jsx(_components.code,{children:`true`}),`, the transaction fee is included in `,_jsx(_components.code,{children:`amount`}),` and returned as `,_jsx(_components.code,{children:`breakdown.transaction_fee`}),`. `,_jsx(_components.strong,{children:`Show it as its own line in your order summary, before the customer pays`}),` — it’s best practice for transparency, and a total higher than the catalog price with no explanation erodes trust and invites disputes. See `,_jsx(_components.a,{href:`/payments/overview#show-the-fee-when-the-customer-pays-it`,children:`Fees`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Who pays is the business’s `,_jsx(_components.code,{children:`customer_pays_transaction_fee`}),` setting. When an operator sells a sub-merchant’s product, it’s the `,_jsx(_components.strong,{children:`operator’s`}),` decision.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Show as`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.subtotal`})}),_jsx(_components.td,{children:`Items`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.discount`})}),_jsx(_components.td,{children:`Discount (negative)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.shipping`})}),_jsx(_components.td,{children:`Shipping`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.tax`})}),_jsx(_components.td,{children:`Tax`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.transaction_fee`})}),_jsxs(_components.td,{children:[`”Transaction fee” — only when `,_jsx(_components.code,{children:`customer_pays_fees`}),` is `,_jsx(_components.code,{children:`true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`Total to pay`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The total you display must equal `,_jsx(_components.code,{children:`amount`}),`, because that’s what the customer is charged. To show the breakdown while the customer is still reviewing their cart, call `,_jsx(_components.a,{href:`/api-reference/commerce/cart-payment-preview`,children:`Preview Payment`}),` first — it returns the same numbers without creating an intent.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`transaction_fee`}),` is returned even when the merchant absorbs the fee. Decide whether to show the line from `,_jsx(_components.code,{children:`customer_pays_fees`}),`, not from whether `,_jsx(_components.code,{children:`transaction_fee`}),` is present — otherwise you’ll show customers a fee they aren’t paying.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Token Expiration:`}),` Tokens expire after 15 minutes. If a customer takes too long to complete payment, you’ll need to create a new payment intent.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`physical-product-checkout`,children:`Physical Product Checkout`}),`\n`,_jsx(_components.p,{children:`Requires cart validation first to calculate shipping.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,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:`38`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"physical_product\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 12345,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart_unique_id\": \"bc59bc1f-e1b0-4ee5-a9cb-b966042ce38f\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 12345,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Premium T-Shirt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/shirt.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"main_variant\": \"Large\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"least_sub_variant_id\": \"var_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"Large / Blue\"`})}),`\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(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"john@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"John\",`})}),`\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:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"delivery_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"national_delivery\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"John Doe\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"123 Main St\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"city\": \"Austin\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"Texas\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zip_code\": \"78701\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"United States\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country_code\": \"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:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`digital-product-checkout`,children:`Digital Product Checkout`}),`\n`,_jsxs(_components.p,{children:[`No cart validation or address required. Supports multi-item carts. Uses `,_jsx(_components.strong,{children:`simplified cart schema`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,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:`34`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Digital Bundle (2 items)\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 4000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 4821,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 1500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/ebook.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 4822,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/course.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_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\": \"Ada\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Lovelace\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_coupon_used\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_second_time_payment\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Simplified schema for digital products:`}),` Do NOT include `,_jsx(_components.code,{children:`product_title`}),`, `,_jsx(_components.code,{children:`product_thumbnail`}),`, `,_jsx(_components.code,{children:`main_variant`}),`, `,_jsx(_components.code,{children:`least_sub_variant_id`}),`, or `,_jsx(_components.code,{children:`shipping_rate`}),` in cart items. These are only for physical products. You can still include `,_jsx(_components.code,{children:`additional_information`}),` for custom fields.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`digital-product-with-custom-fields`,children:`Digital Product with Custom Fields`}),`\n`,_jsx(_components.p,{children:`Example showing a digital product (e.g., personalized certificate) with custom fields.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,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:`28`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Personalized Certificate\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 5500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/certificate.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additional_information\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"recipient_name\": \"John Michael Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"completion_date\": \"2024-06-15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"course_name\": \"Advanced Photography\"`})}),`\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(_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:` \"email\": \"buyer@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"John\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`physical-product-with-custom-fields`,children:`Physical Product with Custom Fields`}),`\n`,_jsx(_components.p,{children:`Example showing a product where the business has configured custom fields for personalization.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Product’s custom fields (configured by business):`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field Key`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_line_1`})}),_jsx(_components.td,{children:`First Line`}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_line_2`})}),_jsx(_components.td,{children:`Second Line`}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_font`})}),_jsx(_components.td,{children:`Font Style`}),_jsx(_components.td,{children:`select`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gift_box`})}),_jsx(_components.td,{children:`Premium Gift Box`}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`special_instructions`})}),_jsx(_components.td,{children:`Special Instructions`}),_jsx(_components.td,{children:`textarea`}),_jsx(_components.td,{children:`No`})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Checkout request with customer-provided values:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`45`,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:`45`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"physical_product\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 98765,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart_unique_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 98765,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 7500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Custom Engraved Bracelet\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/bracelet.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"main_variant\": \"Gold\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"least_sub_variant_id\": \"var_gold_sm\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"Gold / Small\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additional_information\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_line_1\": \"Forever Yours\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_line_2\": \"2024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_font\": \"script\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gift_box\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"special_instructions\": \"Please double-check engraving spelling\"`})}),`\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(_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:` \"email\": \"customer@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Sarah\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Johnson\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"delivery_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"national_delivery\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Sarah Johnson\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"456 Oak Avenue\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"city\": \"San Francisco\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"California\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zip_code\": \"94102\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"United States\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country_code\": \"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:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Accessing custom field values:`}),` The `,_jsx(_components.code,{children:`additional_information`}),` data is included in order webhooks and the Order API response. Use this to fulfill personalized orders correctly.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`gift-card-checkout`,children:`Gift Card Checkout`}),`\n`,_jsx(_components.p,{children:`Same flow as digital products. Each gift card item creates a separate gift card code.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,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:`26`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"gift_card\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Gift Cards (2)\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 5001,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 5000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/giftcard.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_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\": \"John\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_coupon_used\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_second_time_payment\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`pay-in-installments`,children:`Pay in Installments`}),`\n`,_jsx(_components.p,{children:`First installment:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,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/product-payment/intent`}),_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"ada@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Ada\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Lovelace\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"product_id\": 3046, \"quantity\": 1, \"has_variation\": false, \"product_image\": \"\", \"price\": 10000, \"product_variant_data\": \"Quantity: 1\" }`})}),`\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:` \"is_split\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_split_position\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Next installment: same body with the position and plan.`}),`\n`,_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:` \"is_split\"`}),_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_split_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"installment_plan_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`812`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Send the cart line again, with its `,_jsx(_components.code,{children:`additional_information`}),` if the product has `,_jsx(_components.a,{href:`/api-reference/commerce/product-custom-fields`,children:`custom fields`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`accepting-payments`,children:`Accepting Payments`}),`\n`,_jsx(_components.p,{children:`Once you receive the response, collect payment from your customer using one of these options:`}),`\n`,_jsx(Heading,{level:`3`,id:`option-1-embedded-checkout-recommended`,children:`Option 1: Embedded Checkout (Recommended)`}),`\n`,_jsxs(_components.p,{children:[`Embed the checkout directly in your app using `,_jsx(_components.code,{children:`@khaimehq/react`}),`.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Install @khaimehq/react`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`npm`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`yarn`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`yarn`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`pnpm`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pnpm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})})]})}),_jsx(Step,{title:`Render the Checkout`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KhaimeCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@khaimehq/react'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CheckoutPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`KhaimeCheckout`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Payment successful - redirect to confirmation`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `/order/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`transaction_id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Payment failed:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},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(Card,{title:`React SDK Documentation`,icon:`react`,href:`/sdks/react/overview`,children:_jsx(_components.p,{children:`See the full React SDK documentation for all available options`})}),`\n`,_jsx(Heading,{level:`3`,id:`option-2-redirect-checkout`,children:`Option 2: Redirect Checkout`}),`\n`,_jsx(_components.p,{children:`Redirect the customer to Khaime’s hosted checkout page:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payment_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_EXPIRED`})}),_jsx(_components.td,{children:`Cart ID is no longer valid (carts expire after 30 minutes)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_NOT_FOUND`})}),_jsx(_components.td,{children:`Invalid cart ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_INVALID`})}),_jsxs(_components.td,{children:[`Missing `,_jsx(_components.code,{children:`cart_unique_id`}),` for physical products, or an empty cart`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_FOUND`})}),_jsxs(_components.td,{children:[`Product no longer available. The message names the missing `,_jsx(_components.code,{children:`product_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_INTENT_FAILED`})}),_jsx(_components.td,{children:`Error creating payment intent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsxs(_components.td,{children:[`Invalid request parameters — also returned for an unrecognised `,_jsx(_components.code,{children:`additional_information`}),` key, a wrong-length per-unit array, or a value failing its field’s type (a date that is not a real calendar date, a malformed email, a `,_jsx(_components.code,{children:`select`}),` value outside the defined options). The message names the field and, for multi-unit lines, which unit.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_MISSING_FIELD`})}),_jsx(_components.td,{children:`A required custom field has no answer. The message names the field, the product, and which unit of a multi-unit line.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTH_PERMISSION_DENIED`})}),_jsx(_components.td,{children:`Selling a product belonging to a merchant you have no active marketplace relationship with`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKETPLACE_MIXED_OWNER_CART`})}),_jsx(_components.td,{children:`One cart contains products from more than one merchant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKETPLACE_COMMISSION_BELOW_FEES`})}),_jsx(_components.td,{children:`The commission on this sale does not cover the Khaime transaction fee. The message names both amounts.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_PLAN_NOT_FOUND`})}),_jsx(_components.td,{children:`No such plan for this customer and product`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_NOT_FOUND`})}),_jsx(_components.td,{children:`No installment at that position`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_ALREADY_PAID`})}),_jsx(_components.td,{children:`Installment already paid`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_NOT_ALLOWED`})}),_jsx(_components.td,{children:`Plan completed, cancelled or defaulted`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Every error carries a stable string `,_jsx(_components.code,{children:`error_code`}),` alongside a human-readable\n`,_jsx(_components.code,{children:`message`}),`. Switch on `,_jsx(_components.code,{children:`error_code`}),` — the message wording changes, the code does\nnot. `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),` was never a real code; use `,_jsx(_components.code,{children:`VALIDATION_FAILED`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`confirming-payment`,children:`Confirming Payment`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Always verify payments via `,_jsx(_components.a,{href:`/webhooks/overview`,children:`webhooks`}),` before fulfilling orders. Frontend callbacks are for UI purposes only.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Digital Cart Checkout`,icon:`download`,href:`/api-reference/commerce/digital-cart-checkout`,children:_jsx(_components.p,{children:`Complete guide for digital product multi-item carts`})}),_jsx(Card,{title:`Physical Checkout Guide`,icon:`truck`,href:`/api-reference/checkout-integration-guide`,children:_jsx(_components.p,{children:`Complete guide for physical products with shipping`})}),_jsx(Card,{title:`Cart Validation`,icon:`cart-shopping`,href:`/api-reference/commerce/validate-cart`,children:_jsx(_components.p,{children:`Validate cart and calculate shipping (physical products)`})}),_jsx(Card,{title:`Webhooks`,icon:`webhook`,href:`/webhooks/overview`,children:_jsx(_components.p,{children:`Listen for payment completion events`})})]})]})}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 Product Payment Intent","api":"POST /product-payment/intent","description":"Create a payment intent for Khaime catalog products","href":"/api-reference/commerce/payment-intent"}}},"mdxSourceWithNoJs":{"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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,ResponseExample,Step,Steps,Table,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`create-product-payment-intent`,children:`Create Product Payment Intent`}),`\n`,_jsx(_components.p,{children:`Creates a payment intent for products in your Khaime catalog. Supports physical products (with shipping), digital products, and gift cards.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Show the final total before you create the intent.`}),` Send this same body to `,_jsx(_components.a,{href:`/api-reference/commerce/cart-payment-preview`,children:`Preview Payment`}),` on your review step: it returns the exact subtotal, fee and total without creating anything. `,_jsx(_components.a,{href:`/api-reference/pricing-and-checkout-guide`,children:`Prices, Fees and Totals`}),` shows how the pricing calls fit together.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`This endpoint is for Khaime catalog products.`}),` If your products live on your own platform (e.g., WooCommerce), use `,_jsx(_components.a,{href:`/api-reference/payments/create-intent`,children:`Create Payment Intent`}),` instead.`]})}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Requirements vary by product type:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Physical products:`}),` Requires `,_jsx(_components.code,{children:`cart_unique_id`}),` from `,_jsx(_components.code,{children:`/cart/validate`}),` and `,_jsx(_components.code,{children:`delivery_details`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Digital/Gift Card/Others:`}),` No cart validation needed - `,_jsx(_components.code,{children:`cart_unique_id`}),` is auto-generated`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(ParamField,{header:`X-API-Key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsx(_components.p,{children:`Your API key`})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsxs(ParamField,{body:`product_type`,type:`string`,required:true,id:`param-product-type`,children:[_jsx(_components.p,{children:`Type of product being purchased. Determines required fields and checkout flow.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`physical_product`}),`, `,_jsx(_components.code,{children:`digital`}),`, `,_jsx(_components.code,{children:`gift_card`})]})]}),`\n`,_jsxs(ParamField,{body:`cart`,type:`array`,required:true,id:`param-cart`,children:[_jsx(_components.p,{children:`Array of cart items.`}),_jsxs(Expandable,{title:`Cart Item Schema`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Required Fields:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_id`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Product ID from your Khaime catalog`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`quantity`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Quantity to purchase (must be positive)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`price`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Unit price in cents (minor currency units)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_image`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Product image URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`has_variation`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether product has variants`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_variant_data`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Variant description (e.g., `,_jsx(_components.code,{children:`\"Large / Blue\"`}),`) or `,_jsx(_components.code,{children:`\"none\"`})]})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Variation Fields`}),` (required when `,_jsx(_components.code,{children:`has_variation`}),` is `,_jsx(_components.code,{children:`true`}),`):`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`least_sub_variant_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Variant SKU or identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`main_variant`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Primary variant value (e.g., `,_jsx(_components.code,{children:`\"Large\"`}),`)`]})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Optional Fields:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_title`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Product name for display`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`product_thumbnail`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Thumbnail image URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`shipping_rate`})}),_jsx(_components.td,{children:`object | null`}),_jsx(_components.td,{children:`Pre-calculated shipping rate (physical products only)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subscription_frequency_key`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Subscription frequency (for recurring products)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subscription_plan_key`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Subscription plan identifier`})]})]})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Additional Information:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`additional_information`})}),_jsx(_components.td,{children:`object | array`}),_jsxs(_components.td,{children:[`Customer’s answers to the custom fields defined on that product, keyed by each field’s `,_jsx(_components.code,{children:`id`}),`. Pass an `,_jsx(_components.strong,{children:`array of one object per unit`}),` when `,_jsx(_components.code,{children:`quantity`}),` is greater than 1 — see below. See `,_jsx(_components.a,{href:`/api-reference/commerce/product-custom-fields`,children:`Product Custom Fields`}),`.`]})]})})]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Custom Field Types:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Example Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"Happy Birthday!\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`textarea`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"Please handle with care...\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`42`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`date`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`\"2024-12-25\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`email`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"jane@example.com\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`phone`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`\"+2348012345678\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`select`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"script\"`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`checkbox`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`range`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})})]})]})]}),_jsxs(_components.p,{children:[`Answers are keyed by the field’s `,_jsx(_components.code,{children:`id`}),`, never its `,_jsx(_components.code,{children:`label`}),`. A key matching no\ndefined field is `,_jsx(_components.strong,{children:`rejected`}),`, naming the unrecognised key and listing the ids\nthe product actually defines — a typo fails the request rather than producing a\nsuccessful checkout with a missing answer.`]}),_jsxs(_components.p,{children:[`Every required field is enforced on every cart line, whether or not that line\nsubmitted anything. A line that omits `,_jsx(_components.code,{children:`additional_information`}),` entirely is\nrejected the same way as one that omits a single required answer.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`One set of answers per unit.`}),` When a line’s `,_jsx(_components.code,{children:`quantity`}),` is greater than 1 and\nthe product defines any required field, pass an array with exactly one object\nper unit. A single object covering several units is rejected, because the\nanswers describe each unit individually — one insured person, one engraving,\none ticket holder — and collapsing them loses all but the first.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,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:`9`,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:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3807`}),_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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1200`}),_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:` \"additional_information\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"full_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Chidi Okafor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"date_of_birth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2014-09-03\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"full_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ngozi Okafor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"date_of_birth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2017-01-22\"`}),_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:[`The array length must equal `,_jsx(_components.code,{children:`quantity`}),` exactly. Errors name the person, not\njust the field — `,_jsx(_components.code,{children:`\"Date of Birth\" is required for JulsCare Dependent (person 2 of 2)`}),` — so you can tell which unit is incomplete.`]}),_jsxs(_components.p,{children:[`Dates are validated as real calendar dates: `,_jsx(_components.code,{children:`2015-02-31`}),` is rejected rather\nthan silently rolling forward to 3 March.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example cart item with custom fields:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,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:`13`,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:` \"product_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`}),_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:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4999`}),_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:` \"product_image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/bracelet.jpg\"`}),_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:` \"has_variation\"`}),_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:` \"product_variant_data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"none\"`}),_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:` \"additional_information\"`}),_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:` \"engraving_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Happy Anniversary\"`}),_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:` \"gift_wrap\"`}),_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:` \"font_style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"script\"`})]}),`\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(ParamField,{body:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`Customer’s email address`})}),`\n`,_jsx(ParamField,{body:`first_name`,type:`string`,required:true,id:`param-first-name`,children:_jsx(_components.p,{children:`Customer’s first name`})}),`\n`,_jsx(ParamField,{body:`last_name`,type:`string`,required:true,id:`param-last-name`,children:_jsx(_components.p,{children:`Customer’s last name`})}),`\n`,_jsx(ParamField,{body:`currency`,type:`string`,required:true,id:`param-currency`,children:_jsxs(_components.p,{children:[`Currency code (e.g., `,_jsx(_components.code,{children:`USD`}),`, `,_jsx(_components.code,{children:`NGN`}),`, `,_jsx(_components.code,{children:`GBP`}),`)`]})}),`\n`,_jsxs(ParamField,{body:`payment_type`,type:`string`,required:true,id:`param-payment-type`,children:[_jsxs(_components.p,{children:[`Payment type. Use `,_jsx(_components.code,{children:`one`}),` for one-time payments.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`one`}),`, `,_jsx(_components.code,{children:`multiple_time`})]})]}),`\n`,_jsx(ParamField,{body:`cart_unique_id`,type:`string`,id:`param-cart-unique-id`,children:_jsxs(_components.p,{children:[`Cart ID from `,_jsx(_components.code,{children:`/cart/validate`}),`. `,_jsx(_components.strong,{children:`Required for physical products.`}),` Auto-generated for digital products if not provided.`]})}),`\n`,_jsx(ParamField,{body:`delivery_details`,type:`object`,id:`param-delivery-details`,children:_jsxs(_components.p,{children:[`Shipping address and delivery preferences. `,_jsx(_components.strong,{children:`Required for physical products.`}),` Not needed for digital products.`]})}),`\n`,_jsx(ParamField,{body:`user_country`,type:`string`,id:`param-user-country`,children:_jsxs(_components.p,{children:[`Customer’s country code (e.g., `,_jsx(_components.code,{children:`US`}),`, `,_jsx(_components.code,{children:`NG`}),`). Auto-detected from IP if not provided.`]})}),`\n`,_jsxs(ParamField,{body:`payment_gateway`,type:`string`,id:`param-payment-gateway`,children:[_jsx(_components.p,{children:`Preferred payment gateway. Auto-selected based on currency if not provided.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`stripe`}),`, `,_jsx(_components.code,{children:`paystack`}),`, `,_jsx(_components.code,{children:`paypal`}),`, `,_jsx(_components.code,{children:`square`})]})]}),`\n`,_jsx(ParamField,{body:`is_coupon_used`,type:`boolean`,default:`false`,id:`param-is-coupon-used`,children:_jsx(_components.p,{children:`Whether a coupon code is being applied`})}),`\n`,_jsx(ParamField,{body:`coupon_code`,type:`string`,id:`param-coupon-code`,children:_jsxs(_components.p,{children:[`Coupon code to apply (if `,_jsx(_components.code,{children:`is_coupon_used`}),` is true)`]})}),`\n`,_jsxs(ParamField,{body:`payment_by`,type:`string`,required:true,id:`param-payment-by`,children:[_jsxs(_components.p,{children:[`Who is paying. `,_jsx(_components.strong,{children:`Values:`}),` `,_jsx(_components.code,{children:`customer`}),`, `,_jsx(_components.code,{children:`business`}),`, `,_jsx(_components.code,{children:`educator`})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Required, and it must be `,_jsx(_components.code,{children:`customer`}),` for a normal purchase.`]}),` Omitting it is\nrejected with a validation error. Sending any other value is accepted, but the\npayment then settles down a different path and `,_jsx(_components.strong,{children:`no merchant wallet is\ncredited`}),` — the charge succeeds and the money is not attributed. If a payment\ncompletes at the gateway but no wallet balance moves, check this field first.`]})})]}),`\n`,_jsx(ParamField,{body:`order_total_charge`,type:`number`,required:true,id:`param-order-total-charge`,children:_jsx(_components.p,{children:`Order total in the smallest currency unit. For an installment, send the plan total.`})}),`\n`,_jsx(Heading,{level:`3`,id:`installments`,children:`Installments`}),`\n`,_jsxs(_components.p,{children:[`The product must be sold in `,_jsx(_components.a,{href:`/payments/installments`,children:`installments`}),`, alone in the cart.`]}),`\n`,_jsx(ParamField,{body:`is_split`,type:`boolean`,default:`false`,id:`param-is-split`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` to pay in installments.`]})}),`\n`,_jsx(ParamField,{body:`payment_split_position`,type:`integer`,id:`param-payment-split-position`,children:_jsxs(_components.p,{children:[`Installment to pay. Required with `,_jsx(_components.code,{children:`is_split`}),`. `,_jsx(_components.code,{children:`1`}),` opens a new plan.`]})}),`\n`,_jsx(ParamField,{body:`installment_plan_id`,type:`integer`,id:`param-installment-plan-id`,children:_jsx(_components.p,{children:`Plan to pay. Required for position 2 and later.`})}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Each installment must be above the gateway minimum (e.g. $0.50 on Stripe, ₦50 on Paystack).`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`selling-a-sub-merchant’s-product`,children:`Selling a sub-merchant’s product`}),`\n`,_jsxs(_components.p,{children:[`A marketplace operator can sell a product from a sub-merchant’s catalogue\nthrough this endpoint. There is nothing extra to send: call it with your own API\nkey and put the sub-merchant’s `,_jsx(_components.code,{children:`product_id`}),` in the cart. Ownership, authorisation\nand commission are all resolved server-side from the product itself.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never send the seller’s id in the body. Ownership comes from the product record,\nso a caller cannot name a merchant they are not entitled to sell for. A cart\ncontaining a product you have no active marketplace relationship with is\nrejected with `,_jsx(_components.code,{children:`403 AUTH_PERMISSION_DENIED`}),`.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Rules that apply to a marketplace cart:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Every product in one cart must belong to the same merchant. A mixed-owner cart\nis rejected with `,_jsx(_components.code,{children:`400 MARKETPLACE_MIXED_OWNER_CART`}),` — an order settles to a\nsingle merchant, so there is no correct split for a mixed one.`]}),`\n`,_jsxs(_components.li,{children:[`Prices come from the catalogue, not from the request. The `,_jsx(_components.code,{children:`price`}),` you send on\neach cart line is used for display reconciliation only; the server re-derives\nthe total from the stored product price, any active deal, and the buyer’s\nmarket. If they disagree, the catalogue wins.`]}),`\n`,_jsxs(_components.li,{children:[`Commission is a `,_jsx(_components.strong,{children:`percentage`}),` of the sale, set per sub-merchant by the\noperator. There is no fixed-fee or markup option — to leave a sub-merchant\nexactly `,`$10.00 of a $`,`15.00 sale, set the rate to `,_jsx(_components.code,{children:`33.33%`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`How the money divides.`}),` The sub-merchant’s share is fixed by the commission\nthe operator agreed, and the Khaime transaction fee is carried by the operator\nout of their commission:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,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:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`sub-merchant = sale price − commission`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`operator = commission − Khaime fee`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`On a $15.00 sale at 33.33%, with the customer absorbing the fee:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Customer pays`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$16.20`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sub-merchant receives`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$10.00`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Operator receives`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$5.00`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Khaime fee`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`$1.20`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`If the operator absorbs the fee instead, the sub-merchant still receives exactly\n`,`$10.00 and the operator receives $`,`3.80. The sub-merchant’s number does not move.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The commission must cover the Khaime fee. If it does not, the intent is rejected\nwith `,_jsx(_components.code,{children:`400 MARKETPLACE_COMMISSION_BELOW_FEES`}),`, naming both amounts — raise the\ncommission rate for that merchant, or have the customer pay the transaction fee.`]})}),`\n`,_jsx(_components.p,{children:`The split is recorded when the intent is created, so the rate in force at\npurchase is the rate that settles, whatever the operator changes afterwards.\nWallets are credited when the payment succeeds, not when the intent is created.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`product-type-requirements`,children:`Product Type Requirements`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Physical`}),_jsx(_components.th,{children:`Digital/Gift Card`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cart_unique_id`})}),_jsxs(_components.td,{children:[`Required (from `,_jsx(_components.code,{children:`/cart/validate`}),`)`]}),_jsx(_components.td,{children:`Auto-generated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`delivery_details`})}),_jsx(_components.td,{children:`Required`}),_jsx(_components.td,{children:`Not needed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`user_country`})}),_jsx(_components.td,{children:`From address`}),_jsx(_components.td,{children:`Auto-detected from IP`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Cart validation step`}),_jsx(_components.td,{children:`Required`}),_jsx(_components.td,{children:`Not required`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,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:` \"status\"`}),_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:`\"Payment Intent Successful\"`}),_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:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJpbnRlbnRfaWQiOiJjYXJ0XzEyMzQ1Njc4...\"`}),_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:`\"cart_12345678-abcd-1234-efgh-567890abcdef\"`}),_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:`6179`}),_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:` \"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:` \"breakdown\"`}),_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:` \"subtotal\"`}),_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:` \"shipping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`500`}),_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:` \"tax\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`329`}),_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:`350`}),_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`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`token`})}),_jsxs(_components.td,{children:[`Signed token for `,_jsx(_components.code,{children:`@khaimehq/react`}),` checkout. HMAC-SHA256 signed, expires in 15 minutes.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cart_identifier`})}),_jsx(_components.td,{children:`Unique cart/transaction identifier for tracking`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`Final amount in cents (includes fees, shipping, tax)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{children:`Currency code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsxs(_components.td,{children:[`Payment status (`,_jsx(_components.code,{children:`pending`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown`})}),_jsxs(_components.td,{children:[`Payment breakdown: `,_jsx(_components.code,{children:`subtotal`}),`, `,_jsx(_components.code,{children:`discount`}),`, `,_jsx(_components.code,{children:`shipping`}),`, `,_jsx(_components.code,{children:`tax`}),`, `,_jsx(_components.code,{children:`transaction_fee`}),`, and `,_jsx(_components.code,{children:`customer_pays_fees`}),`. Amount fields are omitted when zero.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`showing-the-fee-to-the-customer`,children:`Showing the fee to the customer`}),`\n`,_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`breakdown.customer_pays_fees`}),` is `,_jsx(_components.code,{children:`true`}),`, the transaction fee is included in `,_jsx(_components.code,{children:`amount`}),` and returned as `,_jsx(_components.code,{children:`breakdown.transaction_fee`}),`. `,_jsx(_components.strong,{children:`Show it as its own line in your order summary, before the customer pays`}),` — it’s best practice for transparency, and a total higher than the catalog price with no explanation erodes trust and invites disputes. See `,_jsx(_components.a,{href:`/payments/overview#show-the-fee-when-the-customer-pays-it`,children:`Fees`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Who pays is the business’s `,_jsx(_components.code,{children:`customer_pays_transaction_fee`}),` setting. When an operator sells a sub-merchant’s product, it’s the `,_jsx(_components.strong,{children:`operator’s`}),` decision.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Show as`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.subtotal`})}),_jsx(_components.td,{children:`Items`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.discount`})}),_jsx(_components.td,{children:`Discount (negative)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.shipping`})}),_jsx(_components.td,{children:`Shipping`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.tax`})}),_jsx(_components.td,{children:`Tax`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`breakdown.transaction_fee`})}),_jsxs(_components.td,{children:[`”Transaction fee” — only when `,_jsx(_components.code,{children:`customer_pays_fees`}),` is `,_jsx(_components.code,{children:`true`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amount`})}),_jsx(_components.td,{children:`Total to pay`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The total you display must equal `,_jsx(_components.code,{children:`amount`}),`, because that’s what the customer is charged. To show the breakdown while the customer is still reviewing their cart, call `,_jsx(_components.a,{href:`/api-reference/commerce/cart-payment-preview`,children:`Preview Payment`}),` first — it returns the same numbers without creating an intent.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`transaction_fee`}),` is returned even when the merchant absorbs the fee. Decide whether to show the line from `,_jsx(_components.code,{children:`customer_pays_fees`}),`, not from whether `,_jsx(_components.code,{children:`transaction_fee`}),` is present — otherwise you’ll show customers a fee they aren’t paying.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Token Expiration:`}),` Tokens expire after 15 minutes. If a customer takes too long to complete payment, you’ll need to create a new payment intent.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(Heading,{level:`3`,id:`physical-product-checkout`,children:`Physical Product Checkout`}),`\n`,_jsx(_components.p,{children:`Requires cart validation first to calculate shipping.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,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:`38`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"physical_product\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 12345,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart_unique_id\": \"bc59bc1f-e1b0-4ee5-a9cb-b966042ce38f\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 12345,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Premium T-Shirt\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/shirt.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"main_variant\": \"Large\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"least_sub_variant_id\": \"var_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"Large / Blue\"`})}),`\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(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"john@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"John\",`})}),`\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:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"delivery_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"national_delivery\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"John Doe\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"123 Main St\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"city\": \"Austin\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"Texas\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zip_code\": \"78701\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"United States\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country_code\": \"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:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`digital-product-checkout`,children:`Digital Product Checkout`}),`\n`,_jsxs(_components.p,{children:[`No cart validation or address required. Supports multi-item carts. Uses `,_jsx(_components.strong,{children:`simplified cart schema`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`34`,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:`34`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Digital Bundle (2 items)\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 4000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 4821,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 1500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/ebook.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 4822,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/course.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_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\": \"Ada\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Lovelace\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_coupon_used\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_second_time_payment\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Simplified schema for digital products:`}),` Do NOT include `,_jsx(_components.code,{children:`product_title`}),`, `,_jsx(_components.code,{children:`product_thumbnail`}),`, `,_jsx(_components.code,{children:`main_variant`}),`, `,_jsx(_components.code,{children:`least_sub_variant_id`}),`, or `,_jsx(_components.code,{children:`shipping_rate`}),` in cart items. These are only for physical products. You can still include `,_jsx(_components.code,{children:`additional_information`}),` for custom fields.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`digital-product-with-custom-fields`,children:`Digital Product with Custom Fields`}),`\n`,_jsx(_components.p,{children:`Example showing a digital product (e.g., personalized certificate) with custom fields.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`28`,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:`28`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Personalized Certificate\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 5500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/certificate.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additional_information\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"recipient_name\": \"John Michael Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"completion_date\": \"2024-06-15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"course_name\": \"Advanced Photography\"`})}),`\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(_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:` \"email\": \"buyer@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"John\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`physical-product-with-custom-fields`,children:`Physical Product with Custom Fields`}),`\n`,_jsx(_components.p,{children:`Example showing a product where the business has configured custom fields for personalization.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Product’s custom fields (configured by business):`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field Key`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_line_1`})}),_jsx(_components.td,{children:`First Line`}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_line_2`})}),_jsx(_components.td,{children:`Second Line`}),_jsx(_components.td,{children:`text`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`engraving_font`})}),_jsx(_components.td,{children:`Font Style`}),_jsx(_components.td,{children:`select`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`gift_box`})}),_jsx(_components.td,{children:`Premium Gift Box`}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`special_instructions`})}),_jsx(_components.td,{children:`Special Instructions`}),_jsx(_components.td,{children:`textarea`}),_jsx(_components.td,{children:`No`})]})]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Checkout request with customer-provided values:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`45`,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:`45`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"physical_product\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_id\": 98765,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart_unique_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 98765,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 7500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Custom Engraved Bracelet\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/bracelet.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"main_variant\": \"Gold\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"least_sub_variant_id\": \"var_gold_sm\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"Gold / Small\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"additional_information\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_line_1\": \"Forever Yours\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_line_2\": \"2024\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"engraving_font\": \"script\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gift_box\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"special_instructions\": \"Please double-check engraving spelling\"`})}),`\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(_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:` \"email\": \"customer@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Sarah\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Johnson\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"delivery_details\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"national_delivery\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": [{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Sarah Johnson\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"address\": \"456 Oak Avenue\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"city\": \"San Francisco\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"state\": \"California\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"zip_code\": \"94102\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country\": \"United States\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"country_code\": \"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:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Accessing custom field values:`}),` The `,_jsx(_components.code,{children:`additional_information`}),` data is included in order webhooks and the Order API response. Use this to fulfill personalized orders correctly.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`gift-card-checkout`,children:`Gift Card Checkout`}),`\n`,_jsx(_components.p,{children:`Same flow as digital products. Each gift card item creates a separate gift card code.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,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:`26`,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/product-payment/intent\"`}),_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_live_your_api_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:` \"product_type\": \"gift_card\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_title\": \"Gift Cards (2)\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\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:` \"product_id\": 5001,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 5000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_image\": \"https://example.com/giftcard.jpg\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"has_variation\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"product_variant_data\": \"none\"`})}),`\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(_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\": \"John\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Smith\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_coupon_used\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"is_second_time_payment\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`pay-in-installments`,children:`Pay in Installments`}),`\n`,_jsx(_components.p,{children:`First installment:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,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/product-payment/intent`}),_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:` \"product_type\": \"digital\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"email\": \"ada@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"first_name\": \"Ada\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"last_name\": \"Lovelace\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"currency\": \"USD\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_type\": \"one\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_by\": \"customer\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order_total_charge\": 10000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"cart\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` { \"product_id\": 3046, \"quantity\": 1, \"has_variation\": false, \"product_image\": \"\", \"price\": 10000, \"product_variant_data\": \"Quantity: 1\" }`})}),`\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:` \"is_split\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"payment_split_position\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Next installment: same body with the position and plan.`}),`\n`,_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:` \"is_split\"`}),_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_split_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"installment_plan_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`812`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Send the cart line again, with its `,_jsx(_components.code,{children:`additional_information`}),` if the product has `,_jsx(_components.a,{href:`/api-reference/commerce/product-custom-fields`,children:`custom fields`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`accepting-payments`,children:`Accepting Payments`}),`\n`,_jsx(_components.p,{children:`Once you receive the response, collect payment from your customer using one of these options:`}),`\n`,_jsx(Heading,{level:`3`,id:`option-1-embedded-checkout-recommended`,children:`Option 1: Embedded Checkout (Recommended)`}),`\n`,_jsxs(_components.p,{children:[`Embed the checkout directly in your app using `,_jsx(_components.code,{children:`@khaimehq/react`}),`.`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Install @khaimehq/react`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`npm`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`yarn`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`yarn`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`pnpm`,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pnpm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @khaimehq/react`})]}),`\n`]})})})]})}),_jsx(Step,{title:`Render the Checkout`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`tsx`,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:`tsx`,children:_jsxs(_components.code,{language:`tsx`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`KhaimeCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '@khaimehq/react'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CheckoutPage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#4EC9B0`},children:`KhaimeCheckout`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Payment successful - redirect to confirmation`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `/order/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`paymentData`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`transaction_id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` onError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Payment failed:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},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(Card,{title:`React SDK Documentation`,icon:`react`,href:`/sdks/react/overview`,children:_jsx(_components.p,{children:`See the full React SDK documentation for all available options`})}),`\n`,_jsx(Heading,{level:`3`,id:`option-2-redirect-checkout`,children:`Option 2: Redirect Checkout`}),`\n`,_jsx(_components.p,{children:`Redirect the customer to Khaime’s hosted checkout page:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payment_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_EXPIRED`})}),_jsx(_components.td,{children:`Cart ID is no longer valid (carts expire after 30 minutes)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_NOT_FOUND`})}),_jsx(_components.td,{children:`Invalid cart ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CART_INVALID`})}),_jsxs(_components.td,{children:[`Missing `,_jsx(_components.code,{children:`cart_unique_id`}),` for physical products, or an empty cart`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PRODUCT_NOT_FOUND`})}),_jsxs(_components.td,{children:[`Product no longer available. The message names the missing `,_jsx(_components.code,{children:`product_id`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PAYMENT_INTENT_FAILED`})}),_jsx(_components.td,{children:`Error creating payment intent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_FAILED`})}),_jsxs(_components.td,{children:[`Invalid request parameters — also returned for an unrecognised `,_jsx(_components.code,{children:`additional_information`}),` key, a wrong-length per-unit array, or a value failing its field’s type (a date that is not a real calendar date, a malformed email, a `,_jsx(_components.code,{children:`select`}),` value outside the defined options). The message names the field and, for multi-unit lines, which unit.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VALIDATION_MISSING_FIELD`})}),_jsx(_components.td,{children:`A required custom field has no answer. The message names the field, the product, and which unit of a multi-unit line.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTH_PERMISSION_DENIED`})}),_jsx(_components.td,{children:`Selling a product belonging to a merchant you have no active marketplace relationship with`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKETPLACE_MIXED_OWNER_CART`})}),_jsx(_components.td,{children:`One cart contains products from more than one merchant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKETPLACE_COMMISSION_BELOW_FEES`})}),_jsx(_components.td,{children:`The commission on this sale does not cover the Khaime transaction fee. The message names both amounts.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_PLAN_NOT_FOUND`})}),_jsx(_components.td,{children:`No such plan for this customer and product`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_NOT_FOUND`})}),_jsx(_components.td,{children:`No installment at that position`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_ALREADY_PAID`})}),_jsx(_components.td,{children:`Installment already paid`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INSTALLMENT_NOT_ALLOWED`})}),_jsx(_components.td,{children:`Plan completed, cancelled or defaulted`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Every error carries a stable string `,_jsx(_components.code,{children:`error_code`}),` alongside a human-readable\n`,_jsx(_components.code,{children:`message`}),`. Switch on `,_jsx(_components.code,{children:`error_code`}),` — the message wording changes, the code does\nnot. `,_jsx(_components.code,{children:`VALIDATION_ERROR`}),` was never a real code; use `,_jsx(_components.code,{children:`VALIDATION_FAILED`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`confirming-payment`,children:`Confirming Payment`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Always verify payments via `,_jsx(_components.a,{href:`/webhooks/overview`,children:`webhooks`}),` before fulfilling orders. Frontend callbacks are for UI purposes only.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Digital Cart Checkout`,icon:`download`,href:`/api-reference/commerce/digital-cart-checkout`,children:_jsx(_components.p,{children:`Complete guide for digital product multi-item carts`})}),_jsx(Card,{title:`Physical Checkout Guide`,icon:`truck`,href:`/api-reference/checkout-integration-guide`,children:_jsx(_components.p,{children:`Complete guide for physical products with shipping`})}),_jsx(Card,{title:`Cart Validation`,icon:`cart-shopping`,href:`/api-reference/commerce/validate-cart`,children:_jsx(_components.p,{children:`Validate cart and calculate shipping (physical products)`})}),_jsx(Card,{title:`Webhooks`,icon:`webhook`,href:`/webhooks/overview`,children:_jsx(_components.p,{children:`Listen for payment completion events`})})]})]})}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 Product Payment Intent","api":"POST /product-payment/intent","description":"Create a payment intent for Khaime catalog products","href":"/api-reference/commerce/payment-intent"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Create Product Payment Intent","slug":"create-product-payment-intent","depth":1,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Installments","slug":"installments","depth":3,"children":[]}]},{"title":"Selling a sub-merchant’s product","slug":"selling-a-sub-merchant’s-product","depth":2,"children":[]},{"title":"Product Type Requirements","slug":"product-type-requirements","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Response Fields","slug":"response-fields","depth":3,"children":[]},{"title":"Showing the fee to the customer","slug":"showing-the-fee-to-the-customer","depth":3,"children":[]}]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"Physical Product Checkout","slug":"physical-product-checkout","depth":3,"children":[]},{"title":"Digital Product Checkout","slug":"digital-product-checkout","depth":3,"children":[]},{"title":"Digital Product with Custom Fields","slug":"digital-product-with-custom-fields","depth":3,"children":[]},{"title":"Physical Product with Custom Fields","slug":"physical-product-with-custom-fields","depth":3,"children":[]},{"title":"Gift Card Checkout","slug":"gift-card-checkout","depth":3,"children":[]},{"title":"Pay in Installments","slug":"pay-in-installments","depth":3,"children":[]}]},{"title":"Accepting Payments","slug":"accepting-payments","depth":2,"children":[{"title":"Option 1: Embedded Checkout (Recommended)","slug":"option-1-embedded-checkout-recommended","depth":3,"children":[]},{"title":"Option 2: Redirect Checkout","slug":"option-2-redirect-checkout","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Confirming Payment","slug":"confirming-payment","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"","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=\"json\">\u003ccode language=\"json\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Payment Intent Successful\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"token\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"eyJpbnRlbnRfaWQiOiJjYXJ0XzEyMzQ1Njc4...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cart_identifier\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cart_12345678-abcd-1234-efgh-567890abcdef\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">6179\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"USD\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"pending\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"breakdown\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"subtotal\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"shipping\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">500\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"tax\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">329\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"transaction_fee\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">350\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_pays_fees\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create Product Payment Intent","path":"/product-payment/intent","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":{"X-API-Key":{"schema":[{"type":"string","description":"Your API key","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"product_type":[{"type":"string","description":"Type of product being purchased. Determines required fields and checkout flow. Values: `physical_product` , `digital` , `gift_card`","required":true}],"cart":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Array of cart items.","required":true}],"email":[{"type":"string","description":"Customer’s email address","required":true}],"first_name":[{"type":"string","description":"Customer’s first name","required":true}],"last_name":[{"type":"string","description":"Customer’s last name","required":true}],"currency":[{"type":"string","description":"Currency code (e.g., `USD` , `NGN` , `GBP` )","required":true}],"payment_type":[{"type":"string","description":"Payment type. Use `one` for one-time payments. Values: `one` , `multiple_time`","required":true}],"cart_unique_id":[{"type":"string","description":"Cart ID from `/cart/validate` . Required for physical products. Auto-generated for digital products if not provided."}],"delivery_details":[{"type":"object","properties":{},"description":"Shipping address and delivery preferences. Required for physical products. Not needed for digital products."}],"user_country":[{"type":"string","description":"Customer’s country code (e.g., `US` , `NG` ). Auto-detected from IP if not provided."}],"payment_gateway":[{"type":"string","description":"Preferred payment gateway. Auto-selected based on currency if not provided. Values: `stripe` , `paystack` , `paypal` , `square`"}],"is_coupon_used":[{"type":"boolean","description":"Whether a coupon code is being applied"}],"coupon_code":[{"type":"string","description":"Coupon code to apply (if `is_coupon_used` is true)"}],"payment_by":[{"type":"string","description":"Who is paying. Values: `customer` , `business` , `educator`","required":true}],"order_total_charge":[{"type":"number","description":"Order total in the smallest currency unit. For an installment, send the plan total.","required":true}],"is_split":[{"type":"boolean","description":"`true` to pay in installments."}],"payment_split_position":[{"type":"integer","description":"Installment to pay. Required with `is_split` . `1` opens a new plan."}],"installment_plan_id":[{"type":"integer","description":"Plan to pay. Required for position 2 and later."}]}}],"examples":{"example":{"value":{"product_type":"\u003cstring>","cart":[{}],"email":"\u003cstring>","first_name":"\u003cstring>","last_name":"\u003cstring>","currency":"\u003cstring>","payment_type":"\u003cstring>","cart_unique_id":"\u003cstring>","delivery_details":{},"user_country":"\u003cstring>","payment_gateway":"\u003cstring>","is_coupon_used":true,"coupon_code":"\u003cstring>","payment_by":"\u003cstring>","order_total_charge":123,"is_split":true,"payment_split_position":123,"installment_plan_id":123}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"khaimeai-4786d0b2","siteName":"Khaime Documentation","title":"Create Product Payment Intent - Khaime Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T20:02:37.792Z","originalFileLocation":"api-reference/commerce/payment-intent.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 payment intent for Khaime catalog products\">\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 Product Payment Intent - Khaime Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a payment intent for Khaime catalog products\">\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/commerce/payment-intent\">\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=Commerce+API\u0026amp;title=Create+Product+Payment+Intent\u0026amp;description=Create+a+payment+intent+for+Khaime+catalog+products\u0026amp;theme=ca430f12ef21b225783627af\u0026amp;signature=6e1cda34d26ffa877771d4199189db39f37bff5056712c8d071cfecdb776d81b\">\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 Product Payment Intent - Khaime Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a payment intent for Khaime catalog products\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://khaimeai-4786d0b2.mintlify.site/_mintlify/api/og/v2?division=Commerce+API\u0026amp;title=Create+Product+Payment+Intent\u0026amp;description=Create+a+payment+intent+for+Khaime+catalog+products\u0026amp;theme=ca430f12ef21b225783627af\u0026amp;signature=6e1cda34d26ffa877771d4199189db39f37bff5056712c8d071cfecdb776d81b\">\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/commerce/payment-intent\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/commerce/payment-intent.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.khaime.com/#organization\",\"name\":\"Khaime Documentation\",\"url\":\"https://docs.khaime.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://app.khaime.com/khaime-logo.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.khaime.com#website\",\"name\":\"Khaime Documentation\",\"url\":\"https://docs.khaime.com\",\"publisher\":{\"@id\":\"https://docs.khaime.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.khaime.com/api-reference/commerce/payment-intent#webpage\",\"url\":\"https://docs.khaime.com/api-reference/commerce/payment-intent\",\"name\":\"Create Product Payment Intent\",\"description\":\"Create a payment intent for Khaime catalog products\",\"dateModified\":\"2026-11-16T20:02:37.792Z\",\"isPartOf\":{\"@id\":\"https://docs.khaime.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.khaime.com/api-reference/commerce/payment-intent#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.khaime.com/api-reference/commerce/payment-intent#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Commerce API\",\"item\":\"https://docs.khaime.com/api-reference/commerce/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Product Payment Intent\",\"item\":\"https://docs.khaime.com/api-reference/commerce/payment-intent\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.khaime.com/api-reference/commerce/payment-intent#apireference\",\"headline\":\"Create Product Payment Intent\",\"name\":\"Create Product Payment Intent\",\"description\":\"Create a payment intent for Khaime catalog products\",\"url\":\"https://docs.khaime.com/api-reference/commerce/payment-intent\",\"mainEntityOfPage\":{\"@id\":\"https://docs.khaime.com/api-reference/commerce/payment-intent#webpage\"},\"dateModified\":\"2026-11-16T20:02:37.792Z\",\"publisher\":{\"@id\":\"https://docs.khaime.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.khaime.com#website\"}}]}\u003c/script>\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/commerce/payment-intent.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","pages":[{"title":"Documentation","href":"/introduction"}]},{"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","description":"Preview payment breakdown before creating payment intent","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","description":"Multi-item cart checkout for digital products, gift cards, and downloadable content","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","pages":[{"title":"Plugins","href":"/plugins/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/ai-builders/lovable"}]}]},"basePath":"","title":"Create Product Payment Intent - Khaime Documentation","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js"]}