canonical: https://jentic.com/apis/kiwify.com.br/kiwify

# Kiwify API

Jentic publishes the only available OpenAPI specification for Kiwify API, keeping it validated and agent-ready. Kiwify is a Brazilian digital product and online course platform that handles checkout, affiliates, payouts, and webhook delivery for creators. The public API exposes products, sales, refunds, affiliates, webhooks, event participants, and finance balances and withdrawals, so creators can pull sales data, automate refund flows, and reconcile payouts outside the dashboard. It also covers OAuth token issuance for partner integrations.

## For AI agents

Pull Kiwify sales and product data, issue refunds, manage affiliates, and reconcile creator payouts through the public API.

## Scope

Does not handle course content authoring, video hosting, or buyer-facing checkout UI - use for sales, refunds, affiliates, webhooks, and finance reconciliation only.

## Capabilities

- List products from a Kiwify creator catalogue with details and pricing
- Pull sales records and look up an individual order by id
- Issue a refund against a Kiwify sale on behalf of the seller
- Aggregate sales statistics for a Kiwify creator account
- Manage Kiwify affiliates and inspect individual affiliate records
- Register and inspect webhooks for Kiwify sale and refund events
- Reconcile balances and withdrawals from the Kiwify finance endpoints

## Use cases

### Refund Automation for Creators

Automate Kiwify refund handling so support staff or an agent can process refunds without opening the dashboard. The `/sales/{order_id}` and `/sales/{order_id}/refund` endpoints expose the order context and refund action together, so an agent can verify a sale before issuing a refund. Useful for course creators with high refund volume during launches.

Example prompt: Look up Kiwify order 'ORD-2024-001', confirm status is 'paid', and call POST `/sales/{order_id}/refund` to issue a full refund.

### Sales Dashboard Sync

Sync Kiwify sales into an internal BI tool or a creator dashboard. The /sales endpoint paginates orders with product, customer, and revenue fields, and `/sales/stats` gives aggregated KPIs for the same window. Saves creators from CSV exports and keeps revenue numbers fresh in tools like Notion, Airtable, or a custom finance sheet.

Example prompt: Pull Kiwify sales for the last 7 days from /sales, then call `/sales/stats` and write a daily revenue summary to the creator's reporting sheet.

### Affiliate Program Management

Operate a Kiwify affiliate program with programmatic access to affiliate records. The /affiliates endpoints list active partners and let an agent retrieve commission and conversion data per affiliate id. Best for course creators running competitions, sending personalised reports, or paying out top performers automatically.

Example prompt: List Kiwify affiliates, fetch `/affiliates/{affiliate_id}` for the top 10 by sales, and email each a performance summary.

### Webhook-Driven Fulfilment Workflow

Register Kiwify webhooks so downstream tools react to sale and refund events in real time. Use POST /webhooks to attach a destination URL and GET /webhooks to audit current registrations. Combined with the events endpoint this forms a reliable fulfilment trigger for delivering bonus content, granting community access, or revoking access on refund.

Example prompt: Register a webhook on https://example.com/kiwify-events for the order.paid event and verify it appears in GET /webhooks.

### Agent-Driven Creator Operations via Jentic

Let an AI agent answer creator questions like 'what did I earn yesterday' or 'refund order ABC' by calling Kiwify through Jentic. The agent searches Jentic for the matching Kiwify operation, loads the schema, and executes with a scoped bearer token. This is much faster than wiring an OAuth client and webhook handler into the agent stack directly.

Example prompt: Through Jentic, search for 'list Kiwify sales', load the /sales operation, and report yesterday's order count and total revenue.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/oauth/token` | Issue a Kiwify OAuth bearer token |
| GET | `/products` | List creator products |
| GET | `/sales` | List sales orders |
| GET | `/sales/{order_id}` | Retrieve a single sale |
| POST | `/sales/{order_id}/refund` | Issue a refund for a sale |
| GET | `/sales/stats` | Aggregate sales statistics |
| GET | `/finance/saldos` | Read account balances |

## Key resources

- **Account** — Read account details for the authenticated Kiwify creator
- **Products** — List and inspect digital products in the catalogue
- **Sales** — List orders, retrieve a single sale, issue refunds, and pull aggregate stats
- **Affiliates** — List and inspect affiliate partners attached to the creator
- **Webhooks** — Register and manage webhooks for Kiwify events
- **Finance** — Read account balances and withdrawal history
- **Authentication** — Issue OAuth bearer tokens for partner integrations

## Why Jentic

- **Setup:** Wiring Kiwify by hand means running its OAuth token exchange, passing the bearer token against the public-api.kiwify.com host, and handling its errors yourself. Through Jentic you install once, import Kiwify from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Kiwify puts the order id in the URL path (`/sales/{order_id}`), so a rule can pin your agent to acting on a given sale: it can read that order and its stats and nothing else. You choose the operations it may call, so the refund on `/sales/{order_id}/refund` is not included unless you add it.
- **Credential handling:** Your Kiwify credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list recent sales' or 'read finance balances', and Jentic returns the matching Kiwify operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Gumroad API** — Global creator commerce platform covering the same product, sale, and affiliate workflows
- **Paddle API** — Merchant-of-record alternative for SaaS and digital product checkout
- **Stripe API** — Underlying card processing and payouts platform Kiwify itself rides on top of

## FAQ

### Why is there no official OpenAPI spec for Kiwify API?

Kiwify does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Kiwify API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Kiwify API use?

The Kiwify API uses OAuth 2.0 with a bearer access token. POST `/oauth/token` exchanges client credentials for an access token that is then sent as Authorization: Bearer <token> on all other endpoints. Through Jentic, the bearer token is stored in your Jentic One instance and the agent never sees the raw secret.

### Can I issue refunds through the Kiwify API?

Yes. POST `/sales/{order_id}/refund` issues a refund against a specific order. Verify the order status with GET `/sales/{order_id}` first to avoid refunding pending or already-refunded orders.

### What are the rate limits for the Kiwify API?

Kiwify does not publish hard rate limits in the public API spec but throttles abusive clients per account. Cache /products and `/sales/stats` responses where possible - Jentic's runtime caches identical reads across agent runs to reduce hits.

### How do I list Kiwify sales from an AI agent through Jentic?

Search Jentic for 'list Kiwify sales', load the GET /sales operation, then execute with a date range filter. Jentic injects the OAuth bearer token from the vault so the agent does not need to handle the `/oauth/token` exchange directly.

### Does the Kiwify API expose creator finance data?

Yes. GET `/finance/saldos` returns the current account balance and GET `/finance/saques` lists withdrawals. Use these to reconcile payouts against the sales captured by /sales.

### Can I limit what my agent is allowed to do with the Kiwify API?

Yes. Because you run Jentic One yourself, your own rules decide which Kiwify operations and credentials the agent can use, and those rules are enforced at execution time. Kiwify puts the order id in the URL path on GET `/sales/{order_id}`, so you can pin the agent to reading a specific order and its stats and nothing more. Since you choose the operations it may call, the refund on POST `/sales/{order_id}/refund` stays out of reach unless you explicitly add it, and the same applies to affiliate, webhook, and finance endpoints.
