Marketplace
Setup Merchant Payout
Configure payout settings for a sub-merchant so they can receive funds.
POST
Documentation Index
Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
Use this file to discover all available pages before exploring further.
Setup Merchant Payout
Configure payout for a sub-merchant. The country determines which payment infrastructure is used and what information is required. Once configured, the merchant’sbaseline_currency is automatically set based on their country.
This is a required step before a sub-merchant can receive charges. Until payout is configured, any charge attempt with
sub_merchant_id will be blocked. Check payout.charge_eligible on Get Merchant Details to confirm readiness.For NGN (
NG) merchants, the settlement_bank must be a bank name from Get Supported Payout Banks. Retrieve the list first to ensure a valid name is used.Data Storage
All bank details are stored in the KycSubmissions table, which is the single source of truth for both KYC status and payout information. This endpoint creates or updates the KycSubmissions record for the merchant.Path Parameters
The ID of the sub-merchant to configure payout for.
Request Body
2-letter ISO country code (e.g.,
US, NG, GB). This determines the payout infrastructure and baseline_currency.For African Countries (NG, GH, ZA, KE)
These countries use local bank transfers. Include bank account details:Bank name for the settlement bank. Required for
NG, GH, ZA, KE. For NGN merchants, this must exactly match a name from Get Supported Payout Banks.Bank account number. Required for
NG, GH, ZA, KE.Account holder name. Required for
NG, GH, ZA, KE.For Other Countries (US, GB, CA, EU, etc.)
These countries use Stripe Connect. The merchant must complete an onboarding flow:Merchant’s email address. Required for non-African countries.
Response
African Countries (Immediate Setup)
Whencountry is NG, GH, ZA, or KE, payout is configured immediately and bank details are stored in KycSubmissions:
Other Countries (Onboarding Required)
For international countries, the merchant must complete Stripe Connect onboarding:Where Data is Stored
| Data | Storage Location |
|---|---|
| Bank name | KycSubmissions.bank_name |
| Account number | KycSubmissions.bank_account_number |
| Account name | KycSubmissions.bank_account_name |
| Sort code | KycSubmissions.bank_sort_code |
| Stripe account ID | KycSubmissions.stripe_account_id |
| KYC status | KycSubmissions.status |
| Settlement currency | KycSubmissions.settlement_currency |
| Date connected | Educatorportfolio.date_connected |
Important: The
KycSubmissions table is the single source of truth for all KYC and bank details. Legacy fields in Educatorportfolio (like educator_bank_name) are deprecated and no longer used.Country to Currency Mapping
| Country | Currency | Payout Type |
|---|---|---|
NG | NGN | Immediate |
GH | GHS | Immediate |
ZA | ZAR | Immediate |
KE | KES | Immediate |
US | USD | Onboarding Required |
GB | GBP | Onboarding Required |
CA | CAD | Onboarding Required |
| EU countries | EUR | Onboarding Required |
Error Codes
| Status | Error | Fix |
|---|---|---|
400 | country is required | Include the country field |
400 | settlement_bank, account_number, and account_name are required | For African countries, include all bank details |
400 | email is required | For non-African countries, include the email |
400 | Payout is already set up for this merchant | Payout has already been configured — use Update Payout instead |
403 | This endpoint is restricted to marketplace operators | Your account must have marketplace mode enabled |
404 | Active merchant relationship not found | The merchant is not linked to your marketplace |
How funds are split at charge time
Once payout is configured, funds are automatically split every time a charge is made with this merchant’ssub_merchant_id:
| Recipient | Amount |
|---|---|
| Sub-merchant | Charge amount minus commission minus platform fee — transferred automatically to their bank/Stripe account |
| Marketplace operator | Commission — stays in the operator’s account |
| Khaime | Platform fee — taken upfront as part of the charge |
Checking readiness before charging
After calling this endpoint, poll Get Merchant Details and checkpayout.charge_eligible:
charge_eligible | Meaning |
|---|---|
true | Ready — you can charge this merchant via sub_merchant_id |
false | Not ready — payout setup is incomplete or Stripe onboarding is pending |
Next Steps
After confirmingcharge_eligible: true:
- For NGN/African merchants:
charge_eligibleistrueimmediately after this endpoint returnspayout_ready: true. No further action needed. - For international merchants:
charge_eligiblebecomestrueonly after the merchant completes Stripe onboarding via theonboarding_urlreturned in the response. Poll Get Merchant Details untilcharge_eligibleflips totrue.
- Process charges on behalf of the merchant using the Create Charge endpoint with
sub_merchant_id - View the merchant’s products using List Merchant Products
