Step 1 | Install the SDK
In your app, install the SDK:Step 2 | Import the checkout component
Add the following import statement to the component where you plan to trigger the checkout flow:Step 3 | Create a checkout session
When a player selects an offer in your web store, your backend must call the Create Checkout Session API to create a checkout session for the player. When creating the checkout session, you must include localized pricing information by passing the localized price and currency in thepriceDetails property. You can do this in one of the following ways:
- Pass your own localized prices directly in the Create Checkout Session request.
- Manage and retrieve localized prices using Appcharge Price Points, and pass the relevant price points in the request.
parsedUrl value, which is the checkout URL.
Step 4 | Render and configure the checkout component
Once you receive theparsedUrl returned by your backend, the next step is to render the checkout component.
This example shows a basic setup with minimal configuration, but your implementation may include any of the supported properties listed below:
Properties
TheAppchargeCheckout component supports the properties below, and additional event properties to enable realtime analytics.
| Prop | Type | Required | Params available | Description |
|---|---|---|---|---|
checkoutUrl | string | Yes | No | The checkout URL as provided by the backend-to-backend request. |
referrerUrl | string | No | No | The domain you’re coming from, for example, www.appcharge.com. The referrerUrl must be an HTTPS domain. |
locale | string | No | No | Defines the checkout language. For more details, see Translate your Checkout. |
