Socket
Book a DemoInstallSign in
Socket

@appboxo/capacitor-boxo-sdk

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appboxo/capacitor-boxo-sdk

A capacitor wrapper over Appboxo SDK for IOS and Android.

0.8.5
latest
Source
npmnpm
Version published
Weekly downloads
284
-11.8%
Maintainers
4
Weekly downloads
 
Created
Source

capacitor-boxo-sdk

A Capacitor wrapper over Appboxo SDK for IOS and Android.

Install

npm install @appboxo/capacitor-boxo-sdk
npx cap sync

API

setConfig(...)

setConfig(options: ConfigOptions) => Promise<void>

Set global configs

ParamType
optionsConfigOptions

openMiniapp(...)

openMiniapp(options: OpenMiniappOptions) => Promise<void>

Open miniapp with options

ParamType
optionsOpenMiniappOptions

setAuthCode(...)

setAuthCode(options: { appId: string; authCode: string; }) => Promise<void>

get AuthCode from hostapp backend and send it to miniapp

ParamType
options{ appId: string; authCode: string; }

closeMiniapp(...)

closeMiniapp(options: { appId: string; }) => Promise<void>

close miniapp by appId

ParamType
options{ appId: string; }

sendCustomEvent(...)

sendCustomEvent(customEvent: CustomEvent) => Promise<void>

send custom event to miniapp

ParamType
customEventCustomEvent

sendPaymentEvent(...)

sendPaymentEvent(paymentEvent: PaymentEvent) => Promise<void>

send payment event to miniapp

ParamType
paymentEventPaymentEvent

getMiniapps()

getMiniapps() => Promise<MiniappListResult>

Get list of miniapps

Returns: Promise<MiniappListResult>

hideMiniapps()

hideMiniapps() => Promise<void>

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()

addListener('custom_event', ...)

addListener(eventName: 'custom_event', listenerFunc: (customEvent: CustomEvent) => void) => Promise<PluginListenerHandle>

When host app user logs out, it is highly important to clear all miniapp storage data.

ParamType
eventName'custom_event'
listenerFunc(customEvent: CustomEvent) => void

Returns: Promise<PluginListenerHandle>

addListener('payment_event', ...)

addListener(eventName: 'payment_event', listenerFunc: (paymentEvent: PaymentEvent) => void) => Promise<PluginListenerHandle>
ParamType
eventName'payment_event'
listenerFunc(paymentEvent: PaymentEvent) => void

Returns: Promise<PluginListenerHandle>

addListener('miniapp_lifecycle', ...)

addListener(eventName: 'miniapp_lifecycle', listenerFunc: (lifecycle: LifecycleEvent) => void) => Promise<PluginListenerHandle>
ParamType
eventName'miniapp_lifecycle'
listenerFunc(lifecycle: LifecycleEvent) => void

Returns: Promise<PluginListenerHandle>

logout()

logout() => Promise<void>

Interfaces

ConfigOptions

PropTypeDescription
clientIdstringyour client id from dashboard
userIdstringhostapp userId, will be used for the Consent Management
languagestringlanguage value will be passed to the miniapp
sandboxModebooleanswitch to sandbox mode
enableMultitaskModebooleanEach miniapp appears as a task in the Recents screen. !It works only on android devices.
theme'light' | 'dark' | 'system'theme for splash screen and other native components used inside miniapp.
isDebugbooleanenables webview debugging
showPermissionsPagebooleanuse it to hide "Settings" from Miniapp menu
showClearCachebooleanuse it to hide "Clear cache" from Miniapp menu
showAboutPagebooleanuse it to hide "About Page" from Miniapp menu
miniappSettingsExpirationTimenumberuse it to change miniapp settings cache time in sec. By default is 60 sec

OpenMiniappOptions

PropTypeDescription
appIdstringminiapp id
dataobject(optional) data as Map that is sent to miniapp
theme'light' | 'dark' | 'system'(optional) miniapp theme "dark" | "light" (by default is system theme)
extraUrlParamsobject(optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test)
urlSuffixstring(optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test)
colorsColorOptions(optional) provide colors to miniapp if miniapp supports
enableSplashboolean(optional) use to skip miniapp splash screen
saveStateboolean(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

PropType
primaryColorstring
secondaryColorstring
tertiaryColorstring

CustomEvent

PropType
appIdstring
requestIdnumber
typestring
errorTypestring
payloadobject

PaymentEvent

PropType
appIdstring
transactionTokenstring
miniappOrderIdstring
amountnumber
currencystring
statusstring
hostappOrderIdstring
extraParamsobject

MiniappListResult

PropType
miniapps[MiniappData]
errorstring

MiniappData

PropType
appIdstring
namestring
categorystring
descriptionstring
logostring

PluginListenerHandle

PropType
remove() => Promise<void>

LifecycleEvent

PropTypeDescription
appIdstring
lifecyclestringonLaunch - 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
errorstring

Keywords

capacitor

FAQs

Package last updated on 26 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.