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:- Creating and managing payment links (paywalls).
- Reading transactions and subscriptions.
- Cancelling a subscription.
- Reacting to the
paywall-payment-completedwebhook.
The model
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:Payment links (paywalls)
Admin routes for the link lifecycle. All IDs are ULIDs.From a created link to unlocked access
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.
Create a payment link
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.
customLink forms the public URL you share with the buyer. Once created, the link is ready to take payments.
The public link (anonymous)
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:Transactions (payments)
Every successful purchase becomes a transaction. You read transactions to reconcile, audit or react to a purchase.List payments
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.
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).
Recommended pattern: from “paid” to “has access”
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:- Configure the paywall to grant a badge on payment completion (done in the Console, in the paywall settings).
- That badge is configured as the access requirement on the group, course or space the purchase unlocks.
- When the payment completes, the badge is assigned and access appears. When the subscription is cancelled and the badge is removed, access is gone.
paywall-payment-completed webhook.
Common errors and questions
The buyer paid but didn't get access
The buyer paid but didn't get access
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.
Can I capture the card through the public API?
Can I capture the card through the public API?
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.Should I poll /payments to know when someone pays?
Should I poll /payments to know when someone pays?
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.What happens to access when I cancel the subscription?
What happens to access when I cancel the subscription?
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.
I got a 403 on an /admin/... route
I got a 403 on an /admin/... route
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.
