Managing Entitlements with Custom Fields

Custom fields in MonetizeNow provide a flexible way to store additional, specific data about your products and offerings. This data can be incredibly useful for managing entitlements, allowing you to define and retrieve specific permissions or features associated with a customer's subscription.


What are Custom Fields?

Custom fields are user-defined attributes that you can add to various entities within MonetizeNow, such as products, offerings, and subscriptions. They extend the standard data model, enabling you to capture information unique to your business logic. For entitlement management, custom fields on products or offerings are particularly powerful.

For more detailed information on custom fields, please refer to the official MonetizeNow documentation


Using Custom Fields for Entitlements

A common and effective way to manage entitlements is by using custom fields as true/false flags. For example, you might have a product that includes certain features, and you want to explicitly define which features are part of a customer's entitlement.

Consider a product "Premium Software Suite." You might add custom fields to this product like:

  • includes_advanced_reporting: true or false
  • includes_priority_support: true or false
  • includes_team_collaboration: true or false

When a customer subscribes to this "Premium Software Suite," your application can then query these custom fields to determine what features they are entitled to.


Retrieving Custom Fields via HTTP Request

To manage entitlements effectively, your application will need to retrieve these custom field values. You can do this by making an HTTP GET request to the relevant product or offering endpoint in the MonetizeNow API.

Here's an example of how you might retrieve the details of a specific product, including its custom fields:

GET https://api.monetizeplatform.com/api/products/{product_id}
Accept: application/json
x-api-key: YOUR_API_KEY

For detailed API documentation on retrieving a product by ID, visit: Get Product by ID

Or for an offering:

GET https://api.monetizeplatform.com/api/offerings/{offering_id}
Accept: application/json
x-api-key: YOUR_API_KEY

For detailed API documentation on retrieving an offering by ID, visit: Get Offering by ID.

The response from these endpoints will include a customFields object (or similar structure, depending on the exact API version) containing the key-value pairs you've defined.

Example API Response Snippet:

{
  "createdBy": "usr_X0XZ05bvkrB1RpLS",
  "createDate": "2025-07-18T22:21:55.135Z",
  "lastModifiedBy": "usr_X0XZ05bvkrB1RpLS",
  "modifyDate": "2025-07-18T22:21:55.135Z",
  "id": "prod_nStU73ZJahgBSxnh",
  "customId": "c993f52b-0bbd-454b-9849-fd6c1991efb6",
  "financeId": "GL-123",
  "name": "Premium",
  "description": "Monthly Premium",
  "status": "ACTIVE",
  "productType": "ADVANCE",
  "usageTypes": [
    {
      "createdBy": "usr_X0XZ05bvkrB1RpLS",
      "createDate": "2025-07-18T22:21:55.135Z",
      "lastModifiedBy": "usr_X0XZ05bvkrB1RpLS",
      "modifyDate": "2025-07-18T22:21:55.135Z",
      "id": "string",
      "name": "string",
      "pluralName": "string",
      "description": "string",
      "unitName": "string",
      "decimalPlaces": 2,
      "status": "ACTIVE"
    }
  ],
  "oneTimePrepaidCreditConfig": {
    "type": "string"
  },
  "sku": "UGG-BB-PUR-06",
  "recognitionMethod": "IMMEDIATE",
  "locked": true,
  "customFields": {
    "includes_advanced_reporting": true
  },
  "taxItemCode": "B13E4D91-B3C9-4847-BB9E-58B925ECF033",
  "taxExempt": false
}

Your application can then parse this customFields object to determine the customer's entitlements. For instance, if includes_advanced_reporting is true, your application would enable that feature for the user.


Implementation Steps

Define Custom Fields: In your MonetizeNow account, navigate to the product or offering you wish to manage entitlements for and add the necessary custom fields (e.g., includes_feature_X as a boolean).

Populate Values: Set the true or false values for these custom fields based on the features included in each product or offering.

Integrate with Your Application:

When a user logs in or a subscription is activated, make an API call to the product or offering endpoint associated with their subscription.

Parse the customFields data from the API response.

Use these values to dynamically enable or disable features within your application.

By leveraging custom fields, you gain a powerful and flexible mechanism to manage and deliver entitlements directly from your MonetizeNow configuration, keeping your billing and feature access synchronized.