POST
/
v1
/
paywall
Authorization
Body
curl --request POST \
  --url https://client.corrily.com/v1/paywall \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '{
  "user_id": "<string>",
  "country": "<string>",
  "paywall_id": "<string>"
}'
{
  "success": true,
  "pricing_page": {
    "id": 123,
    "is_default": true,
    "buttons_caption": "<string>",
    "buttons_color": "<string>",
    "background_color": "<string>",
    "collapse_features": true,
    "show_product_description": true,
    "header": "<string>",
    "description": "<string>",
    "show_header": true,
    "show_annual_discount_percentage": true,
    "show_feature_comparison_table": true,
    "feature_comparison_table_text": "<string>",
    "features_badges": {}
  },
  "products": [
    {
      "id": 123,
      "api_id": "<string>",
      "name": "<string>",
      "interval": {},
      "interval_count": 123,
      "cents": true,
      "recurrent_horizon": "<string>",
      "group": 123,
      "price": "<string>",
      "price_usd": "<string>",
      "trial": {},
      "product_metadata": {},
      "features": [],
      "overrides": {}
    }
  ]
}

Body Params

user_id
string

Optional. If you know user’s id, you can pass it to stick the response to that user.

country
string

A two-letter (Alpha-2) ISO 3166 country code. Example: US

paywall_id
string

Optional. If you want to apply a specific paywall, you can pass it’s id.

Usage

Paywall API is used by Corrily SDK libraries (e.g. @corrily/react-sdk) to fetch Paywall data. This data is enough to render the complete Paywalls on customer’s website or mobile app. Response includes Paywall design configuration, set of Products to display, and price & currency for each Product. The response depends on the user context (country, audience, characteristics) along with currently running experiments.

  • design configuration - contains texts, colorus & layout config for visual customization
  • products - set of products to show on Paywall. It comes from a Package, directly liked to a Paywall, or from a Packaging Segmentation config.
  • prices - the same data, as the /v1/prices API endpoint response. Similarly to /v1/prices logic, once User see a Paywall, he’ll be permanently sticked to the same design, set of plans and prices unless the "override": true parameter will be sent in the API request.

Response

success
boolean

Whether or not the request completed successfully.

pricing_page
object
products
object[]