Paywall Data Objects

A description of Paywall data objects and how you can use them.

Apple

The NamiPaywall object is used in the SDK to represent a single paywall created in the Control Center.

The object contains the following data elements that are all set in the Control Center.

  • marketing_content - A dictionary that contains strings title and body.
  • name - The name of the paywall as defined in the Control Center.
  • products - an array containing metadata from Nami about the in-app purchase products associated with this paywall. This holds only the un-loaded product ID's. To get fully usable product objects you need to get their associated NamiMetaProduct object.
  • purchase_terms - string of the purchase terms to display on your paywall.
  • tos_link - URL string to your app's Terms of Service.
  • privacy_policy - URL string to your app's Privacy Policy.

Additional elements are present in this object that are used internally by the Nami SDK, which you may ignore.

An example of a dictionary passed in by Nami is:

{
  "id": 172,
  "name": "MyAppPaywall",
  "products": [{
    "id": 19,
    "created_date": "2019-07-03T16:11:15.804962Z",
    "updated_date": "2019-07-03T16:11:20.374824Z",
    "uuid": "07ac7c41-465f-42c5-8cda-4b3d2e2d07d9",
    "active": true,
    "name": "Test Product Yearly",
    "product_id": "test_product_yearly_subscription",
    "auto_created": false,
    "app": "2dc699a5-43c6-4e3a-9166-957e1640741b",
    "paywalls": [172, 33]
  }, {
    "id": 18,
    "created_date": "2019-07-03T16:10:57.329991Z",
    "updated_date": "2019-07-03T16:11:19.418586Z",
    "uuid": "629cb171-c8bb-4997-acb0-b5eee2221896",
    "active": true,
    "name": "Test Product Bi-Yearly",
    "product_id": "test_product_sixmonth_subscription",
    "auto_created": false,
    "app": "2dc699a5-43c6-4e3a-9166-957e1640741b",
    "paywalls": [172, 33]
  }, {
    "id": 17,
    "created_date": "2019-07-03T16:09:23.469150Z",
    "updated_date": "2019-07-03T16:09:28.143406Z",
    "uuid": "a07efaef-b44a-4040-8578-05f8dcbcc7c2",
    "active": true,
    "name": "Test Product Monthly",
    "product_id": "test_product_monthly_subscription",
    "auto_created": false,
    "app": "2dc699a5-43c6-4e3a-9166-957e1640741b",
    "paywalls": [172, 33]
  }],
  "formatted_skus": [{
    "id": "2dc699a5-43c6-4e3a-9166-957e1640741b",
    "featured": false
   }, {
     "id": "629cb171-c8bb-4997-acb0-b5eee2221896",
     "featured": false
   }, {
     "id": "a07efaef-b44a-4040-8578-05f8dcbcc7c2",
     "featured": false
   }],
  "background_image_url_phone": null,
  "background_image_url_tablet": null,
  "background_thumb_url": null,
  "marketing_content": {
    "body": "Paywall Body",
    "title": "Paywall Title"
  },
  "configuration_progress": "Fully Configured",
  "is_live": true,
  "created_date": "2020-01-13T16:53:48.290271Z",
  "updated_date": "2020-01-13T16:59:37.999336Z",
  "uuid": "04d329a8-985a-4104-a5dd-f0193eb15ea2",
  "cta_type": "paywall_creator",
  "user_initiated": false,
  "nami_initiated": false,
  "first_launch": false,
  "existing_paywall_thumb_url": null,
  "purchase_terms": null,
  "tos_link": "http://www.apple.com",
  "privacy_policy": "http://www.apple.com",
  "sign_in_control": false,
  "restore_control": true,
  "allow_closing": true,
  "developer_paywall_id": "MyAppPaywall",
  "app": "2dc699a5-43c6-4e3a-9166-957e1640741b",
  "use_bottom_overlay": true,
  "paywall_style": {
    "body_font_size": 18,
    "body_text_color": "#ffffff",
    "title_font_size": 50,
    "background_color": "#ffffff",
    "sku_button_color": "#3d0b00",
    "terms_link_color": "#ffffff",
    "title_text_color": "#00b7ef",
    "body_shadow_color": "#0068bf",
    "body_shadow_radius": 0,
    "title_shadow_color": "#000000",
    "title_shadow_radius": 0,
    "bottom_overlay_color": "#00b7ef",
    "sku_button_text_color": "#ffffff",
    "close_button_font_size": 16,
    "close_button_text_color": "#00b7ef",
    "signin_button_font_size": 18,
    "purchase_terms_font_size": 12,
    "restore_button_font_size": 14,
    "signin_button_text_color": "#3d0b00",
    "close_button_shadow_color": "#3d0b00",
    "purchase_terms_text_color": "#3d0b00",
    "restore_button_text_color": "#3d0b00",
    "close_button_shadow_radius": 1,
    "featured_skus_button_color": "#ff6801",
    "signin_button_shadow_color": "#000000",
    "purchase_terms_shadow_color": "#000000",
    "restore_button_shadow_color": "#000000",
    "signin_button_shadow_radius": 0,
    "bottom_overlay_corner_radius": 8,
    "purchase_terms_shadow_radius": 0,
    "restore_button_shadow_radius": 0,
    "featured_skus_button_text_color": "#ffffff"
  }
}