The session metadata allows you to add extra data for BI (Business Intelligence) and tracking purposes.
// Option 01: Use to get a parsable object stringmodel.addSessionMetadata(key: String, value: String)// Example usagemodel.addSessionMetadata("sessionDetails", "details...")// Example Output/*{ ..., "sessionMetadata": "{\"sessionDetails\":\"details...\"}"}*/// Option 02: Use to get any stringmodel.sessionMetadata = "{...}"// Example usagemodel.sessionMetadata = "{ \"sessionDetails\": \"details...\" }"// Example output/* { ..., sessionMetadata: { "sessionDetails": "details..." } }*/
val model = SessionRequestModel(...) // Your session modelmodel.addItem( "Coins", "<https://media-dev.appcharge.com/media/product-3.png">, "Coins_xoxoxo", 300, "300 Coins Booster")
In this final step, open the checkout by passing the product model to it:
bridge.openCheckout(model);
At runtime, a new window will open, guiding the user through the purchase process. Based on user interaction, the following interface methods will be triggered:
Method
Description
OnPurchaseSuccess
Triggered when the user successfully completes the purchase.
OnPurchaseFailed
Triggered when the checkout window is closed or if an error occurs during the purchasing process.
Was this page helpful?
⌘I
Assistant
Responses are generated using AI and may contain mistakes.