curl -X PATCH https://api.khaime.com/api/v1/merchants/892/holding-currencies \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{"enabled_holding_currencies": ["NGN", "USD"]}'
Marketplace
Update Holding Currencies
Set which currencies a sub-merchant holds in its wallet.
PATCH
/
merchants
/
{merchantId}
/
holding-currencies
curl -X PATCH https://api.khaime.com/api/v1/merchants/892/holding-currencies \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{"enabled_holding_currencies": ["NGN", "USD"]}'
Intro
Sets the currencies a sub-merchant holds. When a customer pays in a currency the sub-merchant holds, their share is credited in that currency. Otherwise it is credited in their settlement currency. Payouts are always made in the settlement currency. See Holding currencies.Context
Get Merchant Details returns the current list aspayout.enabled_currencies, and payout.settlement_currency is the currency the list must include.
Hows
Path Parameters
integer
required
The sub-merchant’s business ID (
merchant_id from List Merchants).Request Body
string[]
required
The full list of currencies to hold, as three-letter ISO 4217 codes, for example
["NGN", "USD"]. It replaces the current list.- It must include the sub-merchant’s settlement currency, if they have one.
- Each currency must be one a business can hold: a currency returned by Get Currencies with
can_business_collect=true. A currency the sub-merchant already holds stays accepted.
Response
{
"message": "Holding currencies updated",
"success": true,
"status": true,
"data": {
"settlement_currency": "NGN",
"enabled_holding_currencies": ["NGN", "USD"]
}
}
settlement_currency is null if the sub-merchant has not submitted KYC yet.
Error Codes
| Status | Error Code | Cause |
|---|---|---|
400 | VALIDATION_FAILED | enabled_holding_currencies is missing or empty, contains a code that is not three letters, contains a currency a business cannot hold, or does not include the settlement currency. The message says which. |
401 | — | Missing or invalid X-API-Key header. |
403 | AUTH_PERMISSION_DENIED | Your business isn’t set up as a marketplace operator. |
404 | BUSINESS_NOT_FOUND | No active merchant relationship exists for merchantId under your marketplace. |
500 | INTERNAL_ERROR | Unexpected server error. |
curl -X PATCH https://api.khaime.com/api/v1/merchants/892/holding-currencies \
-H "X-API-Key: pk_sandbox_your_key" \
-H "Content-Type: application/json" \
-d '{"enabled_holding_currencies": ["NGN", "USD"]}'
