Understanding these concepts is essential before starting development.
Execution Model
Mini Apps run inside the Rebell SuperApp and are executed by a sandboxed runtime environment provided by Rebell. Key characteristics:- Mini App code is downloaded and executed at runtime
- Execution happens inside the SuperApp, not on the merchant’s infrastructure
- The runtime is isolated from the underlying mobile operating system
- Mini Apps cannot access device resources directly unless explicitly exposed by the platform
Separation of Responsibilities
A Mini App architecture always involves three distinct layers, each with a clear responsibility.- Mini App (Frontend)
- Merchant Backend (Business)
- Rebell Platform (Execution)
Responsible for:
- User interface and navigation
- Capturing user input
- Calling merchant backend APIs
- Triggering platform capabilities (e.g., payments, navigation)
- Business logic
- Data persistence
- Secrets or credentials
- Payment authorization logic
Responsibility Matrix
| Responsibility | Mini App | Merchant Backend | Rebell Platform |
|---|---|---|---|
| User interface | ✅ | ||
| Business logic | ✅ | ||
| Data persistence | ✅ | ||
| Payment creation | ✅ | ||
| Payment execution | ✅ | ||
| Identity & session | ✅ | ||
| Security enforcement | ✅ |
Mini App Types: Native and H5
Rebell supports two types of Mini Apps, depending on how the user interface and user interactions are implemented. Both types run inside the Rebell SuperApp and follow the same architectural and security principles.- Native Mini Apps
- H5 Mini Apps
Native Mini Apps are built using the Rebell Mini App framework and platform-provided UI components.Characteristics:
- User interface rendered using platform-native components
- Deep integration with SuperApp navigation and capabilities
- Best performance and responsiveness
- Full access to Mini App APIs (JSAPI)
- Recommended for most production use cases
- Interactive service flows
- Payment-centric experiences
- User journeys requiring native look and feel
- Long-lived Mini Apps with frequent user interaction
Choosing the Right Type
| Criteria | Native Mini App | H5 Mini App |
|---|---|---|
| Performance | Excellent | Good |
| Native features | Full access | Limited |
| Development effort | Higher | Lower |
| Existing web assets | N/A | Can reuse |
| Recommended for | New integrations | Migration path |
Security Boundaries
Mini Apps operate within strict security boundaries. This model ensures:User Data Protection
Sensitive user information is isolated and controlled
Credential Protection
Merchant credentials never touch client-side code
Regulatory Compliance
Financial regulations are enforced at the platform level
Reduced Attack Surface
Limited capabilities reduce potential vulnerabilities
Any sensitive operation must be delegated to the merchant backend.
Communication Model
Mini Apps communicate with merchant systems using HTTPS requests to merchant-controlled endpoints. Important aspects:- Mini App requests are authenticated using platform-provided context
- Merchant backend validates requests and enforces authorization
- Merchant backend may call Rebell Payment APIs using server credentials
- Responses are returned to the Mini App for UI rendering
Identity & User Context
When a Mini App is launched, Rebell provides a user context associated with the active SuperApp session. This context allows the Mini App to:- Identify the current user
- Personalize the experience
- Associate actions with a specific user account
What the Mini App DOES receive
What the Mini App DOES receive
- Session context token
- Authorization code for backend exchange
- Platform-provided user identifier (after consent)
What the Mini App does NOT receive
What the Mini App does NOT receive
- Raw user credentials
- Long-lived tokens
- Direct database access
User identity is mediated by the platform. Long-term user data must be stored by the merchant backend.
Payments in the Mini App Context
Payments inside Mini Apps follow the same principles as standalone payments, with an important distinction:- The payment experience is embedded in the Mini App flow
- Payment execution is still handled by the Rebell Payments Platform
- Final payment confirmation is delivered via backend webhooks
Architecture Summary
| Layer | Runs On | Responsibilities |
|---|---|---|
| Mini App | SuperApp runtime | UI, navigation, user input |
| Merchant Backend | Your servers | Business logic, data, payments |
| Rebell Platform | Rebell infrastructure | Execution, identity, security |