In this step, create the product and set up its name, price, and additional information:
Argument | Is Mandatory | Description |
---|---|---|
customerId | mandatory | The name or identifier of the customer. |
email | The customer’s email address. Although not mandatory, providing it helps expedite the payment process. | |
price | mandatory | The price in cents , which will be converted by Appcharge . |
currency | mandatory | The currency used for the transaction, e.g., usd , eur . |
offerName | mandatory | The name of the offer. |
offerSku | mandatory | The SKU number or text for the offer. |
offerAssetUrl | A URL displaying an image for the offer. | |
offerDescription | mandatory | A description of the offer. |
The session metadata allows you to add extra data for BI (Business Intelligence) and tracking purposes.
You must add at least one item to the offer.
Argument | Is Mandatory | Description |
---|---|---|
name | mandatory | The name for the item |
assetUrl | mandatory | The URL of an image to display the item. |
sku | mandatory | The SKU of the item. |
quantity | mandatory | The quantity of the item. For example, if the name is “Coins” and the quantity is 300, it will be displayed as “300 Coins.” |
quantityDisplay | The Quantity Display allows you to replace the numerical quantity with custom text. |
In the final step, open the checkout by passing the product model to it:
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. |