Skip to main content
To launch the checkout, follow these steps:
  1. From your server, call the Create Checkout Session API to create a checkout session.
    • When calling the Create Checkout Session API, don’t pass the redirectUrl parameter. The SDK already handles the redirect automatically using the configuration file.
    • Call the API from your server to ensure session integrity and security. Never invoke this endpoint from your client-side Unity Project.
  2. After receiving the API response on your server, extract the values from the session object:
  3. Use the values returned in the checkout session response to open the checkout on the client:
    The session response values must be passed exactly as received. Modifying them may result in the checkout failing to load.
  4. For WebGL integrations, no additional checkout display setup is required. The checkout opens as an iframe within the WebGL game.

Optional Android and iOS checkout behavior

The following optional settings are only relevant for Android and iOS integrations.
  1. Control whether the Android foreground checkout service is enabled:
    The foreground service is enabled by default and helps keep your app prioritized while checkout is open, reducing the risk of Android closing or deprioritizing it during payment and network operations. You can enable or disable the service during runtime using:
    The foreground service runs only if the required manifest permissions and service declaration are properly configured. If you don’t want to use the foreground service, remove CheckoutService declaration from your manifest file and disable it during runtime using the method above. The foreground permissions can remain, as they may be used by other services in your app.
  2. You can also override at runtime how the checkout page is opened:
    • External browser
      Open the checkout in the device’s default browser. This flow will redirect the player back to the app.
      Running the checkout in an external browser may cause inconsistent behavior across devices, incomplete transactions, or app unexpected lifecycle behavior.
    • Non-external browser (default)
      Open the checkout in a non-external browser. This flow uses the URL scheme defined for the SDK to return to the app.

      For Android, choose whether the Checkout opens in a Trusted Web Activity (TWA), or in a Custom Chrome Tab (CCT). For iOS, the checkout opens via SFSafariViewController. For more information regarding iOS, see Sell Outside IAP.
  3. For Unity iOS only, you can force the Checkout page to display in portrait orientation, even if the app is currently in landscape mode: