> For the complete documentation index, see [llms.txt](https://suby.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://suby.gitbook.io/documentation/platform-integration/api.md).

# API

This API is event-driven and designed to let you react to payments and subscription events, not to manage billing logic or products directly.  Below is a clear overview of what is currently possible.

#### What You Can Do

**Handle payments and subscriptions**

* Receive real-time webhook events for:
  * Successful payments
  * Subscription creation
  * Renewals
  * Failed payments and cancellations
* Support both one-time payments and recurring subscriptions

**Control access in your system**

* Grant or revoke access in your SaaS, website, or backend
* Activate or deactivate subscriptions
* Sync payment status with your database
* Trigger custom logic (feature unlocks, bots, emails, role assignment, etc.)

**Build custom business logic**

* Fully control what happens after each event
* Handle retries, failures, and edge cases
* Connect payments to external systems

**Secure integrations**

* Verify webhook signatures using your webhook secret
* Authenticate API requests using API keys
* Handle everything server-side

***

#### What Is Not Yet Available

**Product management**

* Product creation via API is not yet available
* Products must currently be created manually from the dashboard
* API-based product creation will be introduced in a future update

**Checkout & payment flow**

* Custom or self-hosted checkout flows are not yet supported
* Payments are handled through hosted Paylinks

**Direct payment actions**

* Programmatic payment triggering is not yet supported
* Payments must be initiated by the user

**Subscription control**

* Creating, updating, or canceling subscriptions via API is not yet supported
* Subscription lifecycle is currently driven by user actions and payment outcomes
