---
updatedAt: 2026-07-08T11:17:55.000Z
agentTools:
  projectIndex: https://developers.cleeng.com/llms.txt
---

# Launch Subscriptions

Start here to get your web checkout, authentication, account and customer care flows live using Cleeng's Hosted Customer Flows on the first day.

**Launch Subscriptions** > <Anchor target="_blank" href="https://developers.cleeng.com/docs/extend-your-integration">Extend Your Integration</Anchor> > <Anchor target="_blank" href="https://developers.cleeng.com/docs/scale-your-integration">Scale Your Integration</Anchor>

***

On this page you find the building blocks to enable your digital subscription product within your web application using Cleeng <Anchor target="_blank" href="https://publisher.support.cleeng.com/hc/en-us/articles/21714585736732-MediaStore-Hosted-Customer-Flows">Hosted Customer Flows</Anchor>.

<Callout icon="📘" theme="info">
  ###

  **Timeline: Day 1**

  Basic setup (account creation, embedding widgets, and account verification) can be completed in **under 60 minutes**. Allow additional time to create offers and include entitlement logic.
</Callout>

<Callout icon="📘" theme="info">
  ###

  If you are interested in **advanced integration options**, see our <Anchor target="_blank" href="https://developers.cleeng.com/docs/getting-started-with-cleeng">Integration Approaches</Anchor>.
</Callout>

## Quick Start

Follow the steps below to set up your Cleeng integration and get up and running quickly.

### 1. Create a Cleeng account

Complete the <Anchor target="_blank" href="https://srm.cleeng.com/register">registration form</Anchor> to create an account with Cleeng and follow the instructions to [create a first offer](https://publisher.support.cleeng.com/hc/en-us/articles/360012552919-What-is-a-Cleeng-offer).

### 2. Start with Checkout

The Checkout widget handles full sign-up/login, billing, coupons and payments.

<Cards columns={2}>
  <Card title="Checkout" href="https://srm.cleeng.com/admin/hosted-customer-flows?tab=checkout" icon="fa-shopping-cart" target="_blank">
    *Embed Cleeng's purchase flow*
  </Card>
</Cards>

### 3. (Optional) Use more building blocks

Select the optional building blocks you need:

<Cards columns={2}>
  <Card title="Sign Up" href="https://srm.cleeng.com/admin/hosted-customer-flows?tab=sign-up" icon="fa-user" target="_blank">
    *Embed Cleeng's authentication flow*
  </Card>

  <Card title="Offer Pricing Page" href="https://srm.cleeng.com/admin/hosted-customer-flows?tab=pricing-page" icon="fa-coin" target="_blank">
    *Display your offers and prices*
  </Card>

  <Card title="User Account" href="https://srm.cleeng.com/admin/hosted-customer-flows?tab=user-account" icon="fa-home" target="_blank">
    *Embed Cleeng's account management flow*
  </Card>

  <Card
    title="Customer Care"
    href="https://srm.cleeng.com/admin/hosted-customer-flows?tab=customer-care
"
    icon="fa-user-headset"
    target="_blank"
  >
    *Embed Cleeng's Help Center*
  </Card>
</Cards>

<Callout icon="📘" theme="info">
  ###

  In-Depth Guides

  For more detailed information on each widget, see our <Anchor target="_blank" href="https://developers.cleeng.com/docs/implementing-hosted-customer-flows">complete guides on hosted customer flows</Anchor>.
</Callout>

### 4. Unlock content with entitlements

Finish by protecting your premium content.

This JavaScript code snippet retrieves the user details, including the <Glossary>JWT</Glossary> (JSON Web Token) that is identifying the actual user/subscriber.

```javascript
const handleCleengMessage = (event) => {
  if (event.data?.type === 'CLEENG_SDK_LOADED') {
    // Now it's safe to interact with the window.cleeng object
    window.cleeng.onAuthTokensUpdate(({jwt, refreshToken}) => {
            if (jwt && refreshToken) {
            // User is logged in - store tokens in your app
            console.log('User authenticated');
            localStorage.setItem('cleeng-token', value); //save the token using your preferred storage method
          } else {
            // User is logged out
            console.log('User logged out');
            localStorage.removeItem('cleeng-token', value);
          }
    });
  }
};

window.addEventListener('message', handleCleengMessage);

// Remember to remove the event listener when the component unmounts
// e.g., return () => window.removeEventListener('message', handleCleengMessage);
```

This JavaScript code snippet validates the entitlement (access rights) of the user (<Glossary>JWT</Glossary>) to a given offer, and can be used to unlock premium content.

```javascript
const cleengJWT = localStorage.getItem('cleeng-token');
const offerId = "S123123123_US"; // use your offer ID

async function checkEntitlement() {
  try {
    const response = await fetch(
      `https://mediastoreapi.cleeng.com/entitlements/${offerId}`,
      {
        method: "GET",
        headers: {
          accept: "application/json",
          Authorization: `Bearer ${cleengJWT}`,
        },
      }
    );

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    const { responseData } = await response.json();

    // entitlement logic
    if (responseData.accessGranted) {
      // Now you know that the user has access and you can show them the premium content.
    } else {
      // User has no subscription yet. You can show UI prompting them to subscribe.
    }

    // Debugging
    console.log("Full response:", JSON.stringify(responseData, null, 2));
  } catch (err) {
    console.error("Request failed:", err.message);
  }
}

checkEntitlement();
```

<Callout icon="📘" theme="info">
  ###

  For more advanced entitlement options see the <Anchor target="_blank" href="https://developers.cleeng.com/docs/unlocking-content-with-entitlements">advanced entitlement guide</Anchor>. For higher security consider <Anchor target="_blank" href="https://developers.cleeng.com/docs/unlocking-content-with-entitlements#option-1-backend-integration-with-core-api-recommended">backend integration</Anchor>.
</Callout>

## Sample Flow

See the example user flow below.

### Sign Up Example

<Image src="https://files.readme.io/39405433cb95820e598b5199525ae676f46324c3b50ff3aa6189fc94e86b63d1-cleeng_sign_up.png" align="center" border={true} />

### Offer Pricing Page Example

<Image src="https://files.readme.io/e916eebf6493cbd380eeeb077a5fee59f04bc78e121f9738c04edf8af69b32f3-cleeng_offer_display.png" align="center" />

### Checkout Example

<Image src="https://files.readme.io/a99fe95720976d4271ee1c566a83857094dc5c6fb94bb4a5aadeed340f632921-cleeng_hosted_customer_flows_checkout_example.png" align="center" />

### User Account Example

<Image src="https://files.readme.io/fb52ed505ec0ee1c5c544eb91a172aee14e1697d791a473878afc30e34a5fd32-cleeng_user_account.png" align="center" border={true} />

### Customer Care Example

<Image src="https://files.readme.io/71f464e49ebd725873176b6f6e4b37bcf80e61e842f18aa22f8ae5eebccbbb20-cleeng_customer_care.png" align="center" />

## Go live checklist

To easily get started with us, follow our <Anchor target="_blank" href="https://publisher.support.cleeng.com/hc/en-us/articles/21971078809756-Pro-Go-Live-Checklist">go live checklist</Anchor>.

## Learn more

* Find out more about <Anchor target="_blank" href="https://publisher.support.cleeng.com/hc/en-us/articles/21714585736732-MediaStore-Hosted-Customer-Flows">hosted customer flows and supported features</Anchor>.
* If you need more in-depth implementation details, see the <Anchor target="_blank" href="https://developers.cleeng.com/docs/implementing-hosted-customer-flows">complete hosted widgets developer guides</Anchor>.

## What's next

Now that your basic setup is complete and your web subscription flows are running, it is time to enhance the user experience. Move on to <Anchor target="_blank" href="https://developers.cleeng.com/docs/extend-your-integration">Extend your integration</Anchor> to add optional, low-code enhancements - such as customizing transactional emails, setting up coupon campaigns, or connecting Apple and Google Play analytics.

<br />