Skip to main content

Boxo Platform and Boxo SDK

In this section we will look at some additional integration details (such as user’s locale) when working with Boxo Platform and Boxo SDK.

Payment Payload

Here is the payload that Boxo will send via platform to host app backend. A fast track order is a pre-booking for a specific airport. quantity is the number of passengers. custom_attributes.currency and entry_price are the catalog price per passenger. The top-level currency and amount are what the host charges. paid_entries is how many passengers are paid; the rest are covered by a tier, and discount_amount is the value of the free passengers. tax_amount is 0. country_code, country_title, and hub_title identify the airport. tier_applied, tier_name, tier_names, and free_entries are included only when a tier covered one or more passengers. tier_applied is the string "true". tier_names is a comma-separated list when more than one tier was used.

Local pricing

When the order has a local pricing snapshot, custom_attributes also includes:
  • original_price — the order total in the catalog currency, before conversion.
  • initial_converted_price — that total converted into the local currency, before rounding.
  • rounding_rule — code of the rounding rule that produced the charged amount. Omitted when no rounding rule ran.
amount on those price objects is a decimal string with trailing zeros removed. entry_price and custom_attributes.currency stay in the catalog currency. When the source charges in the local currency, currency, amount, subtotal_amount, and discount_amount are the local amounts. amount is the rounded snapshot taken when the order was created. discount_amount is converted with the snapshot rate, and subtotal_amount absorbs the rounding difference so that subtotal_amount - discount_amount equals amount. When a snapshot exists but the source still charges in the catalog currency, the top-level amounts stay in that currency and the three attributes are still sent. The attributes are omitted entirely when the order has no snapshot.
With that rule the charged amount is "6100.00" and currency is "AMD".

Locale

Host app can provide language during initial launch and miniapp will be able to retrieve latest language settings.

Closing miniapp and landing on Home page on next launch

In order to land on Home page each time miniapp is closed and reopened, a saveState=false can be passed. This behavior is available in versions starting from v0.1.4. For example:
The deeplink URL should include miniapp id and the relevant URL route, if needed to land user on a specific page. User will first deeplink to host app, then in host app it parses the deeplink and obtains the miniapp ID and the path to the page. Open the homepage of the miniapp
Open a specific page within the miniapp

Hide About from Menu

Available from SDK version v0.1.6 (Capacitor v5) and v0.2.4 (Capacitor v6).

Caching

Miniapp config is cached for 60 seconds. Logo and other related miniapp configuration changes should be reflected on next launch after 60 seconds have passed.

Webhooks

Here are example payloads for the webhooks the fast track miniapp sends, if you have provided us with the webhook URL. The fast track backend uses hostapp_client_id and hostapp_secret_key configured in Boxo Platform. They are passed as basic auth in the Authorization header on every request. You can use this to authenticate your webhook endpoint. Match an order webhook to the payment with external_source_payment_id (the same value as external_id). tier is the tier id that provided the free passengers, or null. membership is null on a fast track order; the guest is the hostapp_user_id from the payment.

Fast track order success

This event is fired when the fast track pass is issued.

Fast track order failed

This event is fired when the guest was charged and the pass could not be issued. Hostapp can use it to initiate a refund if this event is received. The payload has the same shape as order.completed. completed is null.

Fast track visit redeemed

This event is fired when a fast track pass is redeemed. The redeemed lane is under lounge. resource_type is FAST_TRACK. membership is null when the visit is not tied to a membership.

Webhook Simulator

This endpoint allows to simulate webhooks sent by the fast track backend. Webhook simulator is available at <lounge-backend-url>/api/v1/sources/<source_slug>/webhook/simulator/. event_type is order.completed or membership.redemption. membership_id and reference are optional; the simulator generates them when they are omitted.