Skip to main content

Intro

Khaime has a few read-only calls that answer “what will the customer pay?” at different points in checkout. Used together, they let your UI show the right price, fee and total at every step — and the charge always matches what the customer saw.

The calls, in checkout order

You don’t need every call. A single-page checkout with all details on one form can go straight from Get Product to Preview Payment.

Hows

Keep four things the same

  1. One currency everywhere. Send the customer’s chosen code to Get Product, Get Fee Breakdown, Preview Payment and the intent.
  2. Same body for preview and intent. Preview Payment takes exactly the body you’ll send to Create Product Payment Intent, so build it once and send it twice.
  3. Show the fee when the customer pays it. When customer_pays_fees is true, show the transaction fee as its own line. See Fees.
  4. The intent is the charge. The breakdown and preview are for display. What the customer pays is the intent’s amount.

Example: review step, then pay

Why nots

  • Don’t compute fees or totals yourself. Fees depend on currency, gateway, country and the merchant’s settings, and they change. Read them from Khaime.
  • Preview Payment needs the full cart. It validates everything the intent does, including required custom fields, so call it once those are filled in. Use Get Fee Breakdown before that.
  • A preview isn’t a reservation. Rates can move between preview and payment. If the customer waits a long time, preview again.