Skip to main content

ConsentAI quickstart

What is ConsentAI?

ConsentAI is a Shopify app that adds a required Terms & Conditions consent checkbox to storefront checkout surfaces and records tamper-evident evidence of each agreement. The app is built with React Router 7 (framework mode), Node.js, Prisma, and PostgreSQL. Storefront traffic reaches the app only through Shopify’s signed App Proxy. ConsentAI does not expose public settings or consent endpoints. It uses the app-managed Shopify Billing API — there is no hosted-pricing redirect and no Managed Pricing. The app name “ConsentAI” is a brand name. There is no model, prompt, or AI-powered policy workflow.

Admin API scopes

ConsentAI requests eight scopes from shopify.app.toml: read_metaobjects, write_metaobjects, read_metaobject_definitions, write_metaobject_definitions, read_products, write_products, read_themes, read_orders
  • Metaobject scopes version policy content into a pcnaid_terms_policy metaobject and define pcnaid.terms_policy product/collection metafield references.
  • Product scopes manage metafield definitions.
  • read_themes lets the server authoritatively detect whether the theme app embed is enabled.
  • read_orders authorizes the authenticated orders/create webhook that links cart consent to Shopify orders. No read_customers scope is requested. The Partner Dashboard must have a Protected Customer Data declaration covering this order data.

Theme App Extension

ConsentAI ships one Theme App Extension:
  • Name: Pcnaid T&C Checkbox
  • Type: theme
  • Handle: tnc-checkbox
  • Block: tnc_embed (targets the body of page templates)
The extension reads settings from the signed App Proxy at /apps/pcnaid-tnc/settings and posts consent events to /apps/pcnaid-tnc/consent. It optionally reads product/collection metafields of type pcnaid.terms_policy for per-product overrides. Two block settings are available: Enable storefront checkbox (boolean, default on) and Debug mode (boolean, default off).

Plans and billing

Plan selection happens inside the app via billing.request() / billing.cancel().

Architecture

See the architecture overview for runtime and data flow. See the API reference for documented endpoints.