Your project must target iOS 10 or later. Swift projects should use Swift 4.2 or later, and CocoaPods 1.8.1 or later is required.
Add a package by selecting File → Add Packages… in Xcode’s menu bar.
Search for the BoxoSDK using the repo’s URL:
Next, set the Dependency Rule to be Up to Next Major Version.
Then, select Add Package.
Using CocoaPods to create a Podfile if you don’t already have one.
Add the Boxo pod to your Podfile
Install the pods, then open your .xcworkspace file to see the project in Xcode:
Import Boxo SDK in your ViewController:
Initialize Boxo in your app by configuring a Boxo shared instance. Remember to replace client_id
field with your client_id
.
To launch the miniapp, you will need a UIViewController:
To open miniapp write this code in your UIViewController:
If you are using SwiftUI, you need to access the current UIViewController. There are many ways to obtain a UIViewController. Here is one of them:
Miniapp lifecycle events allow you to monitor key activities, such as onLaunch
, onResume
, onPause
, onClose
, and onError
. These events help track the miniapp’s behavior throughout its usage lifecycle.
Dark mode support for splash screen and other native components used inside miniapp.
Use MiniappConfig to override theme of miniapp.
Setup onAuth listener for login event from Miniapp
When host app user logs out, it is highly important to clear all miniapp storage data. To clear call .logout()
:
To listen for any URL change events, use .setUrlChangeListener:
To append custom data params to miniapp URL use .params:
You can add your custom action menu item to existing default action menu item by defining .setCustomActionMenuItemImage
To show/hide custom action menu item use miniapp.showCustomActionMenuItem()
and miniapp.hideCustomActionMenuItem()
Fetch the complete catalog of available miniapps with detailed metadata. This operation returns:
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
Customize the animation effects to enhance the user experience by setting the appropriate page transition animation when opening a miniapp.
You can choose from the following page animations:
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.The BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
To protect intellectual property, deter reverse engineering, and enhance code security
Please see our sample Android app to learn more.
Your project must target at least Android 5.0 (API level 21) or higher.
Latest version:
To install Boxo SDK, add io.boxo.sdk:boxo-android
to the dependencies
block of your app/build.gradle file:
Add this line to root gradle.properties:
Add to your existing Application
class or create a new one if you don’t have an Application
class yet.
Then register it in AndroidManifest.xml:
Open miniapp
Configure BoxoSDK with these settings to customize behavior, language, and UI elements.
Use it to provide language to miniapp. Default: ‘en’
Parameter | Type | Description | Default |
---|---|---|---|
multitaskMode | Boolean | Shows Miniapps in Android Recents screen when true | false |
debug | Boolean | Enables WebView debugging (Chrome DevTools) | false |
Parameter | Description | Default |
---|---|---|
permissionsPage | Setting menu item | true |
showClearCache | Clear Cache menu item | true |
showAboutPage | About Miniapp menu item | true |
Control which miniapps are available in your development environment using the sandbox mode flag:
Behavior: Retrieve Miniapp List will return miniapps with the statuses listed below.
Sandbox Mode | Available Miniapp Statuses | Use Case |
---|---|---|
true | Approved + InTesting | Development environment - access to miniapps still in testing |
false | Approved only | Production environment - only fully approved miniapps |
Configure native component theming to match your app’s design system or respect user preferences. The SDK provides comprehensive theme support for:
Theme Options:
Option | Description |
---|---|
SYSTEM | Automatically matches device theme |
LIGHT | Forces light theme |
DARK | Forces dark theme |
Control theme behavior at both global and per-miniapp levels for maximum flexibility.
Global Theme (Affects all miniapps)
Per-Miniapp Theme Override
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
To listen for any URL change events use .setUrlChangeListener:
Append additional query parameters to miniapp’s initial URL for passing contextual data. This enables:
Basic Implementation
Parameters will be automatically URL-encoded and appended as query parameters:
Establish two-way communication between your hostapp and miniapps using custom events. This system enables:
You can extend the miniapp’s native menu by adding your own custom action item. This is achieved through two simple steps:
.setCustomActionMenuItem()
to specify your custom button’s appearance.setCustomActionMenuItemClickListener()
to respond when users tap your buttonControl Visibility:
Fetch the complete catalog of available miniapps with detailed metadata. This asynchronous operation returns:
Control the miniapp loading experience by customizing splash screen behavior. By default, miniapps display a splash screen that automatically hides when 50% of web content has loaded.
Important: Animations will only work if multitaskMode
is set tofalse
. Make sure to configure it accordingly to enable page transition animations.
Customize the animation effects to enhance the user experience by setting the appropriate page transition animation when opening a miniapp.
You can choose from the following page animations:
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.The BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
Track key moments in a miniapp’s execution by implementing the LifecycleListener
. These events help you monitor user interactions and manage app state transitions.
To protect intellectual property, deter reverse engineering, and enhance code security
A Flutter plugin to integrate Boxo for iOS and Android. Please see our sample Flutter app to learn more.
Run this command: With Flutter:
This will add a line like this to your package’s pubspec.yaml (and run an implicit flutter pub get
):
dependencies: appboxo_sdk: ^0.8.0
Add this line to android/gradle.properties
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
A react native wrapper over Boxo SDK for iOS and Android.
or
Please make sure the “@appboxo/react-native-sdk” dependency is linked, if not please run:
Add this line to android/gradle.properties
Next for iOS:
Important Miniapp lifecycle events available in 1.0.8+ versions
Important Custom params available in 1.0.26+ versions
To append any custom data as URL param to miniapp’s URL use extraUrlParams:
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
Example:
Config Options
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Open miniapp with options
OpenMiniappOptions
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
ColorOptions
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
close miniapp by appId
Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen. To use this function need to enable ‘enableMultitaskMode: true’ in Boxo.setConfig()
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
Get list of miniapps
MiniappListResult
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
MiniappData
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
When host app user logs out, it is highly important to clear all miniapp storage data.
Param | Type |
---|---|
eventName | ’custom_event’ |
listenerFunc | (customEvent: CustomEvent) => void |
send custom event data to miniapp
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
Param | Type |
---|---|
eventName | ’payment_event’ |
listenerFunc | (paymentEvent: PaymentEvent) => void |
send payment data to miniapp
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
Param | Type |
---|---|
eventName | ’miniapp_lifecycle’ |
listenerFunc | (lifecycle: LifecycleEvent) => void |
LifecycleEvent
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |
onLaunch - Called when the miniapp will launch with Boxo.open(…) onResume - Called when the miniapp will start interacting with the user onPause - Called when the miniapp loses foreground state onClose - Called when clicked close button in miniapp or when destroyed miniapp page onError - Called when miniapp fails to launch due to internet connection issues onUserInteraction - Called whenever touch event is dispatched to the miniapp page. onAuth - Called when the miniapp starts login and user allows it
Expo plugin to integrate Boxo for iOS and Android. Please see our sample Expo app to learn more.
Configuration in app.json/app.config.js
ConfigOptions
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Open miniapp with options
MiniappOptions
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
ColorOptions
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
close miniapp by appId
Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen. To use this function need to enable ‘enableMultitaskMode: true’ in Boxo.setConfig()
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
Get list of miniapps
MiniappListResult
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
MiniappData
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
Send custom event data to miniapp
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
send payment data to miniapp
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
LifecycleEvent
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |
onLaunch - Called when the miniapp will launch with Boxo.open(…) onResume - Called when the miniapp will start interacting with the user onPause - Called when the miniapp loses foreground state onClose - Called when clicked close button in miniapp or when destroyed miniapp page onError - Called when miniapp fails to launch due to internet connection issues onUserInteraction - Called whenever touch event is dispatched to the miniapp page. onAuth - Called when the miniapp starts login and user allows it
Your project must target iOS 10 or later. Swift projects should use Swift 4.2 or later, and CocoaPods 1.8.1 or later is required.
Add a package by selecting File → Add Packages… in Xcode’s menu bar.
Search for the BoxoSDK using the repo’s URL:
Next, set the Dependency Rule to be Up to Next Major Version.
Then, select Add Package.
Using CocoaPods to create a Podfile if you don’t already have one.
Add the Boxo pod to your Podfile
Install the pods, then open your .xcworkspace file to see the project in Xcode:
Import Boxo SDK in your ViewController:
Initialize Boxo in your app by configuring a Boxo shared instance. Remember to replace client_id
field with your client_id
.
To launch the miniapp, you will need a UIViewController:
To open miniapp write this code in your UIViewController:
If you are using SwiftUI, you need to access the current UIViewController. There are many ways to obtain a UIViewController. Here is one of them:
Miniapp lifecycle events allow you to monitor key activities, such as onLaunch
, onResume
, onPause
, onClose
, and onError
. These events help track the miniapp’s behavior throughout its usage lifecycle.
Dark mode support for splash screen and other native components used inside miniapp.
Use MiniappConfig to override theme of miniapp.
Setup onAuth listener for login event from Miniapp
When host app user logs out, it is highly important to clear all miniapp storage data. To clear call .logout()
:
To listen for any URL change events, use .setUrlChangeListener:
To append custom data params to miniapp URL use .params:
You can add your custom action menu item to existing default action menu item by defining .setCustomActionMenuItemImage
To show/hide custom action menu item use miniapp.showCustomActionMenuItem()
and miniapp.hideCustomActionMenuItem()
Fetch the complete catalog of available miniapps with detailed metadata. This operation returns:
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
Customize the animation effects to enhance the user experience by setting the appropriate page transition animation when opening a miniapp.
You can choose from the following page animations:
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.The BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
To protect intellectual property, deter reverse engineering, and enhance code security
Please see our sample Android app to learn more.
Your project must target at least Android 5.0 (API level 21) or higher.
Latest version:
To install Boxo SDK, add io.boxo.sdk:boxo-android
to the dependencies
block of your app/build.gradle file:
Add this line to root gradle.properties:
Add to your existing Application
class or create a new one if you don’t have an Application
class yet.
Then register it in AndroidManifest.xml:
Open miniapp
Configure BoxoSDK with these settings to customize behavior, language, and UI elements.
Use it to provide language to miniapp. Default: ‘en’
Parameter | Type | Description | Default |
---|---|---|---|
multitaskMode | Boolean | Shows Miniapps in Android Recents screen when true | false |
debug | Boolean | Enables WebView debugging (Chrome DevTools) | false |
Parameter | Description | Default |
---|---|---|
permissionsPage | Setting menu item | true |
showClearCache | Clear Cache menu item | true |
showAboutPage | About Miniapp menu item | true |
Control which miniapps are available in your development environment using the sandbox mode flag:
Behavior: Retrieve Miniapp List will return miniapps with the statuses listed below.
Sandbox Mode | Available Miniapp Statuses | Use Case |
---|---|---|
true | Approved + InTesting | Development environment - access to miniapps still in testing |
false | Approved only | Production environment - only fully approved miniapps |
Configure native component theming to match your app’s design system or respect user preferences. The SDK provides comprehensive theme support for:
Theme Options:
Option | Description |
---|---|
SYSTEM | Automatically matches device theme |
LIGHT | Forces light theme |
DARK | Forces dark theme |
Control theme behavior at both global and per-miniapp levels for maximum flexibility.
Global Theme (Affects all miniapps)
Per-Miniapp Theme Override
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
To listen for any URL change events use .setUrlChangeListener:
Append additional query parameters to miniapp’s initial URL for passing contextual data. This enables:
Basic Implementation
Parameters will be automatically URL-encoded and appended as query parameters:
Establish two-way communication between your hostapp and miniapps using custom events. This system enables:
You can extend the miniapp’s native menu by adding your own custom action item. This is achieved through two simple steps:
.setCustomActionMenuItem()
to specify your custom button’s appearance.setCustomActionMenuItemClickListener()
to respond when users tap your buttonControl Visibility:
Fetch the complete catalog of available miniapps with detailed metadata. This asynchronous operation returns:
Control the miniapp loading experience by customizing splash screen behavior. By default, miniapps display a splash screen that automatically hides when 50% of web content has loaded.
Important: Animations will only work if multitaskMode
is set tofalse
. Make sure to configure it accordingly to enable page transition animations.
Customize the animation effects to enhance the user experience by setting the appropriate page transition animation when opening a miniapp.
You can choose from the following page animations:
LEFT_TO_RIGHT
- The miniapp slides in from the left side of the screen to the right.RIGHT_TO_LEFT
- The miniapp slides in from the right side of the screen to the left.BOTTOM_TO_TOP
- The miniapp slides in from the bottom of the screen to the top.TOP_TO_BOTTOM
- The miniapp slides in from the top of the screen to the bottom.FADE_IN
- The miniapp fades in gradually from completely transparent to opaque.The BOTTOM_TO_TOP
animation is the default page transition effect. You can easily change the animation to any of the other available options based on the user experience you want to provide.
Track key moments in a miniapp’s execution by implementing the LifecycleListener
. These events help you monitor user interactions and manage app state transitions.
To protect intellectual property, deter reverse engineering, and enhance code security
A Flutter plugin to integrate Boxo for iOS and Android. Please see our sample Flutter app to learn more.
Run this command: With Flutter:
This will add a line like this to your package’s pubspec.yaml (and run an implicit flutter pub get
):
dependencies: appboxo_sdk: ^0.8.0
Add this line to android/gradle.properties
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
A react native wrapper over Boxo SDK for iOS and Android.
or
Please make sure the “@appboxo/react-native-sdk” dependency is linked, if not please run:
Add this line to android/gradle.properties
Next for iOS:
Important Miniapp lifecycle events available in 1.0.8+ versions
Important Custom params available in 1.0.26+ versions
To append any custom data as URL param to miniapp’s URL use extraUrlParams:
sandboxMode: it should open miniapps in “Approved” and “InTesting” statuses List of miniapps returns:
Example:
Config Options
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Open miniapp with options
OpenMiniappOptions
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
ColorOptions
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
close miniapp by appId
Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen. To use this function need to enable ‘enableMultitaskMode: true’ in Boxo.setConfig()
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
Get list of miniapps
MiniappListResult
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
MiniappData
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
When host app user logs out, it is highly important to clear all miniapp storage data.
Param | Type |
---|---|
eventName | ’custom_event’ |
listenerFunc | (customEvent: CustomEvent) => void |
send custom event data to miniapp
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
Param | Type |
---|---|
eventName | ’payment_event’ |
listenerFunc | (paymentEvent: PaymentEvent) => void |
send payment data to miniapp
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
Param | Type |
---|---|
eventName | ’miniapp_lifecycle’ |
listenerFunc | (lifecycle: LifecycleEvent) => void |
LifecycleEvent
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |
onLaunch - Called when the miniapp will launch with Boxo.open(…) onResume - Called when the miniapp will start interacting with the user onPause - Called when the miniapp loses foreground state onClose - Called when clicked close button in miniapp or when destroyed miniapp page onError - Called when miniapp fails to launch due to internet connection issues onUserInteraction - Called whenever touch event is dispatched to the miniapp page. onAuth - Called when the miniapp starts login and user allows it
Expo plugin to integrate Boxo for iOS and Android. Please see our sample Expo app to learn more.
Configuration in app.json/app.config.js
ConfigOptions
Prop | Type | Description |
---|---|---|
clientId | string | your client id from dashboard |
userId | string | (optional) hostapp userId, will be used for the Consent Management |
language | string | language value will be passed to the miniapp |
sandboxMode | boolean | switch to sandbox mode |
enableMultitaskMode | boolean | (Android only) Each miniapp appears as a task in the Recents screen. |
theme | ’light’ | ‘dark’ | ‘system’ | theme for splash screen and other native components used inside miniapp. |
isDebug | boolean | enables webview debugging |
showPermissionsPage | boolean | use it to hide “Settings” from Miniapp menu |
showClearCache | boolean | use it to hide “Clear cache” from Miniapp menu |
showAboutPage | boolean | use it to hide “About Page” from Miniapp menu |
miniappSettingsExpirationTime | number | use it to change miniapp settings cache time in sec. Default: 60 sec |
Open miniapp with options
MiniappOptions
Prop | Type | Description |
---|---|---|
appId | string | miniapp id |
data | object | (optional) data as Map that is sent to miniapp |
theme | ’light’ | ‘dark’ | ‘system’ | (optional) miniapp theme “dark” | “light” (by default is system theme) |
extraUrlParams | object | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
urlSuffix | string | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
colors | ColorOptions | (optional) provide colors to miniapp if miniapp supports |
enableSplash | boolean | (optional) use to skip miniapp splash screen |
saveState | boolean | (optional) use to save state on close miniapp |
pageAnimation | ’BOTTOM_TO_TOP’ | ‘TOP_TO_BOTTOM’ | ‘LEFT_TO_RIGHT’ | ‘RIGHT_TO_LEFT’ | ‘FADE_IN’ | (optional) use to change launch animation for miniapp |
ColorOptions
Prop | Type |
---|---|
primaryColor | string |
secondaryColor | string |
tertiaryColor | string |
close miniapp by appId
Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen. To use this function need to enable ‘enableMultitaskMode: true’ in Boxo.setConfig()
Handle authentication between your host app and miniapps:
When users log out of your host app, you must completely clear all miniapp session data
Get list of miniapps
MiniappListResult
Prop | Type |
---|---|
miniapps | [MiniappData] |
error | string |
MiniappData
Prop | Type |
---|---|
appId | string |
name | string |
category | string |
description | string |
logo | string |
Send custom event data to miniapp
Prop | Type |
---|---|
appId | string |
requestId | number |
type | string |
errorType | string |
payload | object |
send payment data to miniapp
Prop | Type |
---|---|
appId | string |
transactionToken | string |
miniappOrderId | string |
amount | number |
currency | string |
status | string |
hostappOrderId | string |
extraParams | object |
LifecycleEvent
Prop | Type |
---|---|
appId | string |
lifecycle | string |
error | string |
onLaunch - Called when the miniapp will launch with Boxo.open(…) onResume - Called when the miniapp will start interacting with the user onPause - Called when the miniapp loses foreground state onClose - Called when clicked close button in miniapp or when destroyed miniapp page onError - Called when miniapp fails to launch due to internet connection issues onUserInteraction - Called whenever touch event is dispatched to the miniapp page. onAuth - Called when the miniapp starts login and user allows it