Implementing Offer Pricing Page
This article provides guidance on how offers can be displayed to your customers in a sample offer pricing page. How you want to display your pricing and packaging is very much up to you, so see this snippet of HTML as a base.
Prerequisites
You need to have offer IDs of the offers that you want to present (e.g. 2 offers).
Step 1: Prepare page
Go to this page and see the example HTML code provided there. You can treat it as a base to create your own preferred page.
Step 2: Display offer details
- You can of course hard code the details of the offers directly within the pricing page. However, you can also fetch the details of the offers that you configured within the Cleeng dashboard directly from the API.
- Fetch your offers details by making a GET request to the /offers/:offerId endpoint.
- Then you simply display the retrieved data to the customer.
Note: If you have created localized offers (versions of your offer that will be available to customers in a country you specify), see the information on displaying offers for a given localization (country) below.
Here is a sample offer display page:
Step 3: Trigger the checkout
Embed the widget script (if you haven't done it yet) and invoke the checkout.
FAQs
How to display localized offers?
Step 1: Fetch offer details
Fetch the details of the offers that you configured within the Cleeng dashboard directly from the API. You can do it in one of the ways:
Option 1
Make a GET request to the Fetch offer details MediaStore API endpoint. This will return details of offer localizations matching a particular country or location. You can use either a short or a long offer ID:
-
Use a short offer ID without a country suffix (e.g. S123456789) to dynamically retrieve details of the offer localization matching the current user location. Cleeng will return the matching offer localization based on the provided customer IP.
This endpoint returns a localized offer for the user based on the provided customer IP. In case customer IP is not provided in the request, the request IP will be used and the request should come from the client app (not from a backend server) so that the user location can be recognized correctly.
-
Use a long offer ID with country suffix (e.g. S123456789_US) to directly request the localization, e.g. US.
Option 2
Use the Fetch offer details for specific customer MediaStore API endpoint.
This endpoint returns a localized offer for the user based on the provided customer IP. In case customer IP is not provided in the request, the request IP will be used and the request should come from the client app (not from a backend server) so that the user location can be recognized correctly.
Step 2: Display offer
The API will automatically return the correct localized offer if one exists for the specified country. If no specific localization is found, the API will fall back to the main (default) offer that was configured in the Cleeng Dashboard.
Here is a sample offer display page:
Updated 20 days ago
