Skip to content

Get paywall


Target audience: Developers

Release version: T.B.A

Get Paywall


This endpoint returns an active paywall for the given title. If an account id is supplied we will based on given information, configuration and user history calculate a tailored offer to the user.


Environment URI


Feature needs to be enabled by Adeprimo. Please contact support to enable.

Identity Scope
No /external/paywall/r


Name Required Type Description
title_code Yes String Title code a title.
Size range: 1..15 Allowed values: "/^[a-zA-Z-_0-9]+$/"
account_id Optional String The id of the account to evaluate an offer for.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"
account_origin Optional String The origin of the account. E.g. the newspaper title.
Size range: ..1024
merchant_reference Optional String The merchant reference for the order
traffic_source Optional String The source of the purchase. E.g. facebook, web. Traffic sources need to be setup in PAP
return_url Optional String When a user has purchased a subscription this link will be used to take the user back to the website, for example to the article the user wants to read. Is displayed on the purchase confirmation page.
back_url Optional String Can be used as an alternative link back to the website from the boutiques, not to be mistaken for the returnUrl.
utm Optional Object GA Support. Supply this if your paywall offer is of type sales link.
Required String GA Support variable
Optional String GA Support variable
Optional String GA Support variable
Optional String GA Support variable
Optional String GA Support variable
engage_tracking Optional Object Engage tracking. Supply this if you intend to use the pw markup and built in engage tracking.
Optional String If the paywall is initiated from an article add the articleId to this parameter.
Optional Array Sections e.g. ["sec 1", "sec 2"]
Optional Array Categories e.g. ["cat 1", "cat 2"]

Curl Example

curl --request POST \
  --url \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token-with-identity>' \
  --header 'content-type: application/json' \
  --data '{
              "title_code": "ADE",
              "account_id": "63cfafea09c04c30c9e17c21",
              "account_origin": "ADE",
              "merchant_reference": "MERCHANT-1",
              "traffic_source": "facebook",
              "return_url": "",
              "back_url": "",              
              "utm": {
                "source": "google",
                "medium": "cpc",
                "campaign": "spring_sale",
                "content": ""              
              "engage_tracking": {
                "article_id": "123",
                "sections": ["sec1", "sec2"],
                "categories": ["cat1", "cat2"]


HTTP 200
  "item": {
    "title": "TITLE_CODE",
    "offer": "campaign_code",
    "variables": {
      "[INTRO_TITLE]": "intro_title",
      "[MAIN_TITLE]": "main_title",
      "[LAST_TITLE]": "last_title",
      "[PURCHASE_BUTTON_TEXT]": "purchase_button_text",
      "[OFFER_INCLUDES_TITLE]": "offer_includes_title",
      "[OFFER_INCLUDES]": [
        "Access to the Adeprimo rag all day and every day!",
        "Non-stop fun time, all the time"
      "[SALES_PITCH]": "sales_pitch",
      "[TITLE_NAME]": "TITLE",
      "[PRICE]": "210",
      "[DISCOUNT_PRICE]": null,
      "[DISCOUNT_PERCENTAGE]": null,
      "[CURRENCY]": "kr"
    "markup": "<div class=\"paywall__wrapper\">\n    <div class=\"paywall__inner-container\">\n        <div class=\"paywall__header-container\">\n            <h6>intro_title</h6>\n            <h1>main_title</h1>\n            <h2>last_title</h2>\n        </div>\n\n        <div class=\"paywall__price-container\">\n            <div class=\"paywall__price-container-left\">\n                <h6>TITLE - <br/>sales_pitch</h6>\n            </div>\n\n            <div class=\"paywall__price-container-right\">\n                <h2>210 kr</h2>\n                <small><span class=\"paywall__price-container-percentage\"></span> <s></s></small>\n            </div>\n        </div>\n        <div class=\"paywall__price-container-clear\"></div>\n\n        <a href=\"\">\n            <button type=\"button\">purchase_button_text</button>\n        </a>\n\n        <div class=\"paywall__offers-container\">\n            <div id=\"paywall__toggle-offers-btn\">\n                <p><i id=\"paywall__toggle-offers-icon\" class=\"gg-chevron-down-o\"></i> &nbsp; offer_includes_title</p>\n            </div>\n\n            <div id=\"paywall__toggle-offers-section\">\n                <ul><li>Access to the Adeprimo rag all day and every day!</li><li>Non-stop fun time, all the time</li></ul>\n            </div>\n        </div>\n    </div>\n</div>\n\n<script type=\"text/payway-paywall-js\">\n    function slideUp(el) {\n = \"all 300ms ease-in-out\";\n = \"0px\";\n\n        let arrow = el.parentElement.querySelector(\"#paywall__toggle-offers-icon\");\n        arrow.classList.add(\"gg-chevron-down-o\");\n        arrow.classList.remove(\"gg-chevron-up-o\");\n    }\n\n    function slideDown(el) {\n = \"all 300ms ease-in-out\";\n = \"100px\";\n\n        let arrow = el.parentElement.querySelector(\"#paywall__toggle-offers-icon\");\n        arrow.classList.remove(\"gg-chevron-down-o\");\n        arrow.classList.add(\"gg-chevron-up-o\");\n    }\n\n    let toggleOffersBtn = document.getElementById(\"paywall__toggle-offers-btn\");\n    toggleOffersBtn.addEventListener(\"click\", function () {\n        let toggleOffersSection = document.getElementById(\"paywall__toggle-offers-section\");\n        if ( === \"0px\" || === \"\") {\n            slideDown(toggleOffersSection);\n        } else {\n            slideUp(toggleOffersSection);\n        }\n    });\n</script>"


This API uses the common error conventions of the Payway API

See common error responses