curl https://api.khaime.com/api/v1/marketplace/my-marketplace \
-H "X-API-Key: pk_sandbox_your_key"
Marketplace
Get My Marketplace
For sub-merchants: look up which marketplace you belong to and your effective commission rate.
GET
/
marketplace
/
my-marketplace
curl https://api.khaime.com/api/v1/marketplace/my-marketplace \
-H "X-API-Key: pk_sandbox_your_key"
Intro
Lets a sub-merchant check which marketplace operator they’re linked to and the commission rate currently applied to their sales.Context
This is the sub-merchant-facing counterpart to the operator-facing marketplace endpoints. Call this with a sub-merchant’s own API key — not the operator’s — to find out which marketplace they’re linked to. Unlike most other
/marketplace/* endpoints, it is not restricted to marketplace operators.commission_rate returned here reflects any per-merchant override the operator has set via Update Commission or Update Merchant — this is the rate that will actually apply the next time Create Charge processes a marketplace sale for this merchant.
Hows
Response
{
"success": true,
"message": "Marketplace details retrieved",
"data": {
"marketplace": {
"id": 42,
"educator_email": "ops@marketplace.com"
},
"commission_rate": "0.0500"
}
}
marketplace only includes id and educator_email — no business/display name is returned by this endpoint today, and note the field is educator_email here rather than the business_email name other partner endpoints use. commission_rate is this caller’s own effective rate, not the operator’s default — it already reflects any per-merchant override set via Update Commission.commission_rate is returned as the raw decimal value — a string like "0.0500", or null if never set — not a JS number. Parse it with Number(...) before doing arithmetic.data.marketplace is absent entirely — see the 404 below.
Error Codes
| Status | Error Code | Cause |
|---|---|---|
404 | BUSINESS_NOT_FOUND | You are not currently linked to any marketplace. |
400 | INTERNAL_ERROR | Unexpected server error. |
curl https://api.khaime.com/api/v1/marketplace/my-marketplace \
-H "X-API-Key: pk_sandbox_your_key"
Whys
Sub-merchants need visibility into their own marketplace relationship and effective rate without needing operator-level permissions — a merchant reconciling their own payouts shouldn’t have to ask their marketplace operator what rate is being applied. Keeping this endpoint open to any linked sub-merchant (rather than gating it behind marketplace-operator status like most/marketplace/* routes) reflects that it answers “what’s happening to my account,” not “what am I operating.”
