Koywe
On this page

Organizations & Merchants

The Organization-Merchant hierarchy is the foundation of how you structure your business in Koywe Payments.

Organizations

An Organization is the top-level entity that represents your company in the Koywe system.

What is an Organization?

  • The root entity for your entire company
  • Can contain multiple merchants (business units)
  • Manages company-wide users and permissions
  • Controls API credentials and access
  • Handles organization-level reporting and billing

Organization Permissions

Organizations have hierarchical permissions:

  • Organization-level users can access all merchants within the organization
  • Root users have full administrative access
  • API credentials can be scoped to organization or merchant level
Drawing diagram…

Merchants

A Merchant represents an individual business unit, brand, or operational entity within your organization.

What is a Merchant?

  • A sub-entity under an organization
  • Has its own virtual accounts for each currency
  • Processes payments independently
  • Maintains separate transaction history
  • Can have specific users and permissions

When to Use Multiple Merchants

Use separate merchants when you need to:

Separate Multiple Brands

If you operate multiple brands or storefronts, each can be a separate merchant:

  • Acme Store (main e-commerce)
  • Acme Marketplace (peer-to-peer platform)
  • Acme Services (consulting business)
Manage Franchises or Locations

For franchise or multi-location businesses:

  • Store Location 1 (Bogotá)
  • Store Location 2 (Medellín)
  • Store Location 3 (Cali)
Separate Business Lines

Different types of businesses under one company:

  • Retail Division
  • Wholesale Division
  • Services Division
Isolate Financial Operations

Keep financial operations separate for:

  • Different legal entities
  • Different tax jurisdictions
  • Separate accounting/reconciliation

Merchant Automatic Resources

When a merchant is created, Koywe automatically provisions:

  1. Virtual Accounts: One for each supported currency

    • COP (Colombian Peso)
    • BRL (Brazilian Real)
    • MXN (Mexican Peso)
    • CLP (Chilean Peso)
    • USD (US Dollar)
    • EUR (Euro)
    • And more…
  2. Default Contact: Merchant information as a contact

    • Used for compliance and reporting
    • Represents the merchant in transactions

How They Work Together

Drawing diagram…

API Operations

Getting Organization Information

async function getOrganizations(token) {
  const response = await axios.get(
    'https://api-sandbox.koywe.com/api/v1/user/organizations',
    {
      headers: { 'Authorization': `Bearer ${token}` }
    }
  );
  
  return response.data;
}
 
// Usage
const orgs = await getOrganizations(token);
console.log('Organizations:', orgs);

Response:

JSON
[
  {
    "id": "org_abc123",
    "name": "Acme Corporation",
    "country": "CO",
    "createdAt": "2025-01-01T00:00:00Z"
  }
]

Listing Merchants in an Organization

async function getMerchants(token, organizationId) {
  const response = await axios.get(
    `https://api-sandbox.koywe.com/api/v1/organizations/${organizationId}/merchants`,
    {
      headers: { 'Authorization': `Bearer ${token}` }
    }
  );
  
  return response.data;
}
 
// Usage
const merchants = await getMerchants(token, 'org_abc123');
console.log('Merchants:', merchants);

Response:

JSON
[
  {
    "id": "mrc_xyz789",
    "name": "Acme Store",
    "organizationId": "org_abc123",
    "status": "ACTIVE",
    "createdAt": "2025-01-15T00:00:00Z"
  },
  {
    "id": "mrc_def456",
    "name": "Acme Marketplace",
    "organizationId": "org_abc123",
    "status": "ACTIVE",
    "createdAt": "2025-02-01T00:00:00Z"
  }
]

Getting Specific Merchant Details

JavaScript
async function getMerchant(token, organizationId, merchantId) {
  const response = await axios.get(
    `https://api-sandbox.koywe.com/api/v1/organizations/${organizationId}/merchants/${merchantId}`,
    {
      headers: { 'Authorization': `Bearer ${token}` }
    }
  );
  
  return response.data;
}
 
// Usage
const merchant = await getMerchant(token, 'org_abc123', 'mrc_xyz789');
console.log('Merchant details:', merchant);

Best Practices

Organization Structure

Single Organization: Most businesses only need one organization. Only create multiple if you have completely separate legal entities.

Merchant Strategy

Do create separate merchants for:

  • Different brands with separate branding
  • Franchises or locations requiring separate reporting
  • Business lines with different tax implications

Don’t create separate merchants for:

  • Different product categories within the same brand
  • Different payment types (use order metadata instead)
  • Temporary campaigns or promotions

Naming Conventions

Use clear, descriptive names:

✅ Good names:

  • “Acme Store - Main E-commerce”
  • “Acme Bogotá Location”
  • “Acme Wholesale Division”

❌ Avoid:

  • “Merchant 1”
  • “Test Merchant”
  • “New Merchant 2025”

Permissions and Access Control

Organization-Level Permissions

Users with organization-level access can:

  • View all merchants
  • Create new merchants
  • Manage organization settings
  • Generate API credentials

Merchant-Level Permissions

Users with merchant-level access can:

  • View only assigned merchant(s)
  • Process orders for that merchant
  • Manage merchant contacts
  • View merchant balances

API Credential Scoping

API credentials can be scoped to:

  1. Organization Level

    • Access all merchants
    • Useful for platform-wide integrations
  2. Merchant Level

    • Access only specific merchant
    • More secure for limited use cases
JavaScript
// Organization-level credentials can access any merchant
const orders = await axios.get(
  `https://api-sandbox.koywe.com/api/v1/organizations/${orgId}/merchants/${merchantId}/orders`,
  { headers: { 'Authorization': `Bearer ${orgLevelToken}` } }
);
 
// Merchant-level credentials are pre-scoped
const orders = await axios.get(
  `https://api-sandbox.koywe.com/api/v1/organizations/${orgId}/merchants/${merchantId}/orders`,
  { headers: { 'Authorization': `Bearer ${merchantLevelToken}` } }
);

Real-World Example

Multi-Brand E-Commerce Company

Organization: FashionCo Inc.

Merchants:

  1. PremiumBrand Store

    • High-end fashion e-commerce
    • Virtual accounts: COP, USD, EUR
    • Average transaction: $200 USD
  2. BudgetBrand Store

    • Affordable fashion e-commerce
    • Virtual accounts: COP, BRL, MXN
    • Average transaction: $30 USD
  3. FashionCo Marketplace

    • Third-party seller platform
    • Virtual accounts: COP, USD, BRL, MXN
    • Handles both PAYIN (customer) and PAYOUT (seller)

Benefits of this structure:

  • Separate financial reporting per brand
  • Different branding for payment experiences
  • Independent balance management
  • Clearer reconciliation

Next Steps