Entities

Morefin represents a payment-processing organization using five core entities. These entities describe the business structure, separate its sales operations, and connect those operations to external payment providers.

The entities are organized in the following hierarchy:

flowchart LR
    BA["Business Account"] --> M["Merchant"]
    M --> S["Shop"]
    S --> T["Terminal"]
    T --> PPA["Payment Provider Account"]

Each level can contain multiple entities at the next level. This allows one organization to manage several merchant businesses, shops, processing configurations, and payment-provider connections independently.

Business account

A business account is the top-level organizational account in Morefin. It groups one or more merchants under the same business relationship and provides the account boundary for administration and access.

Merchant

A merchant represents a business or legal entity that accepts payments from customers. Merchant-level configuration includes the business identity and the shops through which it processes payments.

A business account can contain multiple merchants when separate legal entities or merchant configurations must be managed under the same account.

Shop

A shop represents a merchant’s sales operation, such as a website, brand, application, or physical location. Shops allow a merchant to separate payment activity and commercial configuration, including the merchant category code where applicable.

A merchant can have multiple shops, and each shop can have multiple terminals.

Terminal

A terminal is the processing configuration used to initiate transactions. It belongs to a shop and is identified in API requests by terminal_id.

The terminal determines which transaction capabilities are available, including:

  • Payment methods
  • Transaction types
  • Currencies and amount limits
  • Payment-provider-account assignments
  • Payment-method availability and routing configuration

Morefin supplies the terminal ID during integration setup. API clients do not need to send the business account, merchant, or shop identifiers with each transaction; Morefin resolves them from the terminal configuration.

Payment provider account

A payment provider account represents the merchant’s configured account with a payment service provider. It contains the provider-specific configuration and credentials needed to process transactions.

One or more payment provider accounts can be attached to a terminal. Payment-method assignments define which accounts can process each payment method on that terminal.

How the hierarchy is used

When Morefin receives a transaction request:

  1. terminal_id identifies the terminal.
  2. The terminal identifies its shop, merchant, and business-account context.
  3. The requested payment method, transaction type, currency, and amount are checked against the terminal configuration.
  4. An eligible payment provider account processes the transaction according to the terminal’s payment-method assignment.

If no eligible configuration exists, the transaction cannot be processed using that terminal.