POST /api/v2/web-api/paywall/

Get paywall

Receives the paywall from the provided placement.

Request body

storestringrequired

Store where the product was bought. Possible values: app_store, play_store, stripe, or the Store ID of your custom store.

localestring

An identifier of a paywall locale. This parameter is expected to be a language code composed of one or more subtags separated by the "-" character. The first subtag is for the language, the second one is for the region.

placement_idstringrequired

The identifier of the Placement. This is the value you specified when creating a placement in your Adapty Dashboard.

customer_user_idstring

Either customer_user_id or profile_id is required. User ID you use in your app to identify the user if you do. For example, it can be your user UUID, email, or any other ID.

profile_idstring

Either customer_user_id or profile_id is required. An identifier of a user in Adapty.

Responses

The successful response will contain the Paywall object.

Schema
placement_idstringrequired

The ID of the Placement where this paywall is shown. This value is set when creating a placement in your Adapty Dashboard.

variation_idstringrequired

The variation ID used to track purchases linked to this specific paywall

paywall_idstringrequired

The unique identifier of the paywall

ab_test_namestring

The name of the parent A/B test

paywall_namestringrequired

The name of the paywall, as defined in your Adapty Dashboard

productsarray of objectrequired

Array of Product objects containing product information for the paywall

titlestring

Product name from the Products section in the Adapty Dashboard

is_consumablebooleanrequired

Indicates whether the product is consumable

adapty_product_idstring

Internal product ID as used in Adapty

vendor_product_idstringrequired

The product ID in app stores

introductory_offer_eligibilityboolean

Specifies if the user is eligible for an iOS introductory offer

promotional_offer_eligibilityboolean

Specifies if the user is eligible for a promotional offer

base_plan_idstring

Base plan ID for Google Play or price ID for Stripe. See Base plan ID for Google Play or price ID for Stripe.

offerallOf

An Offer object as a JSON

categorystring

The category of the applied offer

One of: "introductory", "promotional", "offer_code", "win_back"

typestring

The type of active offer. If this isn't null, it means the offer was applied in the current subscription period.

One of: "free_trial", "pay_as_you_go", "pay_up_front", "unknown"

idstring

The ID of the applied offer

remote_configobject

A RemoteConfig object containing the full remote config of the paywall

langstringrequired

Locale code for the paywall localization. It uses language and region subtags separated by a hyphen (-). Examples: en for English, pt-br for Brazilian Portuguese.

datastringrequired

Serialized JSON string representing the remote config of your paywall. You can find it in the Remote Config tab of a specific paywall in the Adapty Dashboard.

Example
{
  "placement_id": "onboarding",
  "variation_id": "d76feea0-c0cf-4942-bef5-84ed701fc6db",
  "paywall_id": "9a93fe6f-9162-4dc0-b4b7-73079ed95c34",
  "ab_test_name": "1 week + 1 month | apple picture",
  "paywall_name": "1 week + 1 month | apple picture",
  "products": [
    {
      "title": "1 week",
      "is_consumable": false,
      "adapty_product_id": "1c3e03e1-9c43-4f94-aeb5-c7ae2f73d0c2",
      "vendor_product_id": "1_week_apple",
      "introductory_offer_eligibility": true,
      "promotional_offer_eligibility": true,
      "base_plan_id": null,
      "offer": null
    },
    {
      "title": "1 month",
      "is_consumable": false,
      "adapty_product_id": "f4088450-45a8-4737-8db0-367e642d7dcb",
      "vendor_product_id": "1_month_apple",
      "introductory_offer_eligibility": true,
      "promotional_offer_eligibility": true,
      "base_plan_id": null,
      "offer": null
    }
  ],
  "remote_config": {
    "lang": "en",
    "data": "{\"default_product_number\":1,\"features\":[\"#fresh\",\"#green\",\"#healthy1\"],\"soft_paywall\":false,\"image_url\":\"https://adapty.io/apple.png\"}"
  }
}

Bad Request

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Unauthorized

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger

Not Found

Schema
errorsarray of object
sourcestring
errorsarray of string
error_codestring
status_codeinteger