- From your server, call the Create Checkout Session API to create a checkout session.
-
After receiving the API response on your server, extract the relevant values and pass them to the
OpenCheckoutfunction on the client:Parameter Description checkoutSessionTokenA unique token to identify and validate the checkout session. purchaseIdID to track the purchase. urlThe base URL of the Appcharge checkout page.
Checkout presentation
You can manually override the following configuration settings at runtime by updating them programmatically. To control how the browser is opened:-
External browser
Open the checkout in the device’s default browser. This flow will redirect the player back to the app. -
Non-external browser (default)
The checkout opens in the device’s internal browser or SFSafariViewController. This flow will use the URL scheme provided in the configuration file to return back to the app. For more information, see Sell Outside IAP.
-
Use current layout (default)
The checkout uses the current application orientation. -
Portrait Lock mode
Lock the orientation to portrait whenever the checkout launches, even if the application is in landscape mode.
