# Cleeng Documentation
## Guides
- [Customer Anonymization](https://developers.cleeng.com/docs/customer-anonymization.md)
- [Dunning Action Settings](https://developers.cleeng.com/docs/dunning-action-settings.md)
- [Email Templates Customization](https://developers.cleeng.com/docs/email-templates-customization.md)
- [Entitlements Caching](https://developers.cleeng.com/docs/entitlements-caching.md)
- [Hi5 end-user authentication](https://developers.cleeng.com/docs/hi5-end-user-authentication.md)
- [Adyen Payment Setup](https://developers.cleeng.com/docs/extended-adyen-payment-setup.md)
- [Gift Subscriptions Setup via API](https://developers.cleeng.com/docs/gift-subscriptions-setup-via-mediastore-api.md): Follow the steps to implement [gift subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/11005568853404-Gift-Subscriptions) with MediaStore SDK API.
- [Purchase Flow via API](https://developers.cleeng.com/docs/identity-management-1.md)
- [Merchant Payment Methods Filtering](https://developers.cleeng.com/docs/merchant-payment-methods-filtering.md)
- [Offer Display (Web)](https://developers.cleeng.com/docs/offer-display.md)
- [Payment-free Setup](https://developers.cleeng.com/docs/payment-free-setup.md)
- [Checkout Implementation (Web)](https://developers.cleeng.com/docs/payments-overview.md)
- [PayPal Payment Setup](https://developers.cleeng.com/docs/paypal-payment-setup.md)
- [Identity Management](https://developers.cleeng.com/docs/registration.md)
- [Integration Guide](https://developers.cleeng.com/docs/components-integration-guide.md)
- [Payment Configuration](https://developers.cleeng.com/docs/payment-configuration.md)
- [Gift Subscriptions Setup via Components](https://developers.cleeng.com/docs/gift-subscriptions-setup-via-mediastore-components.md)
- [MediaStore SDK Components Library](https://developers.cleeng.com/docs/components-library.md)
- [One-Click Coupons](https://developers.cleeng.com/docs/one-click-coupons.md): To optimize further your coupon campaigns or grant free access for the so-called VIP checkouts, you can apply one-click coupons.
- [Translations](https://developers.cleeng.com/docs/translations.md)
- [Implementing Web Checkout (react.js)](https://developers.cleeng.com/docs/implementing-web-checkout-reactjs.md)
- [Current Plan Setup](https://developers.cleeng.com/docs/current-plan-setup.md)
- [My Account (Web) via API](https://developers.cleeng.com/docs/my-account-1.md)
- [Payment Information](https://developers.cleeng.com/docs/payment-information.md)
- [User Profile Management](https://developers.cleeng.com/docs/user-profile-management.md)
- [User Support](https://developers.cleeng.com/docs/viewer-support-1.md)
- [Pause Setup via API ](https://developers.cleeng.com/docs/pause-setup-via-api.md)
- [Single Sign-on (SSO)](https://developers.cleeng.com/docs/sso.md)
- [Subscription Lifecycle Flows](https://developers.cleeng.com/docs/subscription-lifecycle-flows.md)
- [Webhooks Overview](https://developers.cleeng.com/docs/webhook-overview.md)
- [Webhook Topics](https://developers.cleeng.com/docs/webhook-topics-overview.md)
- [Webhook - Pass Topics [Early Access]](https://developers.cleeng.com/docs/webhook-pass-topics.md)
- [Webhook - Subscription Topics](https://developers.cleeng.com/docs/webhook-subscription-topics.md)
- [Webhook - General Topics](https://developers.cleeng.com/docs/webhook-topics.md)
- [Webhooks - In-App Purchase Topics](https://developers.cleeng.com/docs/webhooks-in-app-purchase-topics.md)
- [Webhooks - Offer Topics](https://developers.cleeng.com/docs/webhooks-offer-topics.md)
- [Webhooks Configuration](https://developers.cleeng.com/docs/webhooks-configuration.md)
- [Webhooks - In-App Purchase Validation](https://developers.cleeng.com/docs/webhooks-in-app-purchase-validation.md)
- [How to Create Introductory Offers](https://developers.cleeng.com/docs/how-to-create-introductory-offers.md)
- [Build with LLMs](https://developers.cleeng.com/docs/build-with-llms.md)
- [Introduction to Cleeng](https://developers.cleeng.com/docs/getting-started-with-cleeng.md)
- [Introduction to Cleeng Pro](https://developers.cleeng.com/docs/introduction-to-cleeng-pro.md)
- [Cleeng Sandbox](https://developers.cleeng.com/docs/cleeng-sandbox.md)
- [Setting Up Your Development Environment](https://developers.cleeng.com/docs/setting-up-your-development-environment.md)
- [Quick Start](https://developers.cleeng.com/docs/quick-start.md)
- [Account Hosted Widget ](https://developers.cleeng.com/docs/account-hosted-widget.md)
- [Auth Hosted Widget](https://developers.cleeng.com/docs/auth-hosted-widget.md)
- [Checkout Hosted Widget ](https://developers.cleeng.com/docs/checkout-hosted-widget.md)
- [Cleeng Hosted Widgets: Global Communication Methods](https://developers.cleeng.com/docs/cleeng-hosted-widgets-global-communication-methods.md)
- [Customer Care Hosted Widget](https://developers.cleeng.com/docs/customer-care-hosted-widget.md)
- [Hosted Widgets: Retrieving Customer Details](https://developers.cleeng.com/docs/hosted-widgets-retrieving-customer-details.md)
- [Implementing Hosted Customer Flows [Early Access]](https://developers.cleeng.com/docs/implementing-hosted-customer-flows.md)
- [Implementing Offer Pricing Page](https://developers.cleeng.com/docs/implementing-offer-pricing-page.md)
- [Migrating to Cleeng](https://developers.cleeng.com/docs/migrating-to-cleeng.md)
- [Android](https://developers.cleeng.com/docs/android.md)
- [Apple In-App Purchase - SK2](https://developers.cleeng.com/docs/apple-in-app-purchase-storekit-2.md): This tutorial will help you integrate Apple in-app purchases using the StoreKit 2 framework.
- [Implementing Mobile Apps](https://developers.cleeng.com/docs/payments_on_mobile_tv_apps_intro.md)
- [Apple In-App Purchase - SK1 [Deprecated]](https://developers.cleeng.com/docs/ios-tvos-integration.md)
- [Testing and Debugging](https://developers.cleeng.com/docs/testing-and-debugging.md)
- [Load Testing Online Video Platform](https://developers.cleeng.com/docs/load-testing-online-video-platform.md)
- [Testing Recurring Payments](https://developers.cleeng.com/docs/testing-recurring-payments.md)
- [Entitlements - Example Code Snippets ](https://developers.cleeng.com/docs/entitlements-example-code-snippets.md)
- [Unlocking Content with Entitlements](https://developers.cleeng.com/docs/unlocking-content-with-entitlements.md): This article explains how to unlock content for your subscribers with Cleeng entitlements.
- [Data](https://developers.cleeng.com/docs/data-ingestion-export.md)
- [Device Login Flow (PIN Pair)](https://developers.cleeng.com/docs/device-login-flow-pin-pair.md)
- [Fraud prevention with Google reCAPTCHA for MediaStore API](https://developers.cleeng.com/docs/fraud-prevention-solution-with-google-recaptcha-mediastore-api.md)
- [Fraud prevention with Google reCAPTCHA for MediaStore Components](https://developers.cleeng.com/docs/fraud-prevention-solution-with-google-recaptcha-mediastore-components.md)
- [Google reCAPTCHA](https://developers.cleeng.com/docs/fraud-prevention-solution-with-google-recaptcha.md)
- [Identity Management](https://developers.cleeng.com/docs/identity-management-sso.md)
- [Integrating with Auth0 [Early Access]](https://developers.cleeng.com/docs/integrating-with-auth0.md)
- [Integration Hub Overview](https://developers.cleeng.com/docs/integration-hub-overview.md)
- [Braze [Early Access]](https://developers.cleeng.com/docs/braze.md)
- [Marketing](https://developers.cleeng.com/docs/marketing-and-communications.md)
- [Multi-Channel Billing](https://developers.cleeng.com/docs/multi-channel-billing.md)
- [Externally-Managed Passes](https://developers.cleeng.com/docs/externally-managed-passes.md)
- [Externally-Managed Subscriptions](https://developers.cleeng.com/docs/externally-managed-subscriptions.md)
- [Integrating Multi-Channel Billing](https://developers.cleeng.com/docs/integrating-multi-channel-billing.md)
- [Multi-Channel Billing Use Cases](https://developers.cleeng.com/docs/multi-channel-billing-use-cases.md)
- [Amazon FireTV](https://developers.cleeng.com/docs/amazon-firetv.md)
- [Payments on TV Apps](https://developers.cleeng.com/docs/payments-on-tv-apps.md)
- [Roku](https://developers.cleeng.com/docs/roku.md)
- [Samsung TV](https://developers.cleeng.com/docs/samsung-tv-integration.md): This tutorial will help you integrate purchases made via Samsung TV.
- [Vizio](https://developers.cleeng.com/docs/vizio.md): This tutorial will help you integrate purchases made via Vizio.
- [Cleeng-Managed Purchases - Recurring Billing](https://developers.cleeng.com/docs/cleeng-managed-recurring-billing.md)
- [Connector Checklist](https://developers.cleeng.com/docs/connector-checklist.md): Once you have followed all the steps for **[adding a payment connector](https://developers.cleeng.com/docs/adding-a-payment-connector)**, use the checklist below to make sure the necessary functions are supported.
- [Externally-Managed Purchases - Recurring Billing](https://developers.cleeng.com/docs/externally-managed-recurring-billing.md)
- [Adding a Payment Connector](https://developers.cleeng.com/docs/adding-a-payment-connector.md)
- [Prerequisites](https://developers.cleeng.com/docs/prerequisites-1.md)
- [Reference Materials](https://developers.cleeng.com/docs/reference-materials.md)
- [Subscription Initial Purchase](https://developers.cleeng.com/docs/subscription-initial-purchase.md)
- [Subscription Recurring Billing](https://developers.cleeng.com/docs/subscription-recurring-billing.md)
- [Termination](https://developers.cleeng.com/docs/termination.md)
- [Update Payment Details](https://developers.cleeng.com/docs/update-payment-details.md)
- [Payment](https://developers.cleeng.com/docs/payment.md)
## API Reference
- [Get a gift](https://developers.cleeng.com/reference/31-get-a-gift.md): This endpoint retrieves details of a given gift that was previously purchased.
- [Redeem a gift](https://developers.cleeng.com/reference/31-redeem-a-gift.md): Use this endpoint to redeem a gift. A gift can be redeemed after a successful verification.
- [Update a gift](https://developers.cleeng.com/reference/31-update-a-gift.md): This endpoint gives possibility to update delivery details of a given gift that was previously purchased.
- [Verify a gift](https://developers.cleeng.com/reference/31-verify-a-gift.md): Use this endpoint to verify whether a gift code provided by the user is valid. The gift code has to be verified before a gift is redeemed.
- [Gift Subscriptions](https://developers.cleeng.com/reference/31-gift-subscriptions.md)
- [Fetch available switches](https://developers.cleeng.com/reference/31-fetch-available-switches.md): This endpoint returns all available offers to which a customer can switch from the current subscription in `available` array. Offers to which customer can't switch are returned in `unavailable` array with the reason why the switch is not possible.
- [Fetch switch details](https://developers.cleeng.com/reference/31-fetch-switch-details.md): This endpoint retrieves details of a given subscription switch (e.g. upgrade, downgrade).
**Important**
Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: [Adyen](https://publisher.support.cleeng.com/hc/en-us/articles/4406573398930), [PayPal](https://publisher.support.cleeng.com/hc/en-us/articles/4406573425042). Please contact [Cleeng Support Team](https://publisher.support.cleeng.com/hc/en-us/requests/new) if you wish to use other payment connectors/gateways.
- [List switches](https://developers.cleeng.com/reference/31-list-switches.md): This endpoint lets you list all subscription switches (e.g. upgrades, downgrades) that meet the requirements given in the API request. For example, it allows you to filter switches by status or subscription ID.
**Important**
Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: [Adyen](https://publisher.support.cleeng.com/hc/en-us/articles/4406573398930), [PayPal](https://publisher.support.cleeng.com/hc/en-us/articles/4406573425042). Please contact [Cleeng Support Team](https://publisher.support.cleeng.com/hc/en-us/requests/new) if you wish to use other payment connectors/gateways.
- [Switch subscription](https://developers.cleeng.com/reference/31-switch-subscription.md): This endpoint is used to upgrade or downgrade a subscription to another subscription plan. Use either `subscriptionId` OR `customerId` and `fromOfferId` together (`customerId` and `fromOfferId` can only be used with Cleeng-managed subscriptions where the whole lifecycle is under the control of Cleeng). As these last two parameters are deprecated, `subscriptionId` is going to be the only option to use this endpoint.
**Important**
Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: [Adyen](https://publisher.support.cleeng.com/hc/en-us/articles/4406573398930), [PayPal](https://publisher.support.cleeng.com/hc/en-us/articles/4406573425042). Please contact [Cleeng Support Team](https://publisher.support.cleeng.com/hc/en-us/requests/new) if you wish to use other payment connectors/gateways.
- [Update switch](https://developers.cleeng.com/reference/31-update-switch.md): Use this endpoint to manage a subscription switch.
Currently, this endpoint supports cancelling a pending switch. (Pending is the status of the switch between the subscription switch request and the actual switch processing.)
Cancelling a pending switch triggers a [`subscriptionSwitchCancelled`](https://developers.cleeng.com/docs/webhook-subscription-topics#subscriptionswitchcancelled) webhook.
**Important**
Subscription upgrade and downgrade feature requires compatibility of the payment connector and payment gateway. Currently the feature is fully supported for the following: [Adyen](https://publisher.support.cleeng.com/hc/en-us/articles/4406573398930), [PayPal](https://publisher.support.cleeng.com/hc/en-us/articles/4406573425042). Please contact [Cleeng Support Team](https://publisher.support.cleeng.com/hc/en-us/requests/new) if you wish to use other payment connectors/gateways.
- [Activate subscription](https://developers.cleeng.com/reference/activate-subscription.md): Use this endpoint to activate a subscription.
- [Cancel subscription](https://developers.cleeng.com/reference/cancel-subscription.md): Use this endpoint to cancel a subscription.
- [Create subscription](https://developers.cleeng.com/reference/create-subscription.md): Use this endpoint to create [externally-managed subscriptions](https://developers.cleeng.com/docs/externally-managed-subscriptions) - subscriptions whose lifecycle is managed outside of Cleeng.
You can create [multiple subscriptions for the same offer and customer](https://developers.cleeng.com/docs/externally-managed-subscriptions#multiple-subscriptions-per-offer) with this endpoint. But the endpoint prevents duplicate subscriptions with the same external ID and source. It only allows new subscriptions if there isn't already an active subscription from the same source and with the same external ID.
**Important**
This endpoint can only be used for creating subscriptions (offers with recurring payments). It **cannot be used for one-time payment offers** such as passes, live events (previously called live pay-per-view), or one-time purchase (previously called TVOD). (For more information on offers, see [What is a Cleeng offer?](https://publisher.support.cleeng.com/hc/en-us/articles/360012552919-What-is-a-Cleeng-offer)).
- [Get a subscription](https://developers.cleeng.com/reference/get-a-subscription.md): Use this endpoint to get subscription details based on subscription ID.
- [Subscriptions](https://developers.cleeng.com/reference/31-subscriptions.md): Core API (API 3.1) provides endpoints which allow you to manage subscriptions
- [List subscriptions](https://developers.cleeng.com/reference/list-subscriptions.md): This endpoint returns subscriptions that match the specified criteria (`transactionId`, `paymentMethodId`, `externalId`, `customerId` or `offerId` and `customerId` together). Please bear in mind that if you don't provide any parameters, an empty list will be returned.
**Note:** Filtering by `customerId` and `offerId` might return multiple active subscriptions instead of one if [multiple subscriptions have been created for the same offer](https://developers.cleeng.com/docs/externally-managed-subscriptions#multiple-subscriptions-per-offer).
- [Pause subscription ](https://developers.cleeng.com/reference/pause-subscription.md): Use this endpoint to pause a subscription. You can only pause active and canceled subscriptions (you cannot pause in-trial or terminated subscriptions).
Transition from active state to pause is tied to subscription anniversary date (the pause will start with a new billing cycle).
- [Renew subscription](https://developers.cleeng.com/reference/renew-subscription.md): Use this endpoint to renew [externally-managed subscriptions](https://developers.cleeng.com/docs/externally-managed-subscriptions) (EMS) - subscriptions whose life cycle is managed outside of Cleeng.
- [Resume subscription](https://developers.cleeng.com/reference/resume-subscription.md): Use this endpoint to resume a subscription from a scheduled pause or to immediately resume from the pause that is ongoing. With immediate resume from the pause which is in progress, a payment attempt is made and the customer is charged.
- [Revive subscription](https://developers.cleeng.com/reference/subscription-revive.md): This endpoint is used to revive terminated [externally-managed subscriptions](https://developers.cleeng.com/docs/externally-managed-subscriptions) (EMS) - subscriptions whose life cycle is managed outside of Cleeng.
A terminated externally managed subscription is revived by creating a new subscription based on the terminated one.
The data is copied from the terminated subscription (e.g. original purchase date, payment details), however, the old expiration date will be overriden if a new one is provided.
**Note:** You can only revive **terminated** subscriptions.
For subscription revival [subscription resource payload](https://developers.cleeng.com/reference/create-subscription#response-description) should be returned in response with non-empty `replacedBy` property.
- [Terminate subscription](https://developers.cleeng.com/reference/terminate-subscription.md): Use this endpoint to terminate a subscription.
- [Transfer subscription](https://developers.cleeng.com/reference/transfer-subscription.md): Use this endpoint to transfer [externally-managed subscriptions](https://developers.cleeng.com/docs/externally-managed-subscriptions) (EMS) - subscriptions whose life cycle is managed outside of Cleeng.
Subscription is transferred if there is already an active subscription in Cleeng that belongs to a customer with a different email address. Then a new subscription is created for the "new customer" (the one using the new email address) and the subscription assigned to the "old customer" (the one using the old email address) is terminated.
**Note:** For subscription transfer [subscription resource payload](https://developers.cleeng.com/reference/create-subscription#response-description) should be returned in response with non-empty `replacedBy` property.
- [Update subscription](https://developers.cleeng.com/reference/update-subscription.md): Use this endpoint to update an existing subscription, for example apply a coupon or to update payment details.
- [Getting Started With Core API](https://developers.cleeng.com/reference/api31.md)
- [List campaigns](https://developers.cleeng.com/reference/list-campaigns.md): This endpoint lets you list all your campaign details based on a coupon code.
- [Dunning actions](https://developers.cleeng.com/reference/dunning-actions.md): Dunning is the process of retrying payment attempts and sending payment reminders to customers when a payment gets rejected. With Cleeng you can configure payment retries at intervals to ensure payment will be recovered and subscription can continue its cycles. Cleeng allows to setup retries and notifications in terms of subscription due to date, they can be set before and after up to what is your retries strategy. Cleeng as default gives you a smart retries setup that can guarantee an efficient recovery process.
- [List webhook subscriptions [Deprecated]](https://developers.cleeng.com/reference/list-webhook-subscriptions.md): This endpoint is used for listing all webhook subscriptions of a publisher.
- [Webhook settings [Deprecated]](https://developers.cleeng.com/reference/webhook-settings.md): To configure webhooks: Make an API call: `PUT https://api.sandbox.cleeng.com/3.1/webhook_subscriptions/{topic}`
Replace `{topic}` with the topic you want to subscribe to (i.e. the event you want to be notified about), e.g. [subscriptionReadyForPaymentAuthorisation](https://developers.cleeng.com/docs/webhook-subscription-topics#subscriptionreadyforpaymentauthorisation). A topic identifies what event has occurred in the Cleeng system.
Provide a list of endpoints to which notifications should be delivered.
No matter what connector you choose, you should apply the [webhook filtering logic](https://developers.cleeng.com/docs/webhooks-filtering) - filtering by `paymentMethodId`. This allows you to differentiate transactions coming from the respective connectors.
**IMPORTANT:** You have to repeat the configuration steps for each required topic.
**WARNING:** Be careful not to override the webhooks you have already subscribed to as the PUT method creates a new resource or replaces a representation of the target resource with the request message payload.
To improve webhook delivery reliability, you can enable retries by adding the `retryPolicy` object to your webhook endpoint configuration. See the details of [configuring the retry policy and ensuring idempotent processing](https://developers.cleeng.com/docs/webhooks-configuration#configure-webhook-retries).
- [Delete customer](https://developers.cleeng.com/reference/delete-customer.md): Use this endpoint to delete customer data (anonymize a <>) in Cleeng. Customer data is anonymized for reporting reasons, and also to comply with privacy legislation (such as GDPR).
The following personal customer data will be anonymized/deleted: email, password, first name, last name, address, company name, phone number, capture custom answers, IP addresses.
You **cannot** remove a customer’s data if the customer has an active entitlement (e.g. active subscription).
**Important: Please note that anonymization is an irreversible process.**
- [List customers](https://developers.cleeng.com/reference/list-customers.md): This endpoint returns customers that match the requirements given in the API request. For example, it allows you to filter customers based on `externalId` or `email`.
**Note:** One of the parameters: either `externalId` or `email` is required.
The recommended limit for checking if a user is registered using an email address is: 1.
- [Register customer](https://developers.cleeng.com/reference/register-customer.md): Use this endpoint to register customers.
- [Request password reset](https://developers.cleeng.com/reference/request-password-reset.md): Use this API to initiate the password reset flow, so that your customer can define a new password. Using this endpoint will trigger an email to the customer. The email contains a link which directs the customer to a password reset page on the web.
- [Update customer](https://developers.cleeng.com/reference/update-customer.md): Use this endpoint to update a customer's data, for example first name, last name.
- [Get entitlements](https://developers.cleeng.com/reference/get-entitlement.md): You can use this endpoint to check entitlements to a specific offer.
If there are two or more subscriptions / passes for the same `offerId` and the same `customerId`, it will return one object with the latest `expiresAt` date.
- [List entitlements](https://developers.cleeng.com/reference/list-entitlements.md): You can use this endpoint to list a customer's entitlements and calculate a subscription's length. You can fetch entitlements for the following types of offer: **subscriptions**, **passes**, and **one-time purchases** (lifetime purchases and time-limited rentals). (For more information on offers, see [What is a Cleeng offer?](https://publisher.support.cleeng.com/hc/en-us/articles/360012552919-What-is-a-Cleeng-offer-)).
If there are two or more subscriptions or passes for the same offer and the same customer, there will be as many entitlements returned as there are subscriptions / passes.
- [Activate an offer](https://developers.cleeng.com/reference/activate-an-offer.md): Use this endpoint to activate an offer.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Activate offer localization](https://developers.cleeng.com/reference/activate-offer-localization.md): Use this endpoint to activate an offer localization.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Create a season group](https://developers.cleeng.com/reference/create-a-season-group.md): Use this endpoint to create a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined.
Creating season groups enables you to manage and organize seasonal subscription offers effectively. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Create a season in a season group](https://developers.cleeng.com/reference/create-a-season-in-a-season-group.md): Use this endpoint to create a season in a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Create an offer](https://developers.cleeng.com/reference/create-an-offer.md): Use this endpoint to create offers. Supported offer types include subscription (including [seasonal subscription](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions)), pass, live event (previously called live pay-per-view), and one-time purchase (previously called TVOD). (For more information on offers, see [What is a Cleeng offer?](https://publisher.support.cleeng.com/hc/en-us/articles/360012552919-What-is-a-Cleeng-offer-)). With this endpoint, you can also create offer localizations - versions of your offer for different countries and currencies.
- [Create offer localization](https://developers.cleeng.com/reference/create-offer-localization.md): Use this endpoint to create a new offer localization (a localized version of the main offer). The request will be rejected if localization already exists (active or inactive).
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Deactivate an offer](https://developers.cleeng.com/reference/deactivate-an-offer.md): Use this endpoint to deactivate an offer.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Deactivate offer localization](https://developers.cleeng.com/reference/deactivate-offer-localization.md): Use this endpoint to deactivate an offer localization.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Delete a season from a season group](https://developers.cleeng.com/reference/delete-a-season-from-a-season-group.md): Use this endpoint to delete a season from a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
**Important: Please note that deletion is an irreversible process.**
- [Delete a season group](https://developers.cleeng.com/reference/delete-a-season-group.md): Use this endpoint to delete a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
**Important: Please note that deletion is an irreversible process.**
- [Get a season group](https://developers.cleeng.com/reference/get-a-season-group.md): Use this endpoint to retrieve a season group by ID.
A season group (called seasonal schedule in the Cleeng dashboard setup) is a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Get an offer](https://developers.cleeng.com/reference/get-an-offer.md): Use this endpoint to get basic offer details.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [List offers](https://developers.cleeng.com/reference/list-offers.md): This endpoint lets you list all your offers that meet the requirements given in the API request. For example, it allows you to filter offers by offer type or offer status.
Additional **response header:** **x-total-count**. It will show the number of offers.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [List season groups](https://developers.cleeng.com/reference/list-season-groups.md): This endpoint lets you list all season groups.
A season group (called seasonal schedule in the Cleeng dashboard setup) is a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Update a season group](https://developers.cleeng.com/reference/update-a-season-group.md): Use this endpoint to update a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Update a season within a season group](https://developers.cleeng.com/reference/update-a-season-within-a-season-group.md): Use this endpoint to update a season in a season group (called seasonal schedule in the Cleeng dashboard setup) - a group of seasons, each with its start and end date defined. (For more information, see [Seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions).)
- [Update an offer](https://developers.cleeng.com/reference/update-an-offer.md): Use this endpoint to update offers. It updates specific fields of an existing offer.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Update offer localization](https://developers.cleeng.com/reference/update-offer-localization.md): Use this endpoint to update offer localizations. It updates specific fields of an existing offer localization.
This endpoint supports [conditional requests](https://developers.cleeng.com/reference/api31#conditional-requests).
- [Create a pass](https://developers.cleeng.com/reference/create-pass.md): Use this endpoint to create externally-managed passes.
The life cycle of externally-managed passes is managed outside of Cleeng so it is up to a publisher to notify Cleeng about pass status changes, e.g. the change of pass expiration date or pass termination if auto-termination is not enabled (if auto-termination is not enabled for the payment method, Cleeng platform will not terminate the pass when expiry date is reached, and the publisher will need to send the termination request to revoke access).
You can create [multiple passes for the same offer and customer](https://developers.cleeng.com/docs/externally-managed-passes#multiple-passes-per-offer) with this endpoint. But the endpoint prevents duplicate passes with the same external ID and source. It only allows new passes if there isn't already an active pass from the same source and with the same external ID.
- [Get a pass](https://developers.cleeng.com/reference/get-pass.md): Use this endpoint to get pass details based on pass ID.
- [Passes](https://developers.cleeng.com/reference/passes.md)
- [List passes](https://developers.cleeng.com/reference/list-passes.md): This endpoint returns passes that match the specified criteria (`transactionId`, `paymentMethodId`, `externalId`, `customerId` or `offerId` and `customerId` together). Please bear in mind that if you don't provide any parameters, an empty list will be returned.
**Note:** Filtering by `customerId` and `offerId` might return multiple active passes instead of one if [multiple passes have been created for the same offer](https://developers.cleeng.com/docs/externally-managed-passes#multiple-passes-per-offer).
- [Terminate a pass](https://developers.cleeng.com/reference/terminate-pass.md): Use this endpoint to terminate a pass using its ID.
- [Transfer a pass](https://developers.cleeng.com/reference/transfer-a-pass.md): Use this endpoint to transfer externally-managed passes between customers.
The life cycle of externally-managed passes is managed outside of Cleeng so it is up to a publisher to notify Cleeng about pass status changes, e.g. the change of pass expiration date.
- [Update a pass](https://developers.cleeng.com/reference/update-pass.md): Use this endpoint to update a pass using ID. Only a single property can be updated during one request.
- [Delete payment details](https://developers.cleeng.com/reference/31-delete-payment-details.md): Use this endpoint to delete a customer’s payment details (e.g. an expired credit card).
Please note that **removing payment details that are attached to subscriptions will prevent those subscriptions from being renewed**. [Update subscription](https://developers.cleeng.com/reference/update-subscription) endpoint can be used to assign other payment details to a subscription for best user experience.
**Important: Deletion is an irreversible process.**
- [Update an order](https://developers.cleeng.com/reference/31-update-an-order.md): To update an order, you use orders resource. Orders expire after 24 hours unless the payment is captured.
- [Create an order](https://developers.cleeng.com/reference/create-an-order.md): To create an order, you use orders resource. Order resources are used to handle customers' payments of previously defined offers. Orders expire after 24 hours unless the payment is captured. Payment method is required in order entity for payment but can be added in update order. > You should add `paymentOperation` and `subscriptionId` parameters for recurring orders.
- [Get an order](https://developers.cleeng.com/reference/get-an-order.md): To get an order, you use publisher token and order id. Orders expire after 24 hours unless the payment is captured.
- [Update a payment](https://developers.cleeng.com/reference/update-a-payment.md): To update a payment, you use payments resource. They are a reference of the actual payment that happens at the payment gateway. Payments handle customers' actual payments of previously defined order.
- [Authorize code](https://developers.cleeng.com/reference/authorize-code.md): Use this endpoint to verify the code and authorize the device in Device Flow Login (PIN Pair) functionality.
- [Check code](https://developers.cleeng.com/reference/check-code.md): Use this endpoint for Device Flow Login (PIN Pair) functionality to check if the generated code has been authorized.
- [Generate code](https://developers.cleeng.com/reference/generate-code.md): Use this endpoint to generate a code for a specific device in Device Flow Login (PIN Pair) functionality.
- [Device Login Flow (PIN Pair) ](https://developers.cleeng.com/reference/device-login-flow.md)
- [Getting Started With Authentication API](https://developers.cleeng.com/reference/getting-started-with-authentication-api.md)
- [Hi5 Chatbot token](https://developers.cleeng.com/reference/hi5-chatbot-token.md): Use this endpoint to exchange Cleeng <> for Hi5 Chatbot token.
- [JSON Web Key Set](https://developers.cleeng.com/reference/json-web-key-set.md): Use this endpoint to validate Cleeng’s JWTs (JSON Web Tokens).
This endpoint does not require authorization.
- [getAccessibleTags](https://developers.cleeng.com/reference/getaccessibletags.md)
- [getAccessStatus](https://developers.cleeng.com/reference/getaccessstatus.md)
- [getAccessStatusForDevice](https://developers.cleeng.com/reference/getaccessstatusfordevice.md)
- [isTrialAllowed](https://developers.cleeng.com/reference/istrialallowed.md)
- [registerSubscription](https://developers.cleeng.com/reference/registersubscription.md)
- [listCustomerSubscriptions](https://developers.cleeng.com/reference/listcustomersubscriptions.md)
- [requestPasswordReset](https://developers.cleeng.com/reference/requestpasswordreset.md)
- [updateCustomerEmail](https://developers.cleeng.com/reference/updatecustomeremail.md)
- [updateCustomerPassword](https://developers.cleeng.com/reference/updatecustomerpassword.md)
- [updateCustomerSubscription](https://developers.cleeng.com/reference/updatecustomersubscription.md)
- [getConsentDefinitions](https://developers.cleeng.com/reference/getconsentdefinitions.md)
- [getViewerConsents](https://developers.cleeng.com/reference/getviewerconsents.md)
- [submitConsent](https://developers.cleeng.com/reference/submitconsent.md)
- [fetchBroadcasterSpecificPersonalDataWithCaptureAnswers](https://developers.cleeng.com/reference/fetchbroadcasterspecificpersonaldatawithcaptureanswers.md)
- [fetchCaptureQuestions](https://developers.cleeng.com/reference/fetchcapturequestions.md)
- [fetchCaptureStatus](https://developers.cleeng.com/reference/fetchcapturestatus.md)
- [updateBroadcasterSpecificPersonalDataWithCaptureAnswers](https://developers.cleeng.com/reference/updatebroadcasterspecificpersonaldatawithcaptureanswers.md)
- [extendTokenExpiration](https://developers.cleeng.com/reference/extendtokenexpiration.md)
- [generateCustomerToken](https://developers.cleeng.com/reference/generatecustomertoken.md)
- [generateCustomerTokenFromExternalId](https://developers.cleeng.com/reference/generatecustomertokenfromexternalid.md)
- [generateMyAccountUrl](https://developers.cleeng.com/reference/generatemyaccounturl.md)
- [getLocaleDataFromIp](https://developers.cleeng.com/reference/getlocaledatafromip.md)
- [Auth0 - Generate token [Early Access]](https://developers.cleeng.com/reference/auth0_generate-token.md): Receives user authentication events from Auth0 post-login/post-registration action. Creates a new customer or updates existing customer data (if changes detected). Generates Cleeng access token (JWT) with configurable expiration.
**Authorization**: Requires Bearer token (JWT). The token value must match the **secret** in publisher configuration.
**IMPORTANT NOTE: This feature is currently in [Early Access](https://publisher.support.cleeng.com/hc/en-us/articles/10037994501532-Early-Access-Features). This means it's ready for real-world use while we gather user feedback to enhance its functionality and address any minor issues.**
- [generateCustomerTokenFromTransactionId](https://developers.cleeng.com/reference/generatecustomertokenfromtransactionid.md)
- [Check Apple SK2 purchase synchronization status](https://developers.cleeng.com/reference/check-apple-sk2-purchase-synchronization-status.md): Use this endpoint to retrieve the status and result of a purchase synchronization or transfer process initiated by the [/purchases](https://developers.cleeng.com/reference/register-apple-sk2-purchase) or [/purchases/transfers](https://developers.cleeng.com/reference/transfer-apple-sk2-purchase) endpoint. This endpoint provides a concise response with the essential status information, including `status`, `accessGranted`, `offerId`, and `result`.
The status field indicates the current stage of the synchronization process:
- `processing`: The synchronization is in progress.
- `retrying:` The synchronization encountered an error and is being retried. This status may appear multiple times.
- `finalized:` The synchronization process has completed.
The `result` field provides more detailed information about the outcome of the synchronization and is only available when `status` is `finalized`. The `accessGranted` field indicates whether the user is entitled to the offer. The `offerId` field provides the ID of the offer. You can see some possible scenarios and the corresponding response fields in the [polling](https://developers.cleeng.com/docs/apple-in-app-purchase-storekit-2#polling) section of the integration tutorial.
Please note that **this endpoint can be authorized with a publisher (X-Publisher-Token) or JWT (Bearer) token**. Depending on how you integrate with Cleeng (directly or through middleware), use either a <> or X-Publisher-Token header authorization.
**Please use JWT (Bearer) token to try out the endpoint in the API console in this documentation**.
- [Check Samsung TV purchase status](https://developers.cleeng.com/reference/check-samsung-tv-purchase-status.md): Use this endpoint to check the status of a Samsung TV in-app purchase.
The status returned in response can have three values:
- `pending` - purchase is still being processed
- `success` - purchase processing has finished with a positive result
- `failure` - purchase processing has finished with a negative result, an error occurred during processing.
Please note that <> (Bearer) token authorization** should be used** for this endpoint.
- [Check Vizio purchase status](https://developers.cleeng.com/reference/check-vizio-purchase-status.md): Use this endpoint to check the status of a Vizio in-app purchase.
The status returned in response can have three values:
- `pending` - purchase is still being processed
- `success` - purchase processing has finished with a positive result
- `failure` - purchase processing has finished with a negative result, an error occurred during processing.
Please note that <> (Bearer) token authorization** should be used** for this endpoint.
- [Getting Started With In-App API [Early Access]](https://developers.cleeng.com/reference/getting-started-with-inapp-api.md)
- [Register Apple SK2 purchase](https://developers.cleeng.com/reference/register-apple-sk2-purchase.md): Use this endpoint to register a purchase made via Apple StoreKit2 to initiate an asynchronous synchronization process. This process involves verifying the purchase with Apple and updating the user's entitlement status in Cleeng's system.
Due to the time required for Apple's verification, this operation is asynchronous. Upon successful registration, the API will return a `202` `Accepted` status with a unique `synchronizationId` in the response body.
The `cleengCustomerId` is used to identify the user in Cleeng's system and associate the purchase with their account.
**Important:** Only one synchronization process can be active for a given `transactionId` at a time. If a new request is made for the same `transactionId` while a previous synchronization is still in progress, a `409` `Conflict` error will be returned.
Please note that **this endpoint can be authorized with a publisher (X-Publisher-Token) or JWT (Bearer) token**. Depending on how you integrate with Cleeng (directly or through middleware), use either a <> or X-Publisher-Token header authorization.
**Please use JWT (Bearer) token to try out the endpoint in the API console in this documentation**.
- [Samsung TV](https://developers.cleeng.com/reference/samsung-tv.md): Use this endpoint to notify Cleeng about Samsung TV in-app payment and to validate the purchase.
Please note that **this endpoint can be authorized with a publisher (X-Publisher-Token) or JWT (Bearer) token **. Depending on how you integrate with Cleeng (directly or through middleware), use either a <> or X-Publisher-Token header authorization.
**Please use JWT (Bearer) token to try out the endpoint in the API console in this documentation**.
- [Transfer Apple SK2 purchase](https://developers.cleeng.com/reference/transfer-apple-sk2-purchase.md): Use this endpoint to transfer an existing **active** purchase from one user to another. This allows re-assigning access to a subscription or in-app purchase.
The transfer process is asynchronous. Upon successful registration, the API will return a `202` `Accepted` status with a unique `synchronizationId` in the response body.
**Note:** Only active purchases can be transferred.
Please note that **this endpoint can be authorized with a publisher (X-Publisher-Token) or JWT (Bearer) token**. Depending on how you integrate with Cleeng (directly or through middleware), use either a <> or X-Publisher-Token header authorization.
**Please use JWT (Bearer) token to try out the endpoint in the API console in this documentation**.
- [Vizio](https://developers.cleeng.com/reference/vizio-purchase-validation.md): Use this endpoint to notify Cleeng about Vizio in-app payment and to validate the purchase.
Please note that **this endpoint can be authorized with a publisher (X-Publisher-Token) or JWT (Bearer) token**. Depending on how you integrate with Cleeng (directly or through middleware), use either a <> or X-Publisher-Token header authorization.
**Please use JWT (Bearer) token to try out the endpoint in the API console in this documentation**.
- [Amazon FireTV](https://developers.cleeng.com/reference/amazonfiretv.md): Use this endpoint to notify Cleeng about the successful Amazon FireTV in-app payment (Initial Purchase) and create a subscription in Cleeng.
The relevant endpoints are:
- Production URL: https://api.cleeng.com/amazon/payment
- Sandbox URL: https://api.sandbox.cleeng.com/amazon/payment
**Note:**
For integrations utilizing <> authorization please use the MediaStore SDK API [Amazon FireTV Payment](ref:amazon-firetv-payment) endpoint.
- [Android](https://developers.cleeng.com/reference/android-1.md): Use this endpoint to notify Cleeng about the successful Android in-app payment (Initial Purchase) and create a subscription in Cleeng.
The relevant endpoints are:
- Production URL: https://api.cleeng.com/android/payment
- Sandbox URL: https://api.sandbox.cleeng.com/android/payment
**Note:**
For integrations utilizing <> authorization please use the MediaStore SDK API [Android Payment](ref:android-payment) endpoint.
- [Apple iOS and tvOS [Deprecated]](https://developers.cleeng.com/reference/ios-and-tvos.md): **This endpoint is deprecated.**
Use this endpoint to notify Cleeng about the successful iOS/tvOS in-app payment (Initial Purchase) and create a subscription in Cleeng.
The relevant endpoints are:
- Production: https://api.cleeng.com/apple/payment
- Sandbox: https://api.sandbox.cleeng.com/apple/payment
**Note:**
For integrations utilizing <> authorization please use the MediaStore SDK API [Apple iOS and tvOS Payment](ref:apple-ios-and-tvos-payment) endpoint.
- [Roku](https://developers.cleeng.com/reference/roku-payment.md): Use this endpoint to notify Cleeng about the successful Roku in-app payment (Initial Purchase) and create a subscription in Cleeng.
The relevant endpoints are:
- Production URL: https://api.cleeng.com/roku/payment
- Sandbox URL: https://api.sandbox.cleeng.com/roku/payment
**Note:**
For integrations utilizing <> authorization please use the MediaStore SDK API [Roku Payment](ref:roku-payment-ms) endpoint.
- [Payment with Adyen](https://developers.cleeng.com/reference/adyen-initial-payment.md): Use `/connectors/adyen/initial-payment` endpoint to perform payment with Adyen (that means payment with card with 3D Secure support, Apple Pay or Google Pay).
- [Android Payment](https://developers.cleeng.com/reference/android-payment.md): Use this endpoint to notify Cleeng about the successful Android in-app payment (Initial Purchase) and create a subscription in Cleeng. **Note:** This endpoint uses <> for [authorization](https://developers.cleeng.com/reference/getting-started#authorization).
- [Apple iOS and tvOS Payment [Deprecated]](https://developers.cleeng.com/reference/apple-ios-and-tvos-payment.md): **This endpoint is deprecated.**
Use this endpoint to notify Cleeng about the successful iOS/tvOS in-app payment (Initial Purchase) and create a subscription in Cleeng. **Note:** This endpoint uses <> for [authorization](https://developers.cleeng.com/reference/getting-started#authorization).
- [Create order](https://developers.cleeng.com/reference/create-order.md): Use `/orders` endpoint to create an order. Orders are used to handle customers' payments of previously defined offers. Orders expire after 24 hours unless the payment is captured. **Payment method is required in order entity for payment but can be added in `update order` and fetch in `/payment-methods`.** **AUTHORIZATION** [Authorization](https://developers.cleeng.com/reference/getting-started#authorization) with <> is required.
- [Fetch offer details](https://developers.cleeng.com/reference/fetch-offer-details.md): Use `/offers/:offerId` endpoint to get basic offer details.
This endpoint returns details of offer localizations matching a particular country or location. The country or location is determined based on the customer IP address.
You can query using the offer short ID - without a country suffix (e.g. S123123123) to dynamically retrieve details of the offer localization matching the current country of the user. You can query using the offer long ID - with country suffix e.g. (S123123123_US) to retrieve details of the offer localization for a particular country.
If you want to fetch offer details for a specific customer use [this endpoint](https://developers.cleeng.com/reference#fetch-offer-details-for-specific-customer).
**Note:**
Please note that this endpoint **will not return taxes for the USA and Canada**. Taxes will only be shown during the checkout process (they are returned in the order method: [Create order](https://developers.cleeng.com/reference/create-order) or [Get an order](https://developers.cleeng.com/reference/msd-get-order)).
- [Fetch offers](https://developers.cleeng.com/reference/fetch-offers.md): This endpoint lets you list all your offers that meet the requirements given in the API request. For example, it allows you to filter offers by offer type or offer status. Additional **response header:** **x-total-count**. It will show the number of offers.
- [Finalize payment with Adyen](https://developers.cleeng.com/reference/finalize-initial-payment.md): Use `/connectors/adyen/initial-payment/finalize` to finalize payments that require additional action from customers. If initial payment returns `action` object, call this endpoint to finalize payment. It is used for 3D Secure.
- [Get a gift](https://developers.cleeng.com/reference/get-a-gift.md): This endpoint retrieves details of a given gift that was previously purchased.
- [Get Adyen payment methods](https://developers.cleeng.com/reference/get-adyen-payment-methods.md): Use `/connectors/adyen/payment-methods` endpoint to query payment methods for payment with Adyen. This is required to render a front-end Drop-in component using [Adyen advanced flow](https://docs.adyen.com/online-payments/build-your-integration/advanced-flow/?platform=Web&integration=Drop-in&version=6.0.3).
- [Get entitlements](https://developers.cleeng.com/reference/get-entitlements.md): This API allows you to check entitlements (access rights) of a customer to a given offer. Access is granted based on a purchased offer or tags (that are checked in the backend). Here you can check the [benefits of tagging offers](https://publisher.support.cleeng.com/hc/en-us/articles/226253648-Using-Tags-to-Build-Unique-Offers#benefits-of-using-tags).
If there are two or more subscriptions / passes for the same `offerId` for the same customer, it will return one object with the latest `expiresAt` date.
- [List campaigns](https://developers.cleeng.com/reference/msd-list-campaigns.md): This endpoint lets you list all your campaign details based on a coupon code. [Authorization](https://developers.cleeng.com/reference/getting-started#authorization) with <> is required.
- [Payment with PayPal Express Checkout](https://developers.cleeng.com/reference/payment-with-paypal-connector-v1.md): Use `/connectors/paypal/v1/tokens` endpoint to perform payment with Paypal Express Checkout. Payment is executed on PayPal site and after success / error / cancel customer is redirected to predefined routes.
- [Purchase without payment details](https://developers.cleeng.com/reference/payment-without-payment-details.md): Use `/payments` endpoint to perform purchase without payment details.
Use in cases:
- customer applied 100% coupon code and the publisher doesn't expect the payment details (option to set during coupon creation) - for this purchase flow, please use a payment method with a name “Manual” that has “Coupon” as payment gateway.
- offer is free and the publisher wants to give access to offer - for this purchase flow, please use a payment method with a name “Manual” that has “Free-offer” as payment gateway.
**Important Note**
It is crucial that an appropriate **payment method** is used during **order** creation (“Manual” with “Coupon” or “Free-offer” as payment gateway). While it’s possible to use any payment gateway in this checkout flow, we strongly recommend utilizing the above for reporting clarity.
- [Redeem a gift](https://developers.cleeng.com/reference/redeem-a-gift.md): Use this endpoint to redeem a gift. A gift can be redeemed after a successful verification with [Verify a gift](https://developers.cleeng.com/reference/verify-a-gift) (GET /gifts/verification/{code}) endpoint.
- [Roku Payment](https://developers.cleeng.com/reference/roku-payment-ms.md): Use this endpoint to notify Cleeng about the successful Roku in-app payment (Initial Purchase) and create a subscription in Cleeng. **Note:** This endpoint uses <> for [authorization](https://developers.cleeng.com/reference/getting-started#authorization).
- [Update a gift](https://developers.cleeng.com/reference/update-a-gift.md): This endpoint gives possibility to update delivery details of a given gift that was previously purchased.
- [[V2] Fetch offer details](https://developers.cleeng.com/reference/v2-fetch-offer-details.md): Use `v2/offers/{offerId}` endpoint to get basic offer details. This endpoint returns also price rules for [seasonal subscriptions](https://publisher.support.cleeng.com/hc/en-us/articles/9565373130268-Seasonal-Subscriptions) (special price rules for initial purchase of a seasonal subscription that define promotional prices that a publisher wants to offer in certain periods (e.g. before the season begins or once the season is halfway through)).
- [Verify a gift](https://developers.cleeng.com/reference/verify-a-gift.md): Use this endpoint to verify whether a gift code provided by the user is valid. The gift code has to be verified before a gift is redeemed.
- [Fetch publisher consents](https://developers.cleeng.com/reference/fetch-publisher-consents.md): Use /publishers/:publisherId/consents to fetch publisher's consents. It returns the actual consensts version, label. Consents should be shown on the registration page to enable accept/decline it by customer. Customers shouldn't be redirected to the offer page if the required terms are not accepted.
- [Login](https://developers.cleeng.com/reference/login.md): Use `/auths` endpoint to log in the user. Customer authorization is based on <>, which contains `customerId`, `publisherId` and `expiration date`. There are two ways of login, by `offerId` (if a customer has already chosen an offer) or by `publisherId` (in case a customer will choose an offer after authorization).
- [Refresh token](https://developers.cleeng.com/reference/refresh-token.md): This endpoint can be used to grant a new JWT in order to extend user session. Refresh token passed in request body will be invalidated. A new JWT and a new refresh token will be returned in response. JWT is valid for 15 minutes and a refresh token is valid for 100 days.
- [Register](https://developers.cleeng.com/reference/register.md): Use `/customers` endpoint to register user. After registration customer is related with your account and you will see him in Cleeng Dashboard > Customer Accounts. Customers are recognized in Cleeng by `customerId`, which is encoded in <>.
> 🚧 Important > > It is recommended that customerIP is passed as it is required for correct price calculation because tax rate depends on the country. If customerIP is NOT given, the price will be calculated for request source IP address. > > Please note that when using Cleeng Merchant, customerIP should be available for the purpose of proper tax calculation in the US and Canada. It is recommended that customerIP is passed in the register, [login](https://developers.cleeng.com/reference/login) and [create order](https://developers.cleeng.com/reference/create-order) methods.
- [Update customer's consents](https://developers.cleeng.com/reference/update-customers-consents.md): Use `/customers/:customerId/consents` to set or update customer's consents.
This endpoint should be used just after registration (for checkout) or to enable consents management (myAccount).
There are two types of consents: required terms and conditions (Cleeng terms and your terms), and not required marketing consents (if enabled you).
- [Update password](https://developers.cleeng.com/reference/update-password.md): Use /customers/passwords endpoint to save a new customer password, in case you defined a custom reset password page.
- [SSO Login](https://developers.cleeng.com/reference/sso-login.md): **Important: This is an exception because, unlike other MediaStore SDK endpoints, this one requires `publisherToken` for authorization.** Use this endpoint to generate a customer <> for a customer who has been authenticated with a third-party Single Sign-on (SSO) provider without passing the credentials. This will enable the customer to use other MediaStore SDK features (e.g. Checkout or My Account) without the need to log in. The authentication takes place in the background. You can use this endpoint by itself for new customers. For existing customer accounts that you already have with a third-party identity provider, please remember to first set up corresponding customer accounts in Cleeng. You can create them via API or by migrating them. Calling this endpoint updates the customer’s `lastLoginDate` that you can check with the [Fetch customer's data](ref:fetch-customers-data) endpoint. If a customer IP address is also passed, `lastUserIP` field will be updated with this value.
- [Add Adyen payment details](https://developers.cleeng.com/reference/adyen-add-payment-details.md): Use this method to add Adyen payment details (for example a card with 3D Secure support, Apple Pay or Google Pay), so that new payment details can be used for recurring payments. Example use case: a customer updates a card or wants to switch payment method to a card. Adding payment details may not be finished after calling this endpoint. If payment details were successfully added to Cleeng, you will receive the `paymentDetails` object. If there is an additional action needed, you will receive an `action` object.
- [Apply coupon](https://developers.cleeng.com/reference/apply-coupon.md): Use this endpoint to apply coupon on existing subscription. The coupon previously has to be configured in **Cleeng Dashboard -> Offers & Coupons -> Coupon Management**.
- [Delete payment details](https://developers.cleeng.com/reference/delete-payment-details.md): Use this method to delete payment details.
**Note:** Removing payment details that are attached to subscriptions will prevent those subscriptions from being renewed if a customer doesn't add new payment details.
- [Fetch available switches](https://developers.cleeng.com/reference/fetch-available-switches.md): This endpoint returns all available offers to which a customer can switch from the current subscription in `available` array. Offers to which customer can't switch are returned in `unavailable` array with the reason why the switch is not possible.
- [Fetch customer's consents](https://developers.cleeng.com/reference/fetch-customers-consents.md): Use `/customers/:customerId/consents` to fetch customer's consents. Display fetched consents to enable consents management. This endpoint shows actual status of customer's consents. It returns useful information like: status (accepted/declined), is it required, is it the actual version of consents, the label for it.
- [Fetch customer's data](https://developers.cleeng.com/reference/fetch-customers-data.md): Use `/customers/:customerId` endpoint to fetch customer's data.
- [Fetch customer's passes](https://developers.cleeng.com/reference/fetch-customers-passes.md): This endpoint returns passes for the provided customer. This endpoint lists only active passes (`status` = `active`).
**NOTE:** This API requires <> to run. It should be put in the request header. See more in [Authorization](https://developers.cleeng.com/reference/getting-started#authorization).
- [Fetch customer's payment details](https://developers.cleeng.com/reference/fetch-customers-payment-details.md): Use `customers/:customerId/payment_details` endpoint to fetch a customer payment details. Payment details hold selected information (e.g. card expiration date) of the complete set of payment details or tokens to reference this data.
- [Fetch customer's subscriptions](https://developers.cleeng.com/reference/fetch-customers-subscriptions.md): Use `/customers/:customerId/subscriptions` endpoint to fetch customer's subscriptions. This endpoint lists all active and stopped subscriptions, but it doesn't return expired ones. You can find details about customer subscriptions here, like status, expiration date, price, payment method, or period. >**NOTE:** This API requires <> to run. It should be put in the request header. See more in [Authorization](https://developers.cleeng.com/reference/getting-started#authorization).
- [Finalize add Adyen payment details](https://developers.cleeng.com/reference/finalize-add-adyen-payment-details.md): Use `/connectors/adyen/payment-details/finalize` to finalize payments that require additional action from customers. It is used in 3D Secure.
- [Pause subscription](https://developers.cleeng.com/reference/ms-pause-subscription.md): Use this endpoint to pause a subscription. You can only pause active and canceled subscriptions (you cannot pause in-trial or terminated subscriptions).
Transition from active state to pause is tied to subscription anniversary date (the pause will start with a new billing cycle).
- [Resume subscription ](https://developers.cleeng.com/reference/ms-resume-subscription.md): Use this endpoint to resume a subscription from a scheduled pause or to immediately resume from the pause that is ongoing. With immediate resume from the pause which is in progress, a payment attempt is made and the customer is charged.
- [Update customer's data](https://developers.cleeng.com/reference/update-customers-data.md): Use `/customers/:customerId` endpoint to update customer's data like firstName, lastName or email.
- [getOfferDetails](https://developers.cleeng.com/reference/getofferdetails.md)
- [API Caching](https://developers.cleeng.com/reference/api-caching.md)
- [API Reference Overview](https://developers.cleeng.com/reference/apireference-overview.md)
- [Best Practices](https://developers.cleeng.com/reference/best-practices.md)
- [How to Understand and Resolve Common API Errors (401, 429)](https://developers.cleeng.com/reference/how-to-understand-and-resolve-common-api-errors-401-429.md)
- [deletePaymentDetails](https://developers.cleeng.com/reference/deletepaymentdetails.md)
- [List available event types](https://developers.cleeng.com/reference/list-available-event-types.md): Returns all available event types grouped by domain.
- [List endpoints subscribed to an event type](https://developers.cleeng.com/reference/list-endpoints-subscribed-to-an-event-type.md): Returns all endpoints for the authenticated publisher that subscribe to a specific event type.
- [Getting Started with Webhooks API](https://developers.cleeng.com/reference/getting-started-with-webhooks-api.md)
- [Create a webhook endpoint](https://developers.cleeng.com/reference/create-a-webhook-endpoint.md): Creates a new webhook endpoint with auto-generated signing secret. **Note:** The signing secret is returned only in this response - store it securely.
- [Delete a webhook endpoint](https://developers.cleeng.com/reference/delete-a-webhook-endpoint.md): Deletes an endpoint and all its event subscriptions atomically.
- [Get a webhook endpoint](https://developers.cleeng.com/reference/get-a-webhook-endpoint.md): Returns a single endpoint by ID. The signing secret is not included.
- [List webhook endpoints](https://developers.cleeng.com/reference/list-webhook-endpoints.md): Returns all endpoints for the authenticated publisher with cursor-based pagination.
- [Rotate endpoint signing secret](https://developers.cleeng.com/reference/rotate-endpoint-signing-secret.md): Generates a new signing secret for the endpoint. The old secret is immediately invalidated. The new secret is returned only in this response - store it securely.
- [Update a webhook endpoint ](https://developers.cleeng.com/reference/update-a-webhook-endpoint.md): Partially updates an endpoint. Only provided fields are changed; omitted fields remain unchanged. Immutable fields (`id`, `signing`, `createdAt`) cannot be updated.
## Changelog
- [Release Notes](https://developers.cleeng.com/changelog/release-notes.md)
- [Added - 08/12/2022](https://developers.cleeng.com/changelog/added-08122022.md)
- [Improved - 24/11/2022](https://developers.cleeng.com/changelog/improved-24112022.md)
- [Improved - 20/10/2022](https://developers.cleeng.com/changelog/improved-06102022.md)
- [Improved - 08/09/2022](https://developers.cleeng.com/changelog/improved-08092022.md)