curl "https://api.khaime.com/api/v1/fees/breakdown?amount=1154¤cy=GBP&customer_country=GB" \
-H "X-API-Key: pk_sandbox_your_key"
Products & Pricing
Get Fee Breakdown
Estimate the transaction fee and customer total for an amount.
GET
/
fees
/
breakdown
curl "https://api.khaime.com/api/v1/fees/breakdown?amount=1154¤cy=GBP&customer_country=GB" \
-H "X-API-Key: pk_sandbox_your_key"
Intro
Returns the transaction fee for an amount, who pays it under your business’s settings, and what the customer’s total would be. It needs only an amount and currency, so you can show a fee estimate early in checkout — before the customer has entered their details.Context
This is the early-checkout estimate. Once the cart and customer details are complete, use Preview Payment for the exact final payment. See Prices, Fees and Totals for how they fit together. The fee policy comes from the business that owns the API key. For a marketplace operator, that’s the operator’s setting, which its sub-merchants inherit.Hows
Query parameters
integer
required
Order amount in the smallest currency unit (e.g.
1500 for $15.00).string
required
3-letter ISO code of
amount, e.g. USD.string
2-letter ISO code of the customer’s country. Affects whether the local or international rate applies.
Response
Unlike most endpoints, amounts in this response are in major units (e.g.
11.54), not the smallest currency unit.{
"status": "success",
"data": {
"business_settings": {
"business_name": "Visit Nigeria",
"customer_pays_transaction_fee": true,
"payment_gateway": "stripe",
"currency": "GBP"
},
"order_summary": { "subtotal": 11.54, "currency": "GBP" },
"fee_breakdown": {
"transaction_fee": { "amount": 0.89, "gateway": "stripe", "paid_by": "customer" },
"total_additional_fees": 0.89
},
"customer_totals": {
"pays_subtotal": 11.54,
"pays_additional_fees": 0.89,
"pays_total": 12.43
}
}
}
| Field | Show as |
|---|---|
business_settings.customer_pays_transaction_fee | Whether to show a fee line at all |
customer_totals.pays_additional_fees | ”Transaction fee” |
customer_totals.pays_total | Estimated total |
curl "https://api.khaime.com/api/v1/fees/breakdown?amount=1154¤cy=GBP&customer_country=GB" \
-H "X-API-Key: pk_sandbox_your_key"
Why nots
- It’s an estimate for an amount, not a cart. It doesn’t know about discounts, shipping, tax or conversion. Use Preview Payment for the final figure.
- It doesn’t reserve a rate. The charge is whatever the payment intent returns.
