Skip to main content
Cativa has native monetization: you create a payment link (paywall), share the public URL, and the buyer pays on a checkout hosted by Cativa itself. The public API gives you programmatic control over those links, over the transactions they generate, and over the resulting recurring subscriptions. This concept explains what the API exposes today, what it does not expose, and the recommended pattern to turn “paid” into “has access”. Think of a paywall as a preconfigured card reader: you set the amount and label once, then hand out the link as if you were passing the reader to each customer. You don’t build the reader (the checkout is hosted by Cativa); you only configure it, share it, and read the receipt.
The checkout itself (capturing the card, processing the payment, tokenizing) is not exposed on the public API at this phase. The purchase always happens through Cativa’s hosted payment link, identified by the customLink. The public API is for:
  1. Creating and managing payment links (paywalls).
  2. Reading transactions and subscriptions.
  3. Cancelling a subscription.
  4. Reacting to the paywall-payment-completed webhook.
You do not build the card form. You point the buyer to the hosted URL and react to the result.

The model

A paywall is the configurable payment link: price, description, whether it’s a one-time or recurring charge, and the customLink that forms the public URL. Every successful purchase becomes a transaction. If the paywall is recurring, the purchase also creates a subscription, which generates a new transaction on each billing cycle.

Base URL and authentication

All admin routes use the Cativa API with your API Key:
The API Key is generated in the Console (Developers > API Keys). See Quick Start: API Key. The only anonymous route (no key) is the public link read, used by the checkout page to render itself.
Never expose your API Key in the frontend. The /admin/... routes are server-to-server. The buyer only touches the public route /monetization/paywalls/public/{customLink}.
Admin routes for the link lifecycle. All IDs are ULIDs.
1

Create the paywall

POST /admin/monetization/paywalls with name, amount, customLink and whether it’s recurring. The response carries the id and the customLink.
2

Share the public URL

Build the hosted checkout URL from the customLink and hand it to the buyer. The checkout is Cativa’s; you don’t build the card form.
3

React to completion

Instead of polling, subscribe to the paywall-payment-completed webhook. It lands the moment the payment completes.
4

Grant access via a badge

Configure the paywall to grant a badge on completion. The badge is what unlocks the group/course/space; the money (transaction) and the access (badge) stay decoupled.
Illustrative response (the authoritative schema lives in the API Reference, tag Paywall). The returned customLink is what forms the public URL:
The exact request and response body (every field accepted and returned) lives in the API Reference, under the Paywall and Payment tags. Don’t assume field names from the examples above — check the reference.
The customLink forms the public URL you share with the buyer. Once created, the link is ready to take payments. A single route is public and requires no API Key. The hosted checkout page consumes it to fetch the link’s data (name, price, description) and render itself:
You normally do not call this route directly. You share the hosted checkout URL and let Cativa handle the rest. It exists in case you want to display link data outside the standard checkout (e.g. a price card on your own site).

Transactions (payments)

Every successful purchase becomes a transaction. You read transactions to reconcile, audit or react to a purchase.

List payments

Illustrative response (the authoritative schema, with pagination and every field, lives in the API Reference, tag Payment):
Query filters (pagination, date range, status) and the response shape live in the API Reference under the Payment tag. Don’t invent parameters from the example.
To react to a payment in real time, don’t poll this route. Subscribe to the paywall-payment-completed webhook, which lands on your server the moment the payment completes.

Subscriptions

A recurring paywall creates a subscription on the first purchase. The subscription renews on its own each cycle, generating a new transaction per charge. Cancel is the only subscription write operation exposed on the public API. Use it when a customer requests cancellation in your app, or when an external flow (chargeback, support request) needs to end the recurrence.
What cancellation does to already-issued charges, the grace period, and the statistics shape live in the API Reference under the Subscription tag. Post-cancellation access behavior depends on how you tied a badge to the paywall (see below).
The monetization API records the money. It is not the access mechanism. In Cativa, access is always governed by badge as permission. The recommended pattern is:
  1. Configure the paywall to grant a badge on payment completion (done in the Console, in the paywall settings).
  2. That badge is configured as the access requirement on the group, course or space the purchase unlocks.
  3. When the payment completes, the badge is assigned and access appears. When the subscription is cancelled and the badge is removed, access is gone.
This way you don’t wire access manually to each transaction. The money (transaction/subscription) and the access (badge) stay decoupled, each on its own route. The Grant access via purchase guide shows the end-to-end architecture, including purchases made on external gateways. To react to each payment (welcome email, CRM, analytics), subscribe to the paywall-payment-completed webhook.

Common errors and questions

The monetization API records the money, not access. Access is always governed by a badge. Confirm the paywall is configured to grant a badge on completion and that this badge is the group/course requirement. Without that link, the transaction exists and access doesn’t appear.
Not at this phase. The checkout (capturing the card, processing, tokenizing) is not exposed. The purchase always happens through Cativa’s hosted link, identified by the customLink. The public API creates/manages links, reads transactions and subscriptions, and cancels a subscription.
No. Polling wastes calls and delays the reaction. Subscribe to the paywall-payment-completed webhook, which lands on your server the moment the payment completes. Use transaction reads for reconciliation and auditing, not for real-time reaction.
Cancelling ends the recurrence. What happens to access depends on how you tied the badge: if cancellation removes the badge, access goes with it. The rules for already-issued charges and grace period are in the API Reference, tag Subscription.
The /admin/... routes are server-to-server and require a valid API Key with admin scope. Check the Authorization: Bearer cativa_live_... header and never expose the key in the frontend. The only anonymous route is the public link read (/monetization/paywalls/public/{customLink}).

Next steps

Badges as Permissions

Understand why access in Cativa is governed by a badge, not wired directly to the transaction.

Grant access via purchase

End-to-end “purchase unlocks access” architecture, including external gateways.

paywall-payment-completed webhook

React the instant a payment completes instead of polling transactions.