Miracle Docs

Glossary

Key terms used throughout this documentation.


Core Terms

TermDefinition
TenantYour PSP company. Logical isolation unit with its own configuration, branding, and merchant base.
CompanyLegal entity within your tenant. Groups merchants under one legal umbrella.
MerchantBusiness entity accepting payments from customers. Scoped to a company.
TerminalConnection to a specific payment provider. Holds provider credentials securely in the vault.
ChannelLink between a merchant and a terminal. Defines which payment methods the merchant can use via that terminal.
PartnerEntity that brings merchants to the platform. Earns commission via PartnerAssignment.

Payment Terms

TermDefinition
PayinIncoming payment — a customer pays a merchant.
PayoutMerchant sends money to a third-party recipient (salary, winnings, etc.). This is a service product the merchant buys from the PSP.
WithdrawalRequest by an earning entity (merchant, tenant, or partner) to withdraw available balance to their own bank account. Merchant/partner withdrawals require operator approval. Tenant withdrawals are self-approved. Executed from tenant's FundingAccount. This is NOT a service product.
SettlementFinancial statement document summarizing transactions, fees, and net amounts for a period. States: draft, finalized. Does NOT trigger withdrawals. Settlement is NOT the T+N availability transition -- see Availability Transition.
Availability TransitionAutomated T+N process: daily cron transitions funds from pending to available balance after N business days. This is separate from Settlement (which is a financial statement).
RefundReturn of funds to the customer, full or partial.
DisputePost-facto challenge to a transaction (chargeback).

Financial Terms

TermDefinition
MoneyAmountCanonical monetary value: { currency, valueMinor }. All amounts are in integer minor units (e.g., cents for USD, yen for JPY). No floating point.
LedgerImmutable, double-entry system for tracking all money movement and positions. The single source of truth for balances.
Ledger EntryImmutable record of a balance change. Always in debit/credit pairs. Sum of debits always equals sum of credits per operation.
Balance bucketsBalance is partitioned into six buckets: available (withdrawable now), pending (confirmed but awaiting T+N), reserved (held by policy such as rolling reserve or dispute hold), payable (reserved for approved withdrawal awaiting execution), collateral (guarantee deposits), operational (provider-side funds tracking). Merchant-visible: available, pending, reserved, payable. Internal only: collateral, operational.
T+NAvailability transition timing model. Funds become available N business days after the event (e.g., T+1 means available next business day).
Rolling ReserveTemporary withholding of a percentage of merchant funds for risk coverage. Not a fee -- funds are released after the reserve period expires.
FeeScheduleNamed fee configuration template with rules. Can be assigned at multiple entity levels (tenant, company, merchant).
Fee decompositionmerchantFee = providerFee + platformFee + tenantFee + partnerCommission. The tenant fee is the residual after all other fees are subtracted.
FundingAccountTenant's real external account (bank account, crypto wallet) where money physically resides. Each has a corresponding ledger account tracking its balance.
AdjustmentCorrective ledger operation with mandatory reason and audit trail. Used to fix errors or make manual balance corrections.
NettingOffset of incoming vs outgoing flows in settlement calculation.
LivemodeProduction mode with real money.
TestmodeSandbox mode for testing without real money.

Transaction & Routing Terms

TermDefinition
TransactionBusiness-level operation container with a single final outcome. Holds one or more attempts.
TransactionAttemptTechnical execution attempt through a specific channel/terminal. A transaction may have multiple attempts (e.g., after cascading).
PaymentStatusCanonical payment status: processing, requires_action, requires_capture, captured, succeeded, failed, canceled, refunded, partially_refunded.
RoutingRule-based selection of terminal/channel for a transaction.
CascadingAutomatic retry through alternative channels on soft decline.
CheckoutSessionPayer-facing payment session created for HPP/widget flows.
Idempotency keyClient-provided key to prevent duplicate payment creation. Required on POST/PATCH/DELETE requests.
3DS3-D Secure -- payer authentication protocol. Decision point in the payment pipeline.

Identity & Access Terms

TermDefinition
RBACRole-Based Access Control. Permissions formatted as domain:resource:action.
API KeyMachine-to-machine authentication. Three tiers: sk_ (server, full API), pk_ (client, tokenization only), clientSecret (session-scoped).
User layerInterface context determining UI and permissions: merchant, operator, owner, partner. Immutable per user.
ImpersonationOperator/owner "sign-in as merchant" with full audit trail.

Operations Terms

TermDefinition
ReconciliationAutomated matching of platform transaction records against provider records. Two-level verification: summary check (count + amount), then detail matching (per-transaction). Runs per terminal.
Audit eventCanonical log entry for all significant actions (financial, config, UI, API, system). Immutable -- insert only.
WebhookAsynchronous HTTP notification to merchant endpoint on status changes. At-least-once delivery.
HPPHosted Payment Page -- payer-facing UI for payment collection.

Common Confusions

Payout vs. Withdrawal A payout is when a merchant sends money to a third party -- this is a service the merchant uses. A withdrawal is when an entity (merchant, tenant, or partner) takes their own earned money out to their bank account. Merchant/partner withdrawals require operator approval; tenant withdrawals are self-approved.

Settlement vs. Availability Transition Settlement is a financial statement document summarizing transactions, fees, and net amounts for a period. It does NOT move money or change balances. Availability Transition is the separate automated T+N process that moves funds from pending to available. These are two distinct operations.

Settlement vs. Payout Settlement generates financial statements -- it does NOT automatically send money anywhere. To actually move funds out, a separate withdrawal or payout must be initiated.

On this page