Miracle Docs

Create Entity Hierarchy

Before a merchant can process payments, you need to create the full entity chain: Company, Merchant, Terminal, and Channel. Each level serves a specific purpose in the platform architecture.


Step 1: Create Company

A Company is the legal entity container. It represents the registered business and can hold multiple merchants under it. KYB verification happens at this level.

Portal: Navigate to the Merchants section and select Create Company.

FieldDescription
Company nameLegal name of the business
Registration numberOfficial business registration ID
CountryCountry of incorporation
AddressRegistered business address

A Company can hold multiple merchants — for example, a single legal entity operating several online stores or brands.


Step 2: Create Merchant

A Merchant is the business entity that accepts payments from customers. Every merchant belongs to exactly one company.

Portal: Select the Company, then choose Create Merchant.

FieldDescription
Merchant nameDisplay name for this merchant
Business typeCategory or MCC code
WebsiteMerchant's website URL
Contact emailPrimary contact for this merchant
Contact phoneOptional phone contact

The merchant starts in sandbox status, allowing test transactions immediately. To process live payments, the merchant must go through the approval flow (see KYB Process).


Step 3: Create Terminal

A Terminal represents a connection to a specific payment provider integration. Provider credentials are securely stored in the vault and referenced by the terminal.

Terminals are tenant-level resources — they are NOT scoped to a single merchant. One terminal can serve multiple merchants. The Merchant-Terminal binding happens through Channels.

Portal: Navigate to the Terminals section at the tenant level and select Create Terminal.

FieldDescription
Terminal nameDescriptive label for this connection
ProviderThe payment provider this terminal connects to
Credential referenceReference to provider credentials stored in the vault
Statustest or active — determines which provider environment is used

A tenant can have multiple terminals connecting to different providers. This enables routing and failover across providers.


Step 4: Create Channel

A Channel links a merchant to a terminal and defines which payment methods the merchant can accept through that connection.

Portal: Select the Merchant, then navigate to Channels and select Create Channel.

FieldDescription
Channel nameDescriptive label
TerminalWhich terminal this channel routes through
Payment methodsWhich payment methods are available via this channel
CurrenciesWhich currencies are accepted

A merchant can have multiple channels — for example, one channel for card payments via Provider A and another for bank transfers via Provider B.


Important Notes

  • Two ways to create a merchant. Operators with merchant management permissions can create merchants from the Portal. Tenants can also enable public self-registration via the self_service_merchant_signup_enabled flag — POST /v1/register/merchant?tenant-id=<id> then opens a public signup endpoint that creates a Company, a sandbox Merchant, and an owner user (merchant:owner).
  • Terminal credentials are never exposed. Provider credentials are stored in the vault and referenced by a credential ID. They are never visible in the Portal UI or API responses.
  • Test before going live. After creating the entity hierarchy, use sandbox mode to verify the integration works correctly before enabling live traffic.

On this page