- From your server, call the Create Checkout Session API to create a checkout session.
-
After receiving the API response on your server, extract the values from the session object:
-
Use the values returned in the Create Checkout Session API response to open the checkout on the client, and pass your player’s
customerId. The SDK uses this ID with the sessionpurchaseIdto validate the order if the player closes the browser during checkout and later returns to the game. It also identifies the correct player when multiple players share the same device.The session response values must be passed exactly as received. Modifying them may result in the checkout failing to load. -
You can also configure how the checkout page is opened (optional):
-
External browser
Open the checkout in the device’s default browser. This flow will use theredirectUrlprovided in the initialization to return 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 plist file to return back to the app. For more information, see Sell Outside IAP.
-
External browser
iOS
Launch the Checkout
To launch the checkout, follow these steps:
Was this page helpful?
