Paywalls

Create, list, and retrieve remote paywalls, and browse templates.

A paywall is a remotely configured screen that presents products to a user. Because paywalls are fetched at runtime, you can change pricing, copy, and layout over the air without shipping an app update. Paywalls are built from templates and reference products from your catalog.

The paywall object#

idstring

Unique identifier, prefixed with pw_.

namestring

Internal name for the paywall.

templatestring

The template ID this paywall is built from, e.g. tmpl_hero.

productsstring[]

The product IDs offered on the paywall, in display order.

is_publishedboolean

Whether the paywall is live to clients.

configobject

Template-specific content (headline, features, CTA copy, theme).

created_atstring

ISO 8601 creation timestamp.

List paywalls#

GET /v1/apps/{app}/paywalls

Returns the app's paywalls. Supports limit and cursor pagination.

appstringrequired

The app ID.

bash
curl https://api.cashsdk.com/v1/apps/app_2mK4pQ/paywalls \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "data": [
    {
      "id": "pw_7Xq2",
      "name": "Onboarding paywall",
      "template": "tmpl_hero",
      "products": ["pro_monthly", "pro_annual"],
      "is_published": true,
      "created_at": "2026-06-01T12:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create a paywall#

POST /v1/apps/{app}/paywalls

appstringrequired

The app ID.

namestringrequired

Internal name for the paywall.

templatestringrequired

A template ID from GET /v1/templates.

productsstring[]required

Product IDs to offer, in display order.

configobject

Template-specific content such as headline, features, and CTA copy.

is_publishedboolean

Publish immediately. Defaults to false (draft).

bash
curl -X POST https://api.cashsdk.com/v1/apps/app_2mK4pQ/paywalls \
  -H "Authorization: Bearer csk_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Onboarding paywall",
    "template": "tmpl_hero",
    "products": ["pro_monthly", "pro_annual"],
    "config": { "headline": "Unlock everything", "cta": "Start free trial" },
    "is_published": true
  }'
json
{
  "id": "pw_7Xq2",
  "name": "Onboarding paywall",
  "template": "tmpl_hero",
  "products": ["pro_monthly", "pro_annual"],
  "is_published": true,
  "config": { "headline": "Unlock everything", "cta": "Start free trial" },
  "created_at": "2026-06-01T12:00:00Z"
}

Retrieve a paywall#

GET /v1/apps/{app}/paywalls/{id}

appstringrequired

The app ID.

idstringrequired

The paywall ID, e.g. pw_7Xq2.

bash
curl https://api.cashsdk.com/v1/apps/app_2mK4pQ/paywalls/pw_7Xq2 \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "id": "pw_7Xq2",
  "name": "Onboarding paywall",
  "template": "tmpl_hero",
  "products": ["pro_monthly", "pro_annual"],
  "is_published": true,
  "config": { "headline": "Unlock everything", "cta": "Start free trial" },
  "created_at": "2026-06-01T12:00:00Z"
}

List templates#

GET /v1/templates

Returns the available paywall templates. Templates are shared across apps and define the layout a paywall's config fills in.

idstring

Template identifier, e.g. tmpl_hero.

namestring

Human-readable template name.

fieldsstring[]

The config keys this template accepts.

bash
curl https://api.cashsdk.com/v1/templates \
  -H "Authorization: Bearer csk_sk_..."
json
{
  "data": [
    {
      "id": "tmpl_hero",
      "name": "Hero",
      "fields": ["headline", "subheadline", "features", "cta"]
    },
    {
      "id": "tmpl_compact",
      "name": "Compact",
      "fields": ["headline", "cta"]
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Next steps#