# Insy Docs
> Build on Insy — REST API, API keys, outbound webhooks and Sign in with Insy (OAuth 2.0).
# Insy Help Center
Source: https://docs.insy.io/
Everything you need to run your business on Insy, in plain language. Here to integrate with our
API instead? Switch to **For developers** in the menu above.
- **[Getting started](/getting-started)** — Create your account, set up your profile, and decide what to sell.
- **[Communities & Telegram](/communities)** — Sell access to a paid community and gate a Telegram group behind it.
- **[Selling & payments](/selling)** — Digital products, checkout, prices, coupons and how buyers pay.
- **[Payouts](/payouts)** — Get your money out, and get discovered by new buyers.
- **[Clipping](/clipping)** — Run a clipping campaign, or earn by clipping creators' content.
---
# Buying on Insy
Source: https://docs.insy.io/buying
You bought access to a community or a product sold on Insy. These pages cover what happens after
you pay and what to do when something doesn't work. Everything you bought is listed under
**Purchased** once you log in with the email you used at checkout.
- **[I paid but have no access](/buying/no-access)** — How access is delivered for Telegram, Discord and products, and how to get a fresh link.
- **[I entered the wrong email](/buying/wrong-email)** — Your email is your account. What to do when the purchase went to the wrong address.
- **[Cancel or get a refund](/buying/cancel-or-refund)** — Cancel a subscription, what happens to your access, and who decides on refunds.
- **[My payment doesn't go through](/buying/payment-failed)** — Declined payments at checkout and failed subscription renewals.
If none of this helps, open the support widget and choose **Report a problem**.
---
# Cancel a subscription or get a refund
Source: https://docs.insy.io/buying/cancel-or-refund
## Cancel a subscription
1. **Open the purchase**
Log in, go to **Purchased** and open the community or product.
2. **Cancel subscription**
Click **Cancel subscription**. For a community you can tell us why — the reason is optional and
doesn't affect the cancellation.
Your access stays active **until the end of the period you already paid for**, and you won't be
charged again. For a community you also get a confirmation email. Changed your mind? Click **Resume
subscription** before the paid period ends.
You can also cancel, update your card or download invoices under **Manage subscription**, which
opens the payment provider's portal. In Telegram, send `/cancel` to the Insy bot to cancel,
`/uncancel` to resume and `/manage` for the portal link.
> **Cancelling an overdue subscription ends access right away**
>
> If your last renewal failed and the subscription is overdue, cancelling ends your access
> immediately instead of at the end of the period. To keep access, update your card — see
> [My payment doesn't go through](/buying/payment-failed).
## One-time payments: nothing to cancel
Access paid with BLIK, a one-time card payment or crypto does not renew by itself, so there is
nothing to cancel — it simply ends on its date. Insy reminds you during the last 7 days; to keep
access, click **Extend** on the purchase and pay again.
## When access ends
When your access ends, you are removed from the Telegram group or lose the Discord role. If you buy
again later, you can rejoin.
## Refunds
Refunds are decided by the **seller** — the creator who runs the community or sells the product,
not Insy. To ask for one:
1. **Ask the seller**
On the purchase in **Purchased**, click **Report a problem with the purchase** and choose **I
want a refund**, or message the seller with **Ask the seller**.
2. **Wait for the answer**
The seller has 7 business days to reply. If they don't, Insy support steps in.
Some products show a **no-questions-asked refund** period on their page; that promise is made by the
seller.
After a refund your access is shortened in proportion to the amount refunded — a full refund ends
it immediately. Crypto payments are refunded to a wallet address, which support will ask you for.
Your statutory rights, including the right of withdrawal, are described in the
[Terms of Service](https://insy.io/terms-of-service).
---
# I paid but have no access
Source: https://docs.insy.io/buying/no-access
Access is tied to the email you entered at checkout. Start by logging in with that email — every
fix below goes through your **Purchased** page.
## Check that the payment went through
- **Card, Apple Pay, Google Pay:** access is normally granted within a few seconds.
- **BLIK and other bank payments:** access is granted once your bank confirms the payment, which
can take a moment longer.
- **Crypto:** access is granted after the network confirms the transaction. That can take a while;
if the payment is confirmed in your wallet but you still have no access after a few hours,
contact support — some crypto payments have to be matched to your account by hand.
## Log in with your checkout email
If you weren't logged in when you paid, Insy emails a login link to the address you entered at
checkout. The link is valid for **5 minutes**; if it expired, request a new one. The emails come
from `noreply@mail.insy.io` — check your spam folder if you don't see them.
After logging in, open **Purchased**. If the purchase isn't there, you are most likely logged in
with a different email — see [I entered the wrong email](/buying/wrong-email).
## Communities on Telegram
The **Welcome to the community!** email has a **Go to chat** button. That invite link is valid for
**24 hours**. If it expired, or you never got the email:
1. **Open the community**
Go to **Purchased** and open the community.
2. **Join on Telegram**
Click **Join on Telegram**. It opens the Insy bot in Telegram, which sends you an invite link.
3. **Request to join**
Open the link and request to join. The bot approves the request automatically.
You don't need to log in with Telegram beforehand: the first Telegram account that joins this way
is linked to your purchase. From then on only that account is let in — a request from another
Telegram account is declined, and the bot tells you why. To switch accounts, use **Unlink and use
another account** when you click **Join on Telegram**.
Once your Telegram account is linked, you can also send `/invite` to the bot for a fresh link.
## Communities on Discord
Go to **Purchased**, open the community and click **Join on Discord**. Connect your Discord account
when asked; Insy then adds you to the server and gives you the member role.
## Digital products
After the purchase you get a **Thank you for your purchase!** email. If the product has files, a
second email, **Your product is ready to download!**, has a download link valid for **24 hours**.
You can always download again from **Purchased** → the product.
## Still no access
On the purchase in **Purchased**, use **Report a problem with the purchase**, or open the support
widget and choose **Report a problem**. Include the community or product name and the email you
paid with.
---
# My payment doesn't go through
Source: https://docs.insy.io/buying/payment-failed
## At checkout
Which payment methods you see depends on the plan:
- **Subscriptions** are paid by card — including Apple Pay and Google Pay where your device
supports them.
- **One-time payments** in PLN can also be paid with **BLIK**.
- Some sellers also accept **crypto**.
If you close the payment page or the payment fails, you'll see **Payment not completed — Nothing
was charged.** You can try again right away.
The most common reasons a payment is declined:
- **Bank confirmation not finished.** Many cards require you to approve the payment in your
banking app (3D Secure). The payment fails if that step is skipped or times out.
- **The card is declined** — not enough funds, online or foreign payments disabled, or a limit
reached. Your bank can tell you the exact reason.
- **The BLIK code expired** before you confirmed it in your banking app. Generate a new one.
Trying a different card or method usually solves it. BLIK payments grant access once your bank
confirms them.
## A subscription renewal failed
When a renewal can't be charged, you get a **Payment failed** email and, for Telegram communities,
a message from the Insy bot. Your access **stays active while the payment is being retried** — the
next attempts happen automatically.
To fix it, update your card before the retries run out:
1. **Open the subscription**
Log in, go to **Purchased** and open the community or product.
2. **Manage subscription**
Click **Manage subscription** and update your payment method. In Telegram, `/manage` sends you
the same link.
If every retry fails, the subscription is cancelled and your access ends.
> **Don't cancel to fix a failed payment**
>
> Cancelling an overdue subscription ends your access immediately. Update your card instead.
## Still failing
Open the support widget, choose **Report a problem** and pick **Payment doesn't go through**. Say
which community or product you were buying and which payment method you used.
---
# I entered the wrong email at checkout
Source: https://docs.insy.io/buying/wrong-email
There is no separate sign-up on Insy: the email you enter at checkout **is** the account the
purchase belongs to. If that address already has an Insy account, the purchase is added to it; if
not, a new account is created for it. The login link and, for communities, the invite link are
sent to that address.
If you were logged in when you paid, the purchase went to the account you were logged in with,
whatever email you typed.
> **Don't pay a second time**
>
> Paying again with the right email creates a second, separate purchase. Get the first one moved
> instead.
## You can still open that inbox
For example, you used an old address you still have access to.
1. **Log in with the old email**
Request a login link to the address you paid with.
2. **Change your email**
Open **Account → Security** and use **Change email**. Enter the new address.
3. **Confirm**
Insy sends a confirmation link to the new address and a cancel link to the old one. Both are
valid for **1 hour**.
Your purchases stay with the account, so they move to the new email with it. The change is refused
if the new address already belongs to another Insy account — in that case contact support.
## The address was mistyped
You can't log in to an address you don't own, so this has to go through support. Open the support
widget, choose **Report a problem** and include:
- the community or product you bought,
- the date and amount of the payment,
- the email you meant to use and, if you know it, the one you typed.
Support checks the payment and moves your access to the correct account.
---
# What's new in Insy
Source: https://docs.insy.io/changelog/introducing-changelog
You can now follow Insy updates here. We'll share new features, improvements,
and useful fixes, with links to help you get started.
Bookmark this page or [subscribe via RSS](/changelog/rss.xml) to keep up with
what's new.
---
# 1.122.0 (October 14th, 2026)
Source: https://docs.insy.io/changelog/v1-122-0
## Added
- Report purchase problems directly from your purchases.
- Escalate purchase disputes from the seller to support.
- Paste screenshots into support conversations and rate resolved cases.
---
# 1.126.0 (October 15th, 2026)
Source: https://docs.insy.io/changelog/v1-126-0
## Added
- Checkout checks whether your email already has active community access before payment.
## Fixed
- FAQs are saved correctly when creating a community.
---
# 1.133.0 (October 27th, 2026)
Source: https://docs.insy.io/changelog/v1-133-0
## Added
- A standalone connection diagnostics page to help troubleshoot access to Insy.
---
# 1.133.4 (October 27th, 2026)
Source: https://docs.insy.io/changelog/v1-133-4
## Fixed
- Stalled server-side API requests now time out and retry when loading pages.
---
# 1.134.0 (November 2nd, 2026)
Source: https://docs.insy.io/changelog/v1-134-0
## Added
- A clipping wallet view for the team to review balances and withdrawals.
- Tools for balance adjustments and settling selected clips before their review period ends.
---
# 1.134.1 (November 2nd, 2026)
Source: https://docs.insy.io/changelog/v1-134-1
## Fixed
- Wallet history now shows the reason provided for a balance deduction.
---
# 1.135.0 (November 3rd, 2026)
Source: https://docs.insy.io/changelog/v1-135-0
## Changed
- Crypto withdrawal notifications now identify the requester and payout source, with a direct link to the approval queue.
## Fixed
- Clipper USDC withdrawals can be approved when the queue previously showed an incorrect zero balance.
- Community bans are enforced at checkout and when joining Telegram.
- Polish sellers without a VAT number are no longer asked by Stripe for one. It was needed only to enable Przelewy24, which now applies to VAT-registered businesses.
---
# Clipping
Source: https://docs.insy.io/clipping
Clipping turns one creator's content into hundreds of short videos. A **creator** puts up a campaign
with a budget and a pay rate; **clippers** cut short clips from that creator's material, post them on
their own social accounts, and earn based on the views those clips pull in. Insy sits in the middle:
tracking views, working out what each clip is worth, and moving money from the budget to the
clippers.
Which side you're on decides where you start.
- **[Run a clipping campaign](/clipping/for-creators)** — You are the creator paying for reach. Set a budget and a rate per 1,000 views, pick the platforms, write the rules, and approve the clips that come in.
- **[Earn by clipping](/clipping/for-clippers)** — You are the clipper making the videos. Verify a social account, submit your clip, and get paid as the views add up.
## How a campaign works, end to end
1. **A creator funds a campaign**
The creator builds a campaign, sets a pay rate for each platform, and puts money into its budget.
Nothing runs until that first deposit lands — the deposit switches the campaign on.
2. **Clippers join and post clips**
A clipper verifies the social account they'll post from, joins the campaign, and submits the link
to each clip they publish on TikTok, Instagram or YouTube.
3. **Insy tracks the views**
Insy checks each clip on the platform and records how its view count grows. What a clip is worth
follows directly from those views and the campaign's rate.
4. **The creator approves, and clippers get paid**
The creator approves the clips that follow the rules. Approved clips earn out of the budget, and
the reward lands in the clipper's Insy wallet to withdraw.
> **Clipping may not be switched on for your account yet**
>
> Clipping is a distinct part of Insy from selling communities or products, and it's rolled out
> gradually. If you don't see it in your account, it's not enabled for you yet — that's expected, not a
> fault.
## Where the money is
Both sides touch the wallet from opposite ends: a creator's budget is money going **out** to pay for
reach; a clipper's rewards are money coming **in**. The payout side — balances, holds and getting
money out to a bank or crypto wallet — is shared with the rest of Insy.
- **[Clip rules and disputes](/clipping/rules-and-disputes)** — What gets a clip approved or rejected, and what happens when a clipper or a creator disagrees with a decision.
- **[Payouts and your wallet](/payouts)** — Your balances, the hold on new earnings, and withdrawing to a bank (PLN) or a crypto wallet (USDC).
---
# Earn by clipping
Source: https://docs.insy.io/clipping/for-clippers
Clipping is how you earn on Insy without being the creator. You take a creator's content, cut short
clips, post them on your own TikTok, Instagram or YouTube, and get paid based on the views they pull.
The rate and rules are the creator's; your job is to make clips that follow them and rack up views.
## Find a campaign
Campaigns are listed on Insy's discovery page. Each shows the creator, the platforms it wants clips
on, the pay rate, and its **rules and resource links** — where you get the source footage and
anything else you need. Read the rules before you start: they're exactly what your clips are approved
or rejected against.
## Verify the account you'll post from
Before you can join a campaign you need at least one **verified social account**. Verifying proves you
own the account your clips come from, so views can be tied and paid to you.
1. **Link an account**
Choose the platform (TikTok, Instagram or YouTube) and enter your username. Insy gives you a short
**verification code**.
2. **Put the code on your profile**
Add the code where Insy's checker can read it on your public profile. Insy then looks your profile
up to confirm the code is there.
3. **Wait for the check (or trigger it now)**
The check runs on its own shortly after. If you don't want to wait, ask Insy to **re-check
immediately** once the code is in place.
> **A verification does not wait forever**
>
> A pending verification is only open for a short time. If the checker can't find your code in that
> window, the attempt fails and you start a fresh one — with a new code. There's also a cap on how many
> verification attempts you can make per hour and per day, and failed tries count too, so get the code
> in place before you check.
A username already verified — by anyone — can't be verified again, and you can only have one
verification pending per account at a time. You can remove a linked account later, which unlinks it
from Insy.
## Join, and mind two things that can block you
Once you have a verified account, join the campaign. Two conditions can stop you:
- **A ban.** If the creator has banned you from that campaign, you can't join.
- **No verified account.** If you have none, verify one first.
Some campaigns also ask the creator to **approve each account** before it can clip. On those, your
account waits for approval; on campaigns that don't, your verified account is enrolled automatically.
## Submit a clip
Publish your clip on the platform first, then submit its link.
1. **Paste the clip's URL**
Give Insy the link to your posted clip and the platform it's on. Short TikTok share links are fine
— Insy resolves them to the real video.
2. **Insy checks it's really there**
A new clip starts in a platform-check state while Insy confirms the video exists and reads its
details. Once it clears, it moves to **pending** — waiting for the creator's decision.
3. **The creator approves or rejects it**
Approved clips start earning. Rejected ones don't — and if you think a rejection was wrong, you can
dispute it (see [Clip rules and disputes](/clipping/rules-and-disputes)).
> **One clip per video, and a limit on retries**
>
> Each video can only be submitted once while it's live in a campaign. If a clip is rejected on the
> **platform** side — deleted, or it failed Insy's check — the slot frees up and you can resubmit, but
> only a few times before Insy tells you to stop retrying that video. There are also limits on how many
> clips you can submit per minute and per day.
## How views are counted, and what a clip is worth
After a clip is accepted, Insy checks it on the platform regularly and records how its views grow —
you can watch the running total and trend on the clip. Payout follows straight from views and the
rate:
- The rate is a **CPM** — an amount per **1,000 views**. Your clip's worth is its views at that rate.
- There's a **minimum**: a clip earns nothing until it's worth at least the floor the creator set.
- There's a **maximum** per clip: past a point, one clip stops earning more however big it gets.
> **Fake views won't pay**
>
> Insy scores clips for signs of inauthentic views. Buying views or botting doesn't just risk the clip —
> it undermines the account you verified. Earnings track genuine views, and a clip taken down on the
> platform stops earning.
## Getting paid
A clip's earnings aren't paid the instant it goes up. Each clip carries a **review-and-hold window** —
roughly two weeks — during which the creator can still approve or reject it and a payout won't settle.
After the window, an approved clip pays out; because it settles against view snapshots, you may be
paid in steps as the views climb rather than all at once.
The reward lands in your **Insy wallet**, on the same rail the campaign runs on — a złoty
(clip-reward) balance for a fiat campaign, or a USDC balance for a crypto one. From there you withdraw
it like any other Insy earnings.
> **Connect a payout method to actually cash out**
>
> To receive fiat clip rewards you'll need to connect a Stripe account for payouts; crypto rewards go to
> a wallet address you add. Balances, the hold, and both kinds of withdrawal are in the payouts section.
- **[Your wallet and withdrawals](/payouts)** — Your clip-reward balance, what's available now versus on hold, and how to withdraw it.
- **[Rules, rejections and disputes](/clipping/rules-and-disputes)** — What gets a clip rejected, and how to contest a rejection you think is wrong.
---
# Run a clipping campaign
Source: https://docs.insy.io/clipping/for-creators
A clipping campaign is you paying for reach. You put money into a budget, set what a thousand views
is worth, and clippers turn your content into short videos across TikTok, Instagram and YouTube. Insy
tracks the views and pays the clippers out of your budget — you decide the terms and approve the
work.
## Create the campaign
1. **Name, images and a link**
A **name**, a **background** and **avatar** image for the campaign's page, and a **slug** — the
short unique word in its web address. Insy tells you if a slug is taken.
2. **A category**
Pick the category that fits — a straight clipping campaign, a UGC campaign, a logo campaign. It
helps clippers browsing Insy find campaigns like yours.
3. **The rules**
A **description** of what you want, a list of **rules** clippers must follow, and **resource
links** — where clippers get your source footage, brand assets, or anything else. You can note
the **main audience** you're after. The rules page is what clippers read before they clip, so
spell out what earns an approval and what gets a rejection.
4. **A pay rate for each platform**
Set a rate per platform you want clips on — covered in its own section below.
> **The campaign is off until you fund it**
>
> A newly created campaign sits in a **creating** state — not listed, takes no clips, does nothing
> until its **first deposit**. That first top-up switches it on. So build it, set your rates, then fund
> it when you're ready to go live.
## Set the pay rate — CPM, with a floor and a ceiling
You pay by **CPM**: a rate per **1,000 views**, in the campaign's currency. Set one rate per platform
(TikTok, Instagram, YouTube), so you can pay differently where views are worth differently. Each rate
carries two guard rails:
- **A minimum payout.** A clip earns nothing until it's worth at least this much. Small clips that
barely move sit at zero until they cross the floor.
- **A maximum payout.** The most a **single clip** can ever earn, no matter how viral it goes — the
real cap on your exposure per clip, and the number that bounds a runaway hit.
> **One clip can't drain the whole budget**
>
> A single clip's maximum payout can't be set above **half of the campaign's available balance**, and
> Insy clamps it down for you when you first fund the campaign. It's a safety rail so no one clip can
> empty a budget in a single go.
So a clip's worth is its views, at your CPM, with nothing below the floor and nothing above the
ceiling. Clippers see the same numbers before they submit.
## Fund the budget, and top it up
You put money in by **topping up** — a payment by card or crypto. A few things follow from that first
payment:
- **The first top-up sets the campaign's currency rail for life.** Pay by card and it's a fiat
(złoty/USD) campaign; fund it with crypto and it's a USDC campaign. Every later top-up comes in on
that same rail, and every clip reward leaves on it — the two never mix inside one campaign.
- **There's a minimum.** The **first** deposit has a higher floor than later top-ups, both set in the
campaign's own currency. You can see the exact minimums on its finances screen.
- **You can top up again any time** to keep the campaign live.
> **Where the spend comes from**
>
> Campaign money is its **own budget**, separate from your Insy sales income and your personal wallet.
> You fund it deliberately with a top-up; clip rewards are drawn from that budget. It is not deducted
> from your community or product sales.
## Approve or reject the clips that come in
When a clipper submits a clip, Insy first confirms the video really exists on the platform, then it
lands in your queue. **Approve** the ones that follow your rules and **reject** the ones that don't —
approved clips start earning against your budget as their views grow.
> **There is a review window**
>
> You have roughly **two weeks** from when a clip is submitted to approve or reject it. Once that window
> closes the clip's status is frozen and you can no longer flip it by hand. If a clip you approved turns
> out to break the rules after the window, you can't just reject it — you file a report instead (see
> [Clip rules and disputes](/clipping/rules-and-disputes)).
You also decide **how social accounts get in**. By default a clipper's verified account is enrolled
automatically. To vet who clips for you, turn on **social account approval**: each account then waits
for your approval before its clips count. Turning approval back off auto-approves everyone waiting.
Two more controls over who takes part:
- **Ban a clipper** to remove them from the campaign and stop them rejoining. You can unban later.
- Every participant shows on your **Clippers** list with their submissions, views and earnings,
alongside campaign-wide analytics for earnings, views and active clippers.
## When the budget runs low
Insy steps in as the budget empties, in two stages:
1. **New submissions pause first**
As the available budget gets low, the campaign stops accepting **new** clips. Clips already in
flight keep going.
2. **Then approvals pause**
If it falls further, approving clips is paused too and already-approved clips are held, so the
budget can't go negative. Existing clips are locked until you add money.
3. **Top up to resume**
A top-up lifts both pauses and the campaign picks up where it left off. You can also **pause or
unpause** the campaign yourself at any time.
## Wind a campaign down and get leftover budget back
To stop, withdraw whatever budget is left. The refund goes back to the **cards of your original
top-up payments**, newest first, minus a withdrawal fee, and there's a minimum withdrawal amount.
Only one withdrawal can be in flight at a time, and you can only pull out what's genuinely available —
money locked against approved clips or still refundable on the original payment bounds how much comes
back.
> **Rewards already earned still belong to the clippers**
>
> Winding down returns your **unspent** budget. It does not claw back rewards clips have already earned
> — those are the clippers' money. Withdraw the remainder once the work you're paying for is done.
## Next
- **[The clipper's side](/clipping/for-clippers)** — What your clippers see and do — worth reading so your rules match how submitting actually works.
- **[Rules, rejections and disputes](/clipping/rules-and-disputes)** — Approvals, reports on already-approved clips, and how a disputed decision is settled.
---
# Clip rules and disputes
Source: https://docs.insy.io/clipping/rules-and-disputes
Every clip goes through the same gate: it has to be a real video on the platform, and it has to follow
the campaign's rules. This page covers who decides, what fails a clip, and how a disagreement gets
settled.
## The two checks a clip has to pass
1. **The platform check (automatic)**
Insy confirms the clip exists on TikTok, Instagram or YouTube and reads its details. A link that
doesn't resolve to a real video, or a clip that gets deleted, fails here on its own — no human
decides it. A clip removed from the platform after it was accepted also stops earning.
2. **The rules check (the creator decides)**
Once a clip clears the platform check it waits for the **creator** to approve or reject it against
the campaign's rules. A manual decision — the creator reads the clip and the rules and makes the
call.
## What gets a clip rejected
There's no secret list — the campaign's own **rules page** is the standard, set by the creator, so
read it before you clip. Common reasons a clip doesn't earn:
- **It breaks a campaign rule** — wrong source material, a missing required tag or caption, the wrong
format, off-brand, or anything else the creator spelled out.
- **The video was deleted or is unavailable** — nothing to track, so it fails the platform check.
- **The views look inauthentic.** Insy scores clips for bot-like or bought views. Fake views don't
earn, and they put the account you verified at risk.
- **It's a duplicate.** The same video can only be live in a campaign once.
> **There's a window to decide**
>
> A creator can only approve or reject a clip within a **review window** — roughly two weeks from
> submission. After that the status is frozen. This cuts both ways: it protects clippers from a decision
> months later, and it means a creator who spots a problem in an already-approved clip after the window
> has to **report** it rather than reject it directly (below).
## When a clipper disagrees — dispute a rejection
If your clip was rejected and you believe it followed the rules, you can **dispute** it. That takes
the decision out of the creator's hands and escalates it to **Insy staff** to arbitrate.
- Only the **clip's submitter** can dispute, and only on a clip that's actually **rejected**.
- You can dispute a clip's rejection **once** — write a clear reason, because that's what the
arbitrator reads.
- Filing a dispute **opens a support conversation** and freezes the creator from re-deciding the clip
while it's under review, so they can't flip it back and forth.
> **The arbitrator's decision is final**
>
> Once Insy staff resolve a dispute, the clip's status is **locked permanently** — neither side can
> change it after that. Disputes are the appeal of last resort, so use them when a decision is genuinely
> wrong.
## When a creator disagrees — report an approved clip
Sometimes a creator only realises a clip breaks the rules **after** it's approved and past the review
window, when they can no longer reject it. For that there's a **report**: the creator flags the
approved clip to Insy staff and explains the problem.
- Only a **campaign manager** can report a clip, and each clip can be reported **once**.
- Unlike a dispute, a report doesn't freeze the creator out of their own campaign — it's an escalation
to the admins, who make the final call.
- As with a dispute, the admins' decision **locks the clip's status** for good.
## Reports that quietly close themselves
A dispute or report can become pointless before anyone rules on it — for example the clip is **paid
out** or gets **removed from the platform** in the meantime. When that happens Insy cancels the report
rather than forcing a decision on something that no longer matters.
> **Most clips never touch any of this**
>
> Disputes and reports are the exceptions. The normal path is: submit, the creator approves, the clip
> earns. Clear rules on the creator's side and honest clips on the clipper's side keep almost everything
> out of arbitration.
## A note on rented-account clips
Some campaigns run through Insy's account-renting flow, where a clip is posted under a rented account.
Those clips are handled a little differently — they can't be rejected directly; instead the creator
files a **rejection request** the clipper can accept or dispute, and the clip keeps tracking until
it's settled. It's an advanced arrangement; if you're not part of one, the ordinary approve/reject
flow above applies.
## Next
- **[Run a clipping campaign](/clipping/for-creators)** — Set the rules clearly so approvals are easy and disputes are rare.
- **[Earn by clipping](/clipping/for-clippers)** — Read the rules, make clips that follow them, and get paid on genuine views.
---
# Communities & Telegram
Source: https://docs.insy.io/communities
A community on Insy is a paid membership. People buy access, and Insy keeps a private Telegram group
gated behind it — letting paying members in and removing them the moment their access lapses. You
keep the group; Insy watches the door.
These guides run in the order you'll do them: build the community, set the price, connect the group,
then run it day to day.
- **[Create your paid community](/communities/create)** — Handle, name, description, category and images — plus saving a draft, editing, and deleting.
- **[Pricing plans and how members pay](/communities/pricing)** — Set the price, choose monthly or lifetime, add several plans, and understand renewals.
- **[Connect your Telegram group](/communities/telegram)** — Create your own bot, add it as an admin, and let paying members join automatically.
- **[Managing members and expiry](/communities/members)** — Roles, bans, the member cap, expiry reminders and removal, rejoining, and free access.
> **You need Stripe before any money moves**
>
> To receive money you must connect a Stripe account to the community and fill in your business and
> invoicing details (including your NIP and VAT rate where they apply). You can build the community
> and set prices first, but no payment goes through until Stripe is connected. See
> [Pricing plans and how members pay](/communities/pricing).
---
# Create your paid community
Source: https://docs.insy.io/communities/create
Creating a community sets up the page people land on, the membership they buy, and the shell your
Telegram group hangs off later. You're made the community's **owner** automatically and can manage
everything from the moment it's created.
## What you fill in
1. **Pick a category**
Choose the one category that best describes your community — the list runs from Trading and
E-commerce to Selfcare, Sport and more. It's how people browsing Insy find communities like
yours, so pick the closest fit, not the most flattering.
2. **Set a handle**
Your handle is the short, unique word in your community's web address (its "slug"): 5 to 25
characters, lower-cased and cleaned up automatically, and it has to be free — Insy tells you on
the spot if it's taken. It goes on every link you share, so pick something stable and memorable.
3. **Name and describe it**
The **name** is the display title shown to buyers (up to 50 characters). The **description** is
the longer pitch on the page (up to 1000 characters) — what members get, who it's for, why it's
worth the price. You can add a short list of questions and answers to head off the usual
"what's included?" messages.
4. **Add a cover and an avatar**
Upload images to make the page yours: background/cover images, a separate avatar, and optionally
a short video. One image is marked as the main picture — the large one at the top of the page.
5. **Set the price**
Every community needs at least one paid plan. Set a single monthly price during creation, or
build out several plans — see [Pricing plans and how members pay](/communities/pricing).
> **You don't have to finish in one sitting**
>
> Insy saves your work as a **draft** — private to you, not shown anywhere public. Come back later and
> publish when it's ready. You can keep more than one draft.
## Editing after it is live
Almost everything here — name, description, category, images, questions and answers — can be changed
after the community is live, from its management screen. Two exceptions:
- **The handle is meant to stay put.** It's baked into every link you've shared, so treat it as
permanent even where the interface lets you touch it.
- **The member cap has a catch.** If your community is running a limited drop (a fixed number of
spots), you can't change the member limit while that drop is active. Finish or cancel the drop
first. The everyday member cap is in [Managing members and expiry](/communities/members).
## Deleting a community
Deletion is deliberately slow and two-step, because it removes the community and cuts off its
members.
1. **Request deletion**
From the community's settings, ask to delete it. Insy emails a single-use confirmation link to
the owner's address rather than deleting on the spot. If members are still active, you're told
how many before you go ahead.
2. **Confirm from your email**
Open the link and confirm. It's valid for a limited time and works only once — the safety catch
that stops a community being deleted by accident or by someone who isn't you.
3. **Wait out the grace window**
After you confirm, deletion is scheduled about 24 hours ahead, not immediately. During that
window it can still be undone. Once it passes, the community is removed.
> **Deletion is not a refund tool**
>
> Removing a community does not refund anyone or unwind their payments. To stop selling but keep
> existing members, close the community to new members or deactivate its plans instead — see
> [Pricing plans and how members pay](/communities/pricing).
---
# Managing members and expiry
Source: https://docs.insy.io/communities/members
Once people are in, most of the day-to-day runs itself: Insy tracks who has paid, reminds people
before they lapse, and removes them from the group when access ends. This page covers the controls
you have and the automatic behaviour behind them.
## Roles
Every membership carries a role, from lowest to highest reach:
- **Member** — a regular paying member.
- **Moderator** — a helper role.
- **Admin** — can manage the community.
- **Owner** — you, the creator. Created automatically when you make the community.
Managing the community — editing it, changing plans, connecting Telegram, banning people — is
available to the **owner and admins** only. Members and moderators can't reach those controls.
> **These are your community's roles, not platform staff**
>
> There's a separate, platform-wide admin area (anything under `/admin`) that belongs to **Insy staff
> only**. Being an owner does not give you access to it — everything you manage lives on your own
> community's screens.
## Banning and removing members
You can **ban** a member: it asks for a reason, removes the person from the Telegram group, and
stops them coming back — even if they still hold a link. Insy remembers the ban against their
account and Telegram identity, so re-entry stays blocked. You can **unban** later to reverse it.
Removing someone (a kick) takes them out of the group but isn't a ban — a kicked member with active
access could rejoin. Use a ban to keep them out for good.
## The member cap
A community can have a **member limit** — a maximum number of active members. At the cap, new buyers
are turned away at checkout until a spot frees up. Leave it unset for no cap.
> **Member cap versus community limits**
>
> Don't confuse the member cap with the setting labelled **community limits** — that one is about your
> **SMS allowance**, not how many members you can have. The member cap is the number described here.
One catch, repeated from [Create your paid community](/communities/create): you can't change the
member limit while a limited drop (a fixed number of spots) is running. Finish or cancel the drop
first.
## How access expires and members leave
The automatic part. Insy checks memberships continuously in the background:
- **As access nears its end**, members whose access doesn't renew on its own (anyone paying by BLIK
or crypto, or on a one-time monthly plan) get reminders during the final stretch — nudging them to
pay for the next period. Each member is reminded as the days count down, not spammed.
- **When access lapses**, the membership is marked inactive and the member is automatically
**removed from the Telegram group**. They keep their account; they just lose access until they buy
again.
- **Card subscriptions are the exception.** A member paying by card on a monthly plan keeps access
as long as the card subscription is live, even past the nominal date, because it renews itself.
They're only removed if the subscription genuinely ends (e.g. repeated failed payments). See
[Pricing plans and how members pay](/communities/pricing) for why card, BLIK and crypto differ.
> **Lifetime members never expire**
>
> Someone on a lifetime plan has no end date, gets no expiry reminders, and is never removed for
> lapsing. The only way they leave is if you ban or remove them.
## Letting former members rejoin
By default, once someone has been a member, Insy treats them as a known past member. There's a
setting — **allow past members to rejoin** — that lets a former member buy in again rather than being
treated as blocked. Turn it on to let lapsed members return on their own; leave it off if a
departure should be final unless you invite them back.
## Giving free or comped access with invite codes
To let someone in without a payment — an affiliate, a guest expert, a friend, a refunded customer —
use **invite codes**. You generate a code and choose:
- **How long the access lasts** — a number of days, after which it expires like any membership (or
leave it open-ended).
- **What role** the person gets on redeeming — member, moderator, and so on.
- **When the code itself stops working** — an optional expiry on the code, separate from the
membership length.
- Optionally, **who it's for** — tie it to a specific email so only they can use it.
When they redeem it, they get a free membership and join the Telegram group exactly like a paying
member — the bot lets them in the same way. A comped membership with a duration still expires on
schedule, with the usual reminders and removal.
> **Invite codes are per community**
>
> The codes you create belong to your community and are managed from its screens. The platform-wide
> list of every code across all communities is a staff tool — you only see and control your own.
---
# Pricing plans and how members pay
Source: https://docs.insy.io/communities/pricing
A plan is one way to buy into your community: a price, a payment method, and whether access renews
or is bought once. Every community needs at least one. Start with a single monthly price and add
more later.
## Currency and price
Choose a [supported currency](/selling/payments#currencies) when creating the plan. Enter the price
in that currency, not its smallest unit: `49` in EUR means €49.00. Allowed price limits depend on
the currency; the editor validates the amount you enter.
## The two shapes of access
- **Monthly** — Access lasts a month and is meant to be renewed. The usual subscription.
- **Lifetime** — Bought once and kept forever. No expiry, nothing to renew.
You also choose **how the buyer pays**: by card, by BLIK, or with crypto. That choice changes what
"monthly" means — the one genuinely confusing part, covered below.
> **Other billing periods exist**
>
> The pricing editor can technically bill daily, weekly, monthly or yearly, but for a Telegram
> community monthly and lifetime are what nearly everyone uses, and what this page assumes.
## How renewals actually work
Whether a plan renews **by itself** depends on the payment method, not the word "monthly".
- **Card, monthly** — a real subscription. The card is charged automatically each month and access
keeps rolling. If a charge fails, the subscription goes *past due*: the member is notified, and if
it's never fixed the membership ends and they're removed from the group.
- **BLIK or crypto, monthly** — access lasts a month, but nothing charges the member again (BLIK and
crypto are one-off payments). As the month runs out the member is reminded to pay for the next
one; if they don't, access lapses and they're removed. Think of it as *manual renewal*.
- **Lifetime** — paid once. Never expires, sends no reminders, never removed for lapsing.
> **Expiry reminders are automatic**
>
> For any membership that doesn't renew itself, Insy reminds the member during the final stretch
> before expiry, so a lapse is rarely a surprise. The mechanics are in
> [Managing members and expiry](/communities/members).
## Offering more than one plan
For failed automatic renewals, see [Stripe Smart Retries](/selling/smart-retries). This is separate
from the reminders for members who renew manually.
You're not limited to a single price — a common setup is a monthly plan alongside a lifetime one, or
a cheaper and a premium tier. Create several plans when you build the community, or add more later
from the plans screen.
- **Order and highlight.** You control the order buyers see plans in, and can mark one as featured
so it stands out as the recommended choice.
- **One-time plans can be bought several terms ahead.** For a one-time (non-card) plan you may let a
buyer pay for several periods at once — useful for "pay for six months up front".
## Editing and deleting plans
You can rename a plan, rewrite its description, and turn it on or off any time. Changing the
**price, currency, or billing period** is where the important rule lives:
> **Once a plan has buyers, its price is locked**
>
> As soon as anyone has bought a plan, you can no longer change its price, currency, or billing
> period — only its name, description, and whether it's active. This protects existing members from
> having their deal changed. To sell at a new price, **create a new plan** and switch the old one off:
> members on the old plan keep their terms; new buyers get the new one.
Deleting works the same way:
- A plan can only be **deleted** if no membership has ever used it. If any member — active or past —
is tied to it, deletion is blocked and Insy tells you how many are using it.
- To retire a plan that has buyers, **deactivate** it instead. It disappears from checkout, stops
taking new buyers, and existing members are untouched.
## Before any of this takes money
Setting a price doesn't by itself let you get paid. To receive money you must:
1. **Connect a Stripe account** to the community and finish Stripe's onboarding.
2. **Fill in your business and invoicing details** — including your country, address and applicable
tax identifier — so the correct seller information is available for billing.
Until Stripe is connected and onboarding is complete, your plans exist but no checkout completes.
You can check the community's payment status on its settings screen any time.
---
# Connect your Telegram group
Source: https://docs.insy.io/communities/telegram
Insy gates your Telegram group with a **bot**: the doorkeeper that lets in people with active access
and removes people whose access has ended. Setup is a one-time job with a few careful steps.
> **You bring your own bot**
>
> There is no shared or managed Insy bot. **You create your own bot in Telegram's @BotFather** and
> paste its token into Insy. The bot appears under your name in the group, which lets it act as an
> admin there — and means the token is yours to keep safe.
## Step 1 — Create a bot and get its token
1. **Open @BotFather in Telegram**
Search for **@BotFather** (the official one, with the blue check) and start a chat.
2. **Create a new bot**
Send `/newbot` and follow the prompts to name it and give it a username. BotFather then sends a
**token** — a long string like `1234567890:ABCdef...`. That's the bot's password. Keep it
private.
3. **Paste the token into Insy**
On your community's Telegram screen, paste the token and save. Insy checks it's a real, working
token before accepting — an invalid or mistyped one is rejected right away.
> **One bot, one community**
>
> A bot token can be connected to **only one community**. Reusing a token already set up on another
> community is refused. Give each community its own bot.
## Step 2 — Add the bot to your group as an admin
Once the token is accepted, Insy gives you a **link that opens Telegram** and walks you through
adding the bot. Use that link rather than adding the bot by hand — it carries the settings the bot
needs.
1. **Open the link and pick your group**
The link lets you choose which group to add the bot to. Pick the private group you want to gate.
2. **Grant it admin rights**
The bot must be an **administrator** with permission to **add users** and to **remove/restrict
members** — exactly what it needs to invite paying members and remove those who lapse. The link
requests these two; don't strip them afterwards.
3. **Wait for the confirmation**
Once the bot lands in the group with the right rights, Insy detects it automatically and posts a
short confirmation in the group. From that point the group is connected.
> **One group per community**
>
> Each community connects to a single Telegram group. Once a group is bound, adding the same bot to a
> different group won't silently move your community — the original connection stays until you
> deliberately disconnect and reconnect.
## Checking the connection
Your community's Telegram screen shows the current state: whether a token is saved, whether a group
has been detected, its title, and whether the connection is healthy. If anything is off, you'll see
it there first.
## How members get in
Members never need an invite from you personally — the bot handles it:
- **After paying**, a member receives their own private, single-use invite link. Opening it sends a
join request, and the bot approves it because their access is active. Links expire, so they're
meant to be used promptly.
- **Any time**, a member can message the bot with **`/invite`** for a fresh link — useful if the
first expired or they joined on another device. With no active access, the bot tells them so
instead of letting them in.
- Members can check their own standing with **`/me`**, **`/status`** or **`/membership`** — whether
access is active and until when.
Because entry runs through join requests the bot approves, someone without an active membership
can't get in even if they obtain a link — the bot declines them.
## Fixing a broken or disconnected bot
If members suddenly can't join, or the connection shows as unhealthy, the cause is almost always
that **the bot was removed from the group or lost its admin rights**. Work through these in order:
1. **Confirm the bot is still in the group, as an admin**
Open the group's member list. The bot should be there, marked as administrator, still holding
the add-users and remove-members permissions. If it was kicked or demoted, that's the problem.
2. **Re-add or re-promote it**
From the Telegram screen, use the reconnect link to add the bot back to the **same** group (or
re-grant its admin rights if it's still a member). Re-adding it to the original group restores
the existing connection — no need to start from scratch.
3. **Re-register the bot if needed**
If the bot is present and an admin but still not reacting, the screen offers a re-register action
that re-establishes the Telegram–Insy link. Run it, then test with a member.
> **Disconnecting is a clean break**
>
> Disconnecting removes the connection entirely — Insy stops managing the group and the bot stops
> taking instructions. Only do it if you're changing bots or groups on purpose. To reconnect, go
> through the setup above again.
> **Don't rotate the bot's token elsewhere**
>
> If you regenerate the token in @BotFather, the old one Insy holds stops working and the connection
> breaks. If you must rotate it, paste the new token into Insy afterwards.
---
# Insy for developers
Source: https://docs.insy.io/developers
Insy is a platform for selling access. Creators use it to run paid communities, gate Telegram
groups behind a subscription, and sell digital products. This site documents the three surfaces
you can build against: a REST API you call with an API key, outbound webhooks you receive, and
Sign in with Insy — an OAuth 2.0 flow that lets an Insy user grant your application access to
their account.
With these you can provision memberships from your own funnel, open a hosted checkout from your
own landing page, react to payments and membership changes as they happen, and let people sign
in to your product with their Insy account.
- **[Quickstart](/developers/quickstart)** — Pick the integration surface that fits what you are building, then make your first call.
- **[REST API](/developers/api)** — Server-to-server calls authenticated with an API key: provision memberships, create checkout sessions, sign people up for drops.
- **[Webhooks](/developers/webhooks)** — Five signed event types delivered to your endpoint when memberships, payments and digital product purchases change.
- **[Sign in with Insy](/developers/oauth)** — OAuth 2.0 authorization code flow, plus a drop-in login widget that needs one script tag.
- **[AI and MCP](/developers/ai-and-mcp)** — MCP servers for AI agents: one that searches these docs, one that works on an Insy account.
## What you will need
Every credential below is self-serve. They all live under **Account → Developer** in the Insy
app, and nothing here waits on a human.
- **An API key**, if you are calling the REST API. Create one at
[Account → Developer → API keys](https://insy.io/account/developer/api-keys), choosing the
permissions it needs — reading memberships, writing memberships, creating checkout sessions,
or drop notification signups. The key is bound to a user account, not to a single community:
it can act on every community where that account holds an active OWNER or ADMIN membership.
You see the key once, in plaintext, and never again. See
[Authentication](/developers/api/authentication).
- **An OAuth client**, if you are using Sign in with Insy. Register one at
[Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients) with
your application name, redirect URIs, the scopes you want (`memberships.read`,
`products.read`), optionally a logo, and — if you are embedding the login widget in a browser
— the web origins it will run on. You get a `client_id`, and a `client_secret` if your client
is confidential. See [Sign in with Insy](/developers/oauth).
- **A webhook endpoint**, if you want to receive events. Webhooks are registered from inside the
Insy app by the account that owns the community or the product. See [Webhooks](/developers/webhooks).
> **One thing still goes through support**
>
> `MEMBERSHIP_PROVISION` — the permission that mints paid access without a payment — is not
> offered on the self-serve form and is granted only to vetted partners. Email
> [support@insy.io](mailto:support@insy.io) for that one, saying what you are building and which
> community it belongs to. Everything else you can issue yourself.
## Base URL
Every REST endpoint in these docs is relative to a single host. There is no version prefix in the
path.
```bash title="API base URL"
https://api.insy.io
```
The OAuth endpoints themselves — `authorize`, `token`, `revoke` and the resource endpoints —
are served from `api.insy.io` alongside the rest of the API. What lives on the storefront host
instead is the user-facing storefront, the consent screen the user sees during authorization,
and the `widget.js` login script:
```bash title="Storefront"
https://insy.io
```
> **There is no sandbox**
>
> Insy has one environment. Every call you make from these docs is live: real memberships, real
> charges, real Telegram invites. Test against a community you control, and use small amounts.
---
# AI and MCP
Source: https://docs.insy.io/developers/ai-and-mcp
Insy runs two [Model Context Protocol](https://modelcontextprotocol.io) (MCP) servers, and they do
different jobs:
- **The docs server** at `https://docs.insy.io/mcp` searches and reads this documentation — the
help center and the developer pages. It needs no sign-in.
- **The account server** at `https://api.insy.io/mcp` works on a live Insy account: memberships,
purchases, communities, products, payouts and support. It connects through a browser sign-in,
so you never put an API key in the client config.
Both speak the Streamable HTTP transport. Point the client at the URL; there is no `/sse`
endpoint.
## Docs server
The docs site serves it itself, next to the pages, with four read-only tools:
| Tool | What it does |
| --- | --- |
| `search_docs` | Full-text search over docs.insy.io. Each match has its title, route, content type and an excerpt. |
| `get_page` | One page as Markdown, by the route from `search_docs` or `list_pages` (for example `/developers/oauth`). |
| `list_pages` | Every page with its route, title and description. |
| `get_navigation` | The navigation tree: the header tabs and the sidebar under each. |
Clients that discover servers on their own find it at
[`/.well-known/mcp.json`](https://docs.insy.io/.well-known/mcp.json); the server card is at
`/.well-known/mcp/server-card.json`.
**Claude Code**
```bash
claude mcp add --transport http insy-docs https://docs.insy.io/mcp
```
**Cursor (.cursor/mcp.json)**
```json
{
"mcpServers": {
"insy-docs": { "url": "https://docs.insy.io/mcp" }
}
}
```
It serves only what docs.insy.io already publishes.
## Account server
**Claude Code**
```bash
claude mcp add --transport http insy https://api.insy.io/mcp
```
**Cursor (.cursor/mcp.json)**
```json
{
"mcpServers": {
"insy": { "url": "https://api.insy.io/mcp" }
}
}
```
### Transport
The server is stateless and answers every request with one JSON body: no sessions and no
server-sent event streams.
- **`POST /mcp` only.** `GET` and `DELETE` answer `405` with `Allow: POST`.
- **One message per request.** A JSON-RPC batch (an array) answers `400` before any of it runs.
- **Protocol versions.** Clients that open with `initialize` can use any version from `2024-11-05`
to `2025-11-25`; an unknown version is negotiated down to `2025-11-25`. Clients on `2026-07-28`
send the per-request `_meta` envelope instead and need no handshake. A `MCP-Protocol-Version`
header naming a version the server does not support answers `400`.
- **Headers.** `Content-Type` must be `application/json` (otherwise `415`), and `Accept` must list
both `application/json` and `text/event-stream` (otherwise `406`) — even though the reply is
always JSON.
A tool that asks for confirmation on this server has a `confirmationToken` property in its
`inputSchema`; the others do not.
### Connect from claude.ai or Grok
1. **Add a custom connector**
In claude.ai open **Settings → Connectors → Add custom connector**. In Grok, add a custom MCP
connector the same way.
2. **Enter the server URL**
`https://api.insy.io/mcp`. Leave the client ID and secret fields empty.
3. **Sign in and approve**
Your browser opens the Insy sign-in, then the consent screen listing what the connection asks
for. You can approve everything, keep it read-only, or set each resource to None, Read or
Write; the connection gets only what you leave on, and its tools are limited to that. Approve
to finish.
To see or end a connection later, open [Account → Connected apps](https://insy.io/account/connected-apps)
on insy.io. It lists every app you approved with its scopes, when you approved it and when it last
used a token. **Disconnect** removes your consent and revokes every token and pending authorization
code the app holds at once; to come back it has to ask you again. The same list is
`GET /oauth/connections` and `DELETE /oauth/connections/{clientId}` on the API, for a signed-in
Insy session — not for OAuth tokens or API keys.
### How sign-in works
The account server is an OAuth 2.1 resource server. A request without a token gets `401` with a
`WWW-Authenticate` header that points at `/.well-known/oauth-protected-resource/mcp`; from there
the client finds the authorization server metadata at
`https://api.insy.io/.well-known/oauth-authorization-server`.
Clients register themselves through **dynamic client registration** (RFC 7591) at
`POST https://api.insy.io/oauth/register`, so there is nothing to set up in the Insy app first.
Every client registered this way is public: it gets a `client_id` and no secret, and must use
PKCE (`S256`). Redirect URIs must use `https`, plain `http` to a loopback address (`127.0.0.1`,
`[::1]` or `localhost`, any port), or an app's own scheme such as `cursor://`.
Registration is limited at several levels:
| Limit | Over it |
| --- | --- |
| 5 a minute and 30 a day per IP address | `429` |
| 10 an hour per IP address | `503` with `temporarily_unavailable` |
| 5000 an hour for clients whose every redirect URI is `https` on `claude.ai`, `claude.com`, `chatgpt.com`, `grok.com` or a subdomain of one | `503` with `temporarily_unavailable` |
| 1000 an hour for every other client | `503` with `temporarily_unavailable` |
| 10,000 an hour overall | `503` with `temporarily_unavailable` |
Self-registered clients are cleaned up: one nobody approved within 24 hours is deleted, and so is
one that has neither been issued nor used a token for 90 days — by then every refresh token it held
has expired. Its consents and tokens go with it, and the client registers again on its next
connection.
The client always receives the code flow and refresh tokens: the registration response lists
`authorization_code` and `refresh_token` even if the request named fewer.
**Client ID metadata documents** — an `https` URL used as the `client_id` instead of registering —
are accepted only from a list pinned in Insy's code; today that is OpenAI Codex
(`https://chatgpt.com/oauth/codex/client.json`). Insy never fetches the document: any other URL
used as a `client_id` is an unknown client.
The consent screen shows the address the client will return to, and warns about every client Insy
has not verified. Grok, Claude and ChatGPT are recognised by where they send the user back: a
client whose every redirect URI is on `https://grok.com`, `https://claude.ai` or
`https://chatgpt.com` (exact host, no subdomains) is shown under that product's name, with no
warning. For any other client that **registered itself**, the warning says insy cannot confirm the
name it gave and names the host you will be sent to. Continue only if you started the connection
on that host.
When the client sends the RFC 8707 `resource` parameter — `https://api.insy.io/mcp`, the
`resource` the protected-resource metadata advertises — its tokens are bound to the account
server: the [Account API](/developers/api/v1) and the `/oauth/userinfo`, `/oauth/memberships` and
`/oauth/products` endpoints refuse them. Tokens issued without a `resource` work everywhere. Any other `resource` value is refused with `invalid_target`; see
[the OAuth reference](/developers/oauth/reference#post-oauthtoken).
If you want a client of your own instead — a fixed name and logo on the consent screen — register
it under [Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients)
and see [Sign in with Insy](/developers/oauth).
### What a connection can reach
The grant is the signed-in person's account. The tools are the [Account API](/developers/api/v1)
in another protocol: each one runs the same operation as its REST endpoint, with the same
[scope](/developers/oauth/scopes), validation and ownership checks. A token only sees the tools its
scopes cover; `tools/list` returns exactly those.
| Tool | REST endpoint | Scope |
| --- | --- | --- |
| `get_customer_overview` | `GET /v1/me` | `profile.read` |
| `list_memberships` | `GET /v1/me/memberships` | `memberships.read` |
| `get_telegram_join_link` | — (MCP only) | `memberships.write` |
| `cancel_subscription` | `POST /v1/me/memberships/{slug}/cancel` | `memberships.write` |
| `list_purchases` | `GET /v1/me/purchases` | `purchases.read` |
| `report_problem` | `POST /v1/me/reports` | `support.write` |
| `list_managed_communities` | `GET /v1/communities` | `communities.read` |
| `set_community_published` | `PATCH /v1/communities/{slug}` | `communities.write` |
| `find_community_member` | `GET /v1/communities/members` | `members.read` |
| `get_community_stats` | `GET /v1/communities/{slug}/stats` | `communities.read` |
| `list_community_activity` | `GET /v1/communities/{slug}/activity` | `members.read` |
| `list_community_members` | `GET /v1/communities/{slug}/members` | `members.read` |
| `list_community_payments` | `GET /v1/communities/{slug}/payments` | `earnings.read` |
| `list_access_plans` | `GET /v1/communities/{slug}/plans` | `communities.read` |
| `get_community_reviews` | `GET /v1/communities/{slug}/reviews` | `communities.read` |
| `list_managed_products` | `GET /v1/products` | `products.read` |
| `add_product_variant` | `POST /v1/products/{slug}/variants` | `products.write` |
| `set_product_published` | `PATCH /v1/products/{slug}` | `products.write` |
| `get_payout_status` | `GET /v1/payouts/accounts` | `earnings.read` |
| `create_support_case` | `POST /v1/support/cases` | `support.write` |
| `search_help` | `GET /v1/help/search` | `help.read` |
| `read_help_article` | `GET /v1/help/article` | `help.read` |
| `find_refundable_payments` | — (MCP only) | `refunds.write` |
| `refund_payment` | — (MCP only) | `refunds.write` |
A tool's `structuredContent.data` is the REST response's `data`. Tool arguments use the REST body's
field names; a slug the REST endpoint takes in the path is the `communitySlug` or `productSlug`
argument.
`get_telegram_join_link` has no REST endpoint. It returns a fresh personal invite link to the
Telegram group of a community the person is an active member of, and the link works like a
credential: the first Telegram account to open it joins as that person. So it needs
`memberships.write`, asks for confirmation, and is refused with `telegram_not_linked` when the Insy
account has no Telegram account connected yet — connect one in the Insy app first.
`find_refundable_payments` and `refund_payment` let the **owner** of a community refund a
customer's card payment. Find the customer by Insy user id, e-mail or Telegram user id; the first
tool lists their refundable payments in that community with a payment id. `refund_payment` refunds
the whole remaining amount, or `amountCents` of it, from the owner's Stripe balance (Insy's fee is
not returned), and can cancel the subscription the payment renewed (`cancelSubscription`). Every
refund asks for confirmation, and the most that can be refunded is what Stripe reports as still
refundable at that moment. Access is shortened and the payment marked refunded when Stripe reports
the refund. Crypto payments are refused with `unsupported_method`; an owner refunds at most 20
payments a day through these tools.
Each tool carries MCP annotations. `readOnlyHint` is set on the tools that only read.
`destructiveHint` is set only on `set_community_published`, `set_product_published`,
`cancel_subscription` and `refund_payment`, which overwrite, end or pay back something; tools that add
something new do not carry it. `idempotentHint` is set on the read-only tools and on the creates
deduplicated under [Retries](#retries).
Access tokens last one hour and refresh tokens 30 days. Calls share the account's
[rate limit](/developers/api/v1#rate-limits) with the REST API: 120 a minute and 3000 an hour.
The MCP server accepts OAuth tokens only; API keys work on the REST API. Removing the connector in
your client stops it from calling Insy, and disconnecting the app under
[Connected apps](https://insy.io/account/connected-apps) revokes its tokens.
### Confirming consequential operations
These tools run in two calls on the account server:
| Tool | Asks for confirmation |
| --- | --- |
| `set_community_published`, `set_product_published` | When the call would change the current state. |
| `add_product_variant` | When the product is already published, so the price goes live at once. |
| `cancel_subscription` | When there is an active subscription to cancel. |
| `create_support_case` | Always. |
| `report_problem` | When the community or product exists. |
| `get_telegram_join_link` | When the community exists. |
When a call would change nothing — the community is already in that state, there is no
subscription — the tool runs straight away and answers for itself (`unchanged`, `not_found`).
The first call changes nothing: it returns `confirmationRequired: true`, a `summary` of the effect,
a `confirmationToken` and `expiresInSeconds` (10 minutes). Show the summary to the person, and only
after they agree call the same tool again with the same arguments plus `confirmationToken`. A token
is single-use and bound to the account, the tool and the arguments; anything else returns
`confirmation_invalid`.
> **What a confirmation token proves**
>
> A token guarantees that exactly the arguments it was issued for run, and only once. It cannot
> prove that a person saw the summary: the token goes back to the MCP client, and from there to the
> model. Whether the person is asked is up to the client — show the `summary` and wait for an answer
> before sending the token.
If the confirmed call times out, retry it with the **same token and the same arguments**: for 10
minutes after the token was used, the retry gets what the first call came to instead of
`confirmation_invalid` — its result, the earlier identical create's result it was answered with,
or the same error if it failed. If the token's call waited on an identical call that was still
running, the retry gets that call's result once it finishes; if that call was refused before it
changed anything (for example missing billing details), the retry gets `action_not_completed` —
nothing was done, so ask the person again. While that call is still running, or its outcome is
unknown, the retry gets `action_pending`. It never runs twice.
### Retries
Tools that create something — `add_product_variant` and `create_support_case` — are idempotent
for 10 minutes: the same call with the same arguments returns the first result instead of creating
a duplicate. There is no idempotency key to manage; retrying a timed-out call is safe within that
window. (Over REST, where two identical creates may both be meant, you opt in with an
[`Idempotency-Key`](/developers/api/v1#retries-and-idempotency) header instead.)
Confirmations are an MCP step: the REST endpoints run in one call, because there the request comes
from code someone wrote on purpose, not from a model choosing a tool.
### Write budgets
Some writes reach people — the Insy team, a seller — so each account may run them only so often,
whatever the channel (MCP, the REST API or the Insy assistant):
| Tool | Budget |
| --- | --- |
| `create_support_case` | 5 an hour |
| `report_problem` | 5 a day (24 hours) |
| `get_telegram_join_link` | 10 an hour |
Over the budget the tool returns `tool_budget_exceeded` with roughly how many minutes to wait. A
retry that is answered from the idempotency or confirmation record does not count.
### Errors
A tool that fails returns `isError: true` with the code and message in `structuredContent`
(`error`, `message`). An unexpected failure is `failed`, and its message carries a reference you
can quote to Insy support. Do not retry it blindly: the operation may have partly run.
## When sign-in fails
| What you see | What happened |
| --- | --- |
| `invalid_redirect_uri` from `/oauth/register` | The client asked to return to an address that is not `https`, loopback `http` or an app scheme. |
| `code_challenge is required for public clients` | The client did not use PKCE. Every self-registered client must. |
| `temporarily_unavailable` from `/oauth/register` | A registration limit was reached. Try again later. |
| `invalid_grant` | The authorization code expired (it lives one minute) or was already used, or the refresh token is no longer valid — including after a reused refresh token revoked all of the app's tokens. Reconnect. |
| `invalid_target` | The client sent a `resource` other than `https://api.insy.io/mcp`, or one that differs from the resource the code or refresh token was issued for. |
| `invalid_token` on `/mcp` | The access token expired, or was revoked (for example by disconnecting the app). A client normally refreshes on its own; if not, reconnect. |
## Plain files for agents
Without an MCP client, [`/llms.txt`](https://docs.insy.io/llms.txt) indexes every page,
[`/llms-full.txt`](https://docs.insy.io/llms-full.txt) has all of them in one file, and adding
`.md` to any page URL returns its Markdown.
## Newsletter drafts
The account MCP server supports newsletter preparation for accounts with newsletters enabled.
Request `newsletters.read` for reading and `newsletters.drafts.write` for preparing drafts.
Existing tokens need a new consent grant for these permissions.
| Tool | Purpose |
| --- | --- |
| `list_newsletters` | Paginated newsletter summaries owned by the signed-in account. |
| `get_newsletter` | Content, status and a link to review in the panel. |
| `get_newsletter_stats` | Aggregate delivery and engagement results. Delivery does not prove inbox placement. |
| `get_newsletter_clicked_links` | Aggregate results per link. |
| `get_newsletter_readiness` | On-demand audience and sending-blocker check; does not send. |
| `create_newsletter_draft` | Create a draft with a name, subject and preheader. |
| `update_newsletter_draft` | Edit a draft's name, subject and preheader. |
| `send_newsletter_test` | Send a proof to the verified account email; requires separate `newsletters.test.send` consent. |
| `import_newsletter_html` | Replace draft content with a complete HTML email and optional plain text; return validation findings. |
The HTML import switches the draft to raw HTML mode and replaces its editor document.
Include the required footer and unsubscribe markup. Invalid content can be saved for editing,
but validation errors block sending. Creating a draft can inherit sender defaults from the
account's previous newsletter; review the sender and audience in the panel.
Draft permissions cannot send, schedule, delete newsletters, or change recipient
lists. A separate `newsletters.test.send` permission exposes `send_newsletter_test`: one
real SES email with a `[TEST]` subject prefix to the authenticated owner's verified email
only. The tool accepts no recipient address, is limited to three calls per hour, and
does not change campaign status or create a recipient snapshot. This scope is off by
default on consent. Use a proof only when the owner requests it. After an uncertain
delivery, check the inbox before retrying; reuse the same `expectedReviewRevision` from `get_newsletter`. Repeats of the same
newsletter/revision are deduplicated for ten minutes; an edited revision sends a new
proof. Stale revisions are rejected before SES is called. Scheduled and sent newsletters cannot be edited. **The account owner reviews and sends
from the newsletter panel.** Only the account MCP exposes these tools; they are not part of the
admin MCP, the REST Account API, the embedded assistant or Chatwoot.
### Images and owner review
Photos, banners and screenshots can be included with standard HTML `img` elements and
HTTPS URLs on `cdn.insy.io`. External resource hosts, `srcset`, CSS imports and embedded
images are rejected for raw HTML, including Outlook backgrounds. Review frames also
block external resources through CSP. The newsletter editors upload images using the `mailing_content`
target to the public Cloudflare R2 bucket, served through `cdn.insy.io`. Use the permanent
URL returned by that upload, with descriptive `alt` text and responsive sizing. The admin
editor uses the CDN image resizer to deliver a smaller JPEG. Do not embed local paths,
blob URLs, CID attachments or base64 data; the raw newsletter sender does not attach files.
The MCP HTML importer accepts existing image URLs; it does not upload binary images.
`get_newsletter_readiness` is limited to ten calls per account per hour. Clicked links are
paginated. The HTML-import request and newsletter-content response have a 5 MiB transport
cap; ordinary MCP calls retain their smaller limits. HTML remains limited to 500,000
characters and plain text to 200,000. Existing rendered-email size checks still apply.
Before sending or scheduling in either panel, the owner sees a frozen, server-rendered content preview using the same body renderer as SES (with
placeholder personalization and no tracking).
The request includes its `expectedReviewRevision`. The backend compares it again under a
database row lock before queuing recipients. If content, sender or audience selection
changed, the owner must open a new preview. Draft tools do not request confirmation for
each edit; they still cannot send or schedule. The permission covers the account's drafts,
including drafts created manually.
Existing dynamically registered OAuth clients may need re-registration or an explicit
update of their allowed scopes before requesting newsletter consent. Existing tokens are
never upgraded automatically. Administrator read access starts switched off on consent.
## INSY Discord editorial posts
`publish_insy_discord_post` requires explicit `editorial.discord.publish` consent and a
current super administrator role. It is only available on the isolated `/admin/mcp` endpoint, through a separate
editorial connection. It grants no `admin.read` access; ordinary `/mcp` exposes no
publishing tool. The scope is
excluded from default client registration and is switched off by default on consent;
request it explicitly when registering the editorial client for `/admin/mcp`.
The only destinations are INSY's `news` and `changelog` channels, checked against the
platform guild before posting. Supply the title, description, product/docs link and
optional `cdn.insy.io` image. Changelog posts must link to `docs.insy.io`.
The first call returns a full preview and `confirmationToken`. Show the exact post and
channel to the owner and wait for explicit approval, then repeat identical arguments
with that token. Approval of a newsletter or docs publication is not Discord approval.
The server binds the token to the user, tool and arguments; the client must obtain the
human's decision rather than automatically consuming the token. No routine may publish.
Posts use the existing platform bot, suppress all mentions, and do not crosspost to
followers. They are limited to five per account per hour and identical retries are
deduplicated. On an unknown delivery outcome, check the channel before retrying. No
Discord token or webhook is given to the agent. The platform bot must already have
View Channel, Send Messages and Embed Links permissions in both destination channels.
---
# REST API
Source: https://docs.insy.io/developers/api
The Insy REST API lets you provision memberships, open hosted checkout sessions and sign
people up for drops from your own funnel, storefront or backoffice. It speaks JSON over
HTTPS, authenticates with an API key, and has no SDK — every example here is plain HTTP you
can port to whatever your stack already uses.
## Base URL
```text title="Base URL"
https://api.insy.io
```
Send `Content-Type: application/json` on requests with a body, and read the response as
JSON. The API-key endpoints are unversioned — no version prefix, no version header — and only
ever grow, so write clients that ignore unknown response fields rather than ones that fail on
them. Endpoints that act on one account — with an OAuth token, or an API key that has account
scopes — live under `/v1`: see [Account API (v1)](/developers/api/v1).
> **No sandbox**
>
> There is no test environment. Requests hit live data, so develop against a community you
> own and use throwaway values.
## The response envelope
Most endpoints wrap their payload in a `BaseResponse`: a success carries `data`, a failure
carries `errorCode` and usually `message`. Keys that do not apply are usually omitted, but
some endpoints send `data: null` on failure instead — so don't test for the `data` key,
check the field you actually need with a positive test like `data?.link`.
```json title="Success"
{
"success": true,
"data": {
"status": "created"
}
}
```
```json title="Failure"
{
"success": false,
"errorCode": "not_found",
"message": "Community not found"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `success` | boolean | `true` when the call did what you asked. |
| `data` | object | The payload. Omitted or `null` on failure — check the field you need, e.g. `data?.link`. |
| `errorCode` | string | A short machine-readable code, e.g. `not_found`. Omitted on success. |
| `message` | string | A human-readable explanation. Often omitted on success. |
Type every key as optional. Check the HTTP status first, then `success`, then read `data` —
see [Errors](/developers/api/errors) for the status codes and the different shape that
validation and auth failures use.
> **OAuth endpoints do not use the envelope**
>
> The OAuth token, revoke, userinfo, memberships and products endpoints return bare
> RFC-shaped JSON — no `success`/`data`/`errorCode` wrapper. The one exception is
> `GET /oauth/client/{clientId}`. See [Sign in with Insy](/developers/oauth).
## Next
- **[API keys](/developers/api/authentication)** — Key format, how to get one, permissions and the rules that decide whether a call is allowed.
- **[Endpoints](/developers/api/endpoints)** — The five endpoints an API key can call, with parameters and examples.
- **[Errors](/developers/api/errors)** — Status codes, the error envelope and the usual causes.
- **[Account API (v1)](/developers/api/v1)** — Act on an account with an OAuth token or an API key — the same operations as the MCP server.
- **[Webhooks](/developers/webhooks)** — Receive membership, payment and digital-product events on your own endpoint.
---
# API keys
Source: https://docs.insy.io/developers/api/authentication
Server-to-server calls to the Insy REST API authenticate with an API key. A key carries a
fixed set of permissions and belongs to a person, so what it can do is the intersection of
its permission bits and that person's role in the community you name.
## What a key looks like
A key is the prefix `insy_` followed by 32 lowercase hexadecimal characters — 16 random
bytes rendered as hex.
```text title="Example key"
insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a
```
Insy stores only an unsalted SHA-256 digest of the key. The plaintext is displayed exactly
once, at creation, and cannot be recovered afterwards. Copy it into your secret store the
moment you receive it; if you lose it, the only remedy is a new key.
## Getting a key
You issue your own keys from
[**Account → Developer → API keys**](https://insy.io/account/developer/api-keys) — create one,
pick its permissions, pin it to your servers' IPs, rotate its secret and revoke it, without
asking anyone.
1. **Create the key**
Open [API keys](https://insy.io/account/developer/api-keys) and press **Create key**. Give
it a name you will recognise in six months — the name is all you see in the list, since the
secret never appears again.
2. **Pick the permissions**
Tick the ones from the [table below](#permissions) your integration actually needs rather
than all of them. `MEMBERSHIP_WRITE` covers the external join-Telegram funnel; add
`CHECKOUT_WRITE` only if you also open hosted checkout sessions. The privileged permission
is not offered on this form at all — see
[Privileged permissions](#privileged-permissions).
3. **Restrict it to your servers**
Optional, and worth doing: list the public egress IPs your backend calls from, so a leaked
key is useless anywhere else. See [IP allowlist](#ip-allowlist).
4. **Store the plaintext**
The key is shown once, when you press create. Put it in your secret manager or environment
before you close the dialog.
A key belongs to your **account**, not to one community: it reaches every community where that
account holds an active OWNER or ADMIN membership, and no others. See
[Community role](#community-role-is-checked-separately) below.
> **Permissions and the allowlist are set once**
>
> A key's own screen offers rotate and revoke, not edit. To widen a key's permissions or change
> its IP allowlist, create a replacement and revoke the old one — rotation only swaps the secret.
## Sending a key
Put the key in the `Authorization` header as a bearer token.
```http title="Authorization header"
Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a
```
There is no `x-api-key` header. A request without the `Authorization` header, or with a key
that is unknown or revoked, is rejected with `401`.
> **Do not use the query-string form**
>
> The bearer strategy underneath also accepts the key as an `access_token` query parameter or
> body field. Do not use either: a key in a URL leaks into access logs, proxy history and
> browser history, and it never expires. Always send the `Authorization` header.
**curl**
```bash
curl -X POST https://api.insy.io/membership/provision-external \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a" \
-H "Content-Type: application/json" \
-d '{
"communityId": "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
"externalOrderId": "order_10241",
"email": "buyer@example.com"
}'
```
**Node.js**
```js
// Built-in fetch — Node 18 or newer, no dependencies.
const response = await fetch("https://api.insy.io/membership/provision-external", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INSY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
communityId: "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
externalOrderId: "order_10241",
email: "buyer@example.com",
}),
});
const body = await response.json();
if (!response.ok || !body.success) {
throw new Error(`${body.errorCode ?? response.status}: ${body.message ?? "request failed"}`);
}
console.log(body.data);
```
## Permissions
Permissions are a bitmask. Each permission is a power of two, and a key stores the bitwise
OR of everything it was granted. Every bit has a readable **scope string** — the same grant
in a friendlier form.
| Permission | Value | Scope string | Unlocks |
| --- | --- | --- | --- |
| `MEMBERSHIP_READ` | 1 | `membership.read` | `GET /membership/check-telegram/{communityId}/{telegramUserId}` |
| `MEMBERSHIP_WRITE` | 2 | `membership.write` | `GET /membership/join-telegram-community-external/{externalId}` |
| `CHECKOUT_WRITE` | 4 | `checkout.write` | `POST /api/checkout/buy-plan` |
| `DROP_NOTIFICATION_WRITE` | 8 | `drop_notification.write` | `POST /api/drop-notification/signup` |
| `MEMBERSHIP_PROVISION` | 16 | `membership.provision` | `POST /membership/provision-external` — **private**, see below |
So a key with value `3` holds `MEMBERSHIP_READ` and `MEMBERSHIP_WRITE`; a key with all four
**standard** permissions stores `15`. Ask for the smallest set that covers your integration —
a key you issue for a checkout page has no reason to also write memberships.
## Account scopes
A key can also carry **account scopes** — the [OAuth scopes](/developers/oauth/scopes), such as
`products.write` or `purchases.read` — which let it call the [Account API (v1)](/developers/api/v1)
on its owner's own account, exactly as an OAuth token with those scopes could. Pick them in the
**Account API (v1)** section of the key form, or send them as `accountScopes` when creating a key.
The two sets are separate. Permission bits work only on the endpoints in the table above, and
account scopes only on `/v1`: a key with `membership.read` cannot read `/v1/me/memberships`
without `memberships.read` as an account scope. A key needs at least one of either.
## Privileged permissions
`MEMBERSHIP_PROVISION` (value `16`) is a **privileged** permission. It unlocks
`POST /membership/provision-external`, which mints paid community access without a payment,
so it is granted only to vetted partners — request it from support@insy.io.
It sits deliberately **outside** the standard set. `provision-external` requires
`MEMBERSHIP_WRITE` **and** `MEMBERSHIP_PROVISION` together, so a broad key that holds every
standard permission (`15`) still gets a `403` there until the provision bit is added on top.
This is intentional: provisioning is never unlocked by breadth alone, only by an explicit,
separately-granted permission.
## Community role is checked separately
Whenever a request carries a `communityId` — in the body or in the path — the permission bit
is not enough on its own. The person who owns the key must also hold an active **OWNER** or
**ADMIN** membership in that community.
If the bit is set but the role is not, the request fails with `403`. This is the most common
surprise when a key that works against one community is pointed at another.
> **Two independent checks**
>
> A `MEMBERSHIP_WRITE` key works against every community its owner administers, and none of
> the others — the permission bit and the community role are checked independently.
## Lifetime and revocation
Keys you create yourself have no expiry date, and there is no rotation deadline — a key keeps
working until you rotate or revoke it. (The backend does honour an expiry when one is set, but
the self-serve form does not offer the field.)
Revocation is a soft disable: the key is marked inactive and stops authenticating
immediately, on the next request. Nothing it created is rolled back, and memberships it
provisioned stay in place.
## Rotation
Press **Rotate** on a key in
[API keys](https://insy.io/account/developer/api-keys). Rotation issues a new secret for the
same key — its name, permissions and IP allowlist are unchanged — and the plaintext is shown
once, exactly like at creation. The old secret stops working the moment you rotate, so deploy
the new one to a place it can be swapped in quickly, then rotate.
The list shows a **Last used** timestamp per key, so you can tell a live key from a forgotten
one before you retire it. It is written at most once a minute, so treat it as "used recently",
not as a call counter — there is no per-request log.
## IP allowlist
A key can be pinned to a set of source addresses. Leave the allowlist empty and the key works
from anywhere; add entries and every other source address is rejected with `401`.
Each entry is an exact IP or an IPv4 CIDR range:
```text title="Allowed IPs"
203.0.113.7
203.0.113.0/24
```
The source address is taken from the proxy chain in front of the API (the same one the rate
limiter trusts), so put your server's public egress IP here — not a private `10.x`/`192.168.x`
address, which never appears as the source. If a restricted key stops working after an
infrastructure change, its egress IP has almost certainly moved.
## Security
> **Never ship a key to a browser or mobile app**
>
> An API key is a bearer credential with no origin restriction and no user binding. Anything
> that holds it can act as you, in every community you administer, until it is revoked.
> Bundled JavaScript, mobile binaries, public repositories and CI logs all count as
> published. If you need a browser-side flow, use
> [Sign in with Insy](/developers/oauth) instead — it is designed for untrusted front ends.
- **Server-side only.** Call the API from your backend and expose your own endpoint to your
front end.
- **Keep it out of source control.** Read it from the environment or a secret manager.
Never commit it, and never paste it into a support ticket or an issue.
- **Keep it out of URLs.** Send it in the `Authorization` header only, never as a query
parameter, so it does not end up in logs you do not control.
- **Scope it down.** Request only the permission bits your integration needs.
- **Rotate on suspicion.** If a key may have leaked, rotate it yourself — the old secret dies
immediately, and the replacement keeps the same permissions and
[IP allowlist](#ip-allowlist).
## Operational notes
- Requests authenticated with an API key bypass the platform's request-signature
requirement, so there is nothing extra to compute or sign.
- Requests to the endpoints above are not rate limited by the application. Be a good citizen
anyway: retry with backoff rather than hammering, and use the idempotency contract described
in [Endpoints](/developers/api/endpoints) so a retry cannot double-provision. Calls to `/v1`
with account scopes are limited per account — see
[Rate limits](/developers/api/v1#rate-limits).
- The only usage signal is the **Last used** timestamp, throttled to one write a minute.
There is no per-request log, so keep your own record of the calls you make if you need an
audit trail.
---
# Endpoints
Source: https://docs.insy.io/developers/api/endpoints
An API key can call five endpoints. This is the complete list — nothing else on
`https://api.insy.io` accepts key authentication.
| Endpoint | Permission |
| --- | --- |
| `POST /membership/provision-external` | `MEMBERSHIP_WRITE` + `MEMBERSHIP_PROVISION` (private) |
| `GET /membership/join-telegram-community-external/{externalId}` | `MEMBERSHIP_WRITE` |
| `GET /membership/check-telegram/{communityId}/{telegramUserId}` | `MEMBERSHIP_READ` |
| `POST /api/checkout/buy-plan` | `CHECKOUT_WRITE` |
| `POST /api/drop-notification/signup` | `DROP_NOTIFICATION_WRITE` |
Every request carries `Authorization: Bearer insy_...`. Responses use the
[BaseResponse envelope](/developers/api#the-response-envelope), so the payloads below are what you find
under `data`.
> **Community role**
>
> Every endpoint that takes a `communityId` also requires the key owner to hold an active
> OWNER or ADMIN membership in that community. The permission bit alone is not enough — see
> [API keys](/developers/api/authentication).
## POST `/membership/provision-external`
**Permission:** `MEMBERSHIP_WRITE` **and** `MEMBERSHIP_PROVISION` (a privileged,
separately-granted permission), plus OWNER or ADMIN in `communityId`. See
[Privileged permissions](/developers/api/authentication#privileged-permissions).
Provisions a community membership from an external funnel. Insy finds the user by the
identifier you supply, creates the user if there is no match, and grants or adjusts their
membership in the community.
Use this when the sale happened somewhere else — your own checkout, a course platform, a
manual bank transfer — and you want Insy to be the system of record for access.
### Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `communityId` | uuid | yes | The community to provision into. |
| `externalOrderId` | string | yes | Your identifier for the order. Acts as the idempotency key. |
| `email` | string | no | The buyer's email. Supply this or `telegramUserId`. |
| `telegramUserId` | integer | no | The buyer's numeric Telegram user ID. Supply this or `email`. |
| `pricingPlanId` | uuid | no | The pricing plan the membership should be attached to. |
| `validFrom` | ISO-8601 | no | When access starts. Defaults to now, and is ignored on a first provision — see below. |
| `validUntil` | ISO-8601 | no | When access ends. Omit for a lifetime membership. |
| `onOverlap` | string | no | `extend`, `replace` or `error`. Defaults to `extend`. |
Identify the user with `email` or `telegramUserId`. If you have both, sending both gives
Insy the best chance of matching an existing person rather than creating a second one.
> **validFrom is ignored when the membership is created**
>
> `validFrom` is honoured only when the buyer already has a membership row in this community.
> On a first provision — the call that answers `"status": "created"` — access starts at the
> moment of the call, whatever you sent. Read `data.validFrom` in the response to see what was
> actually stored.
### Idempotency
`externalOrderId` is the idempotency key, and the guarantee is narrower than the name
suggests. Insy keeps no ledger of the order IDs it has processed. It stores the ID on the
buyer's membership row for that community and compares against that single value, so a
replay is recognised only while it is still the most recent provision for the same buyer in
the same community. When it is recognised, the existing membership is returned untouched
with `status` set to `idempotent_return`.
If your request times out, your webhook handler runs twice, or a queue redelivers a job,
send exactly the same `externalOrderId` again and the buyer ends up with one membership.
Two replays are **not** protected, and both provision again:
- Replaying order A after you have provisioned order B for the same buyer and community.
The stored ID is now B's, so A no longer matches.
- Sending the same `externalOrderId` with a different `email` or `telegramUserId`. That
resolves to a different buyer, whose membership row has never seen the ID.
> **Make the key stable and unique**
>
> Derive `externalOrderId` from something durable on your side — your order ID, your payment
> intent ID — not from a timestamp or a random value generated at call time. A fresh value on
> every attempt defeats the protection and provisions repeatedly.
### Overlap strategies
`onOverlap` decides what happens when the user already has a membership in this community
that overlaps the window you are asking for.
| Value | Behaviour |
| --- | --- |
| `extend` | Default. Keeps whichever window ends later — your `validUntil` or the existing one. If either side is open-ended the membership becomes lifetime. |
| `replace` | Discards the existing window and applies yours. |
| `error` | Refuses the request with `409` rather than touching the existing membership. |
`extend` does not add your period to the time remaining. Send the absolute end date you
want, not a duration to add: a `validUntil` 30 days out for a member with 20 days left
leaves that member with 30 days in total, not 50. Compute the new end date from the existing
one on your side if you need the two to accumulate.
`onOverlap` only comes into play when the existing membership is still active. An expired
membership is overwritten with the window you send whichever strategy you choose.
Pick `extend` for renewals and top-ups, `replace` when your system is the authority on the
access window, and `error` when an overlap means something has gone wrong upstream and you
would rather investigate than guess.
### Lifetime memberships
Omit `validUntil` entirely to grant lifetime access. Do not send `null` or a far-future
date — the absence of the field is the signal.
### Result statuses
The response reports what actually happened.
| Status | Meaning |
| --- | --- |
| `created` | The buyer had no membership row in this community. |
| `extended` | A membership row existed and was active. |
| `replaced` | A membership row existed but had lapsed. |
| `idempotent_return` | The `externalOrderId` matches the one stored on the buyer's membership; it is returned unchanged. |
`status` describes the state of the buyer's membership before the call, not the strategy you
sent. An `onOverlap: "replace"` request against an active membership still reports
`extended`, and an `onOverlap: "extend"` request against a lapsed one reports `replaced`.
Use it to tell a first purchase from a renewal, not to confirm which strategy ran.
### Request
**curl**
```bash
curl -X POST https://api.insy.io/membership/provision-external \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a" \
-H "Content-Type: application/json" \
-d '{
"communityId": "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
"externalOrderId": "order_10241",
"email": "buyer@example.com",
"pricingPlanId": "a91f0c46-5d3b-4e88-9a72-1f6b0d4c8e37",
"validFrom": "2026-09-01T00:00:00.000Z",
"validUntil": "2026-10-01T00:00:00.000Z",
"onOverlap": "extend"
}'
```
**Node.js**
```js
const provision = async (order) => {
const response = await fetch("https://api.insy.io/membership/provision-external", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INSY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
communityId: "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
// Stable per order, so a retry cannot provision twice.
externalOrderId: order.id,
email: order.buyerEmail,
validFrom: order.paidAt,
validUntil: order.accessEndsAt,
onOverlap: "extend",
}),
});
const body = await response.json();
if (!response.ok || !body.success) {
throw new Error(`${body.errorCode ?? response.status}: ${body.message}`);
}
return body.data;
};
```
### Response
```json title="Response"
{
"success": true,
"data": {
"membershipId": "7c1d0a58-4b2e-4f39-8e6a-05c9f2b7d413",
"userId": "e4a2b915-83c7-4d60-9f1e-6b0a37c5d284",
"validFrom": "2026-09-01T00:00:00.000Z",
"validUntil": "2026-10-01T00:00:00.000Z",
"status": "created"
}
}
```
| Field | Type | Description |
| --- | --- | --- |
| `membershipId` | uuid | The membership that was created or updated. This is the only handle you ever get on it — store it against your order. |
| `userId` | uuid | The Insy user the membership belongs to, matched or created from the identifier you sent. |
| `validFrom` | ISO-8601 | When access actually starts, as stored. On a first provision this is the time of the call, not the `validFrom` you sent. |
| `validUntil` | ISO-8601 or null | When access ends. `null` for a lifetime membership. |
| `status` | string | What state the membership was in — see [Result statuses](#result-statuses). |
A recognised repeat of the same `externalOrderId` returns the same five fields with
`"status": "idempotent_return"` and the membership exactly as it already stands.
> **Lifetime example**
>
> Send the same body without `validUntil`:
>
> ```json
> {
> "communityId": "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
> "externalOrderId": "order_10242",
> "email": "buyer@example.com"
> }
> ```
## GET `/membership/join-telegram-community-external/{externalId}`
**Permission:** `MEMBERSHIP_WRITE`.
Returns a fresh Telegram invite link for a checkout session you opened with
`POST /api/checkout/buy-plan`, along with the timestamp at which the link expires.
`externalId` is the value you sent to buy-plan — not the `externalOrderId` from
`provision-external`. Insy resolves the checkout reservation by that value, and the link is
available only once the buyer's payment has completed and the reservation has been turned
into a membership. Before that you get `404` with "Membership not found, membership has not
been processed yet". Memberships created with `provision-external` have no reservation
behind them and cannot be used here at all.
Call this at the moment you are about to show the buyer their invite. The link expires 24
hours after it is minted and is bound to the buyer's Telegram account — a join request from
any other Telegram account is rejected. If more than a day has passed, call the endpoint
again for a new one.
### Parameters
| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `externalId` | path | string | yes | The `externalId` you sent to `POST /api/checkout/buy-plan`. |
### Request
```bash title="curl"
curl https://api.insy.io/membership/join-telegram-community-external/lead_88213 \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a"
```
### Response
```json title="Response"
{
"success": true,
"data": {
"link": "https://telegram.me/joinchat/AAAAAE1z7Kq9Rr0pXv3Ttw",
"expiresAt": "2026-09-02T10:00:00.000Z"
}
}
```
Present `link` to the buyer immediately and do not cache it past `expiresAt` — 24 hours
after the call.
> **Not every failure here is a non-2xx**
>
> If the community has no Telegram bot configured, this endpoint answers HTTP `200` with
> `"success": false` and the message `Telegram bot not setup`, with `data` set to `null`.
> Check for `data?.link` rather than trusting the status code alone — reading `data.link`
> without the optional chain throws on that failure path. See [Errors](/developers/api/errors).
## GET `/membership/check-telegram/{communityId}/{telegramUserId}`
**Permission:** `MEMBERSHIP_READ`, plus OWNER or ADMIN in `communityId`.
Reports whether a given Telegram user currently holds an active membership in the community.
Use it to gate something on your own side — a support form, a private feed, a bot command —
without mirroring Insy's membership state into your database.
### Parameters
| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `communityId` | path | uuid | yes | The community to check. |
| `telegramUserId` | path | integer | yes | The numeric Telegram user ID. |
### Request
```bash title="curl"
curl https://api.insy.io/membership/check-telegram/3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953/482910375 \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a"
```
### Response
```json title="Response"
{
"success": true,
"data": {
"isActive": true,
"membershipId": "7c1d0a58-4b2e-4f39-8e6a-05c9f2b7d413"
}
}
```
`membershipId` is `null` when there is no active membership. This is a point-in-time answer —
a membership that expires a minute later still reads as active. For state changes as they
happen, subscribe to [membership webhooks](/developers/webhooks/events) instead of polling.
## POST `/api/checkout/buy-plan`
**Permission:** `CHECKOUT_WRITE`, plus OWNER or ADMIN in `communityId`.
Creates a hosted checkout session and returns the URL to send the buyer to. Insy handles
payment, the membership grant and the receipts; you handle the redirect.
### Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `pricingPlanId` | uuid | yes | The plan being bought. |
| `communityId` | uuid | yes | The community the plan belongs to. |
| `externalId` | string | yes | Your own identifier for the buyer. Reuse it later to fetch the Telegram invite. |
| `email` | string | yes | The buyer's email. Lower-cased and trimmed. |
| `successUrl` | url | yes | Where to send the buyer after a completed payment. |
| `cancelUrl` | url | yes | Where to send the buyer if they abandon checkout. |
| `utmSource` | string | no | Max 100 characters. Shown in Insy purchase reporting. |
`email` is not a pre-fill. It is the identity the checkout is bound to: Insy resolves it to
an existing user or creates one, and the membership from the completed payment lands on that
account. The published OpenAPI schema marks the field optional, but the endpoint rejects a
body without it.
Set `utmSource` to the campaign, page or partner that produced the click — it is the only
way to attribute a sale created this way back to its origin in Insy's purchase reporting.
> **buy-plan does not signal failure through the status code**
>
> Once the request passes validation and auth, buy-plan reports its own failures inside a
> `201` — so past that point neither the status nor `success` is a reliable check. An unknown
> `pricingPlanId` returns `"success": true` with an empty `data` and no `checkoutUrl`. A
> missing `email` returns `"success": false` with a `message` and no `errorCode`, still with
> status `201`. Treat a missing `data.checkoutUrl` as the failure signal and read `message`
> for the reason.
>
> A malformed or unauthorized request never reaches that path. A non-URL `successUrl` or
> `cancelUrl`, a malformed UUID, or a missing `externalId` is rejected by the validator with
> `400`; a missing or invalid key returns `401`; and a key without `CHECKOUT_WRITE`, or whose
> owner is not OWNER or ADMIN of the community, returns `403`.
### Request
**curl**
```bash
curl -X POST https://api.insy.io/api/checkout/buy-plan \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a" \
-H "Content-Type: application/json" \
-d '{
"pricingPlanId": "a91f0c46-5d3b-4e88-9a72-1f6b0d4c8e37",
"communityId": "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
"externalId": "lead_88213",
"successUrl": "https://shop.example/thanks",
"cancelUrl": "https://shop.example/pricing",
"email": "buyer@example.com",
"utmSource": "newsletter-september"
}'
```
**Node.js**
```js
const response = await fetch("https://api.insy.io/api/checkout/buy-plan", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INSY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
pricingPlanId: "a91f0c46-5d3b-4e88-9a72-1f6b0d4c8e37",
communityId: "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
externalId: lead.id,
successUrl: "https://shop.example/thanks",
cancelUrl: "https://shop.example/pricing",
email: lead.email,
utmSource: "newsletter-september",
}),
});
const body = await response.json();
// buy-plan answers 201 even when it failed, so the URL is the only signal.
const url = body?.data?.checkoutUrl;
if (!url) {
throw new Error(body?.message ?? "checkout session was not created");
}
// Redirect the buyer to url.
```
### Response
```json title="Response"
{
"success": true,
"data": {
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_live_9d2f7a136c404b8ea1f53e07b9c2d846"
}
}
```
Redirect the buyer to `checkoutUrl`. Do not treat the redirect to `successUrl` as proof of
payment — a buyer can reach that URL by hand. Confirm with the
[`payment.success` webhook](/developers/webhooks/events).
## POST `/api/drop-notification/signup`
**Permission:** `DROP_NOTIFICATION_WRITE`, plus OWNER or ADMIN in `communityId`.
Signs an email address up for a community's next upcoming drop slot, so the person is
notified when that drop opens. An optional phone number can be captured alongside it.
Use it behind a waitlist form on your own landing page when a community sells in limited
drops.
> **Addresses that already have an Insy account are skipped**
>
> If the email already belongs to an Insy user, no signup is created. The call still answers
> `201` with `"success": true`, but `data.signedUp` is `false` and `data.hasExistingAccount`
> is `true`. The lookup is global across Insy rather than scoped to your community, so any
> address that has ever registered is dropped this way. Always read `data.signedUp` — the
> status code and `success` will not tell you.
### Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `communityId` | uuid | yes | The community whose next drop the person is joining. |
| `email` | string | yes | The address to notify. |
| `phoneNumber` | string | no | An optional phone number for the same signup. |
### Request
```bash title="curl"
curl -X POST https://api.insy.io/api/drop-notification/signup \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a" \
-H "Content-Type: application/json" \
-d '{
"communityId": "3b7d1f42-9c8a-4e51-b0d6-2a4f8e7c1953",
"email": "waitlist@example.com",
"phoneNumber": "+48500100200"
}'
```
### Response
```json title="Response"
{
"success": true,
"data": {
"signedUp": true,
"hasExistingAccount": false,
"dropSlotInfo": {
"id": "5f8c2b41-9a70-4e2d-b3c8-71e0d6a4f925",
"slots": 200,
"slotsUsed": 137,
"availableSlots": 63,
"startsAt": "2026-09-15T18:00:00.000Z",
"endsAt": null,
"isCurrentlyActive": false
}
}
}
```
| Field | Type | Description |
| --- | --- | --- |
| `signedUp` | boolean | Whether a signup was recorded. `false` when the address already has an Insy account. |
| `hasExistingAccount` | boolean | `true` when the address was skipped for that reason. |
| `dropSlotInfo` | object | The drop slot the signup was aimed at, including its start and its remaining slots. `slots` and `availableSlots` are `null` for an unlimited drop. |
`dropSlotInfo` also carries a `dropNotification` field (a notification object, or `null`) and
sometimes a `userHasNotification` boolean. Both are internal bookkeeping the client can
ignore.
The signup targets the community's next upcoming drop slot, resolved at the time of the
call. There is no way to name a specific future drop. Signing the same address up twice for
the same drop returns `409` with `errorCode` `already_exists`.
## Next
- **[Errors](/developers/api/errors)** — What the failure statuses mean and what usually causes them.
- **[Webhooks](/developers/webhooks)** — Get told when memberships and payments change, instead of polling.
---
# Errors
Source: https://docs.insy.io/developers/api/errors
Failures come back in one of two body shapes, depending on where in the request the failure
happened. Branch on the HTTP status first, then read whichever body you got. `success` is
present in both.
## Rejected before the endpoint runs
A key that fails authentication, a body the validator refuses, a permission bit or community
role that says no — these are raised before the endpoint's own code runs and are serialised
by the global exception filter:
```json title="Rejected request"
{
"success": false,
"message": "Unauthorized",
"statusCode": 401,
"timestamp": "2026-09-01T10:15:30.000Z",
"path": "/membership/provision-external"
}
```
There is no `errorCode` and no `data` key at all. This is the shape behind almost every
`400`, `401` and `403`.
## Returned by the endpoint
Failures the endpoint decides on itself come back in the `BaseResponse` envelope:
```json title="Failure envelope"
{
"success": false,
"errorCode": "not_found",
"message": "Community not found",
"correlationKey": "0e9a1c47f2b84d6a",
"logUrl": "https://observability.insy.io/explore?..."
}
```
| Field | Type | Description |
| --- | --- | --- |
| `success` | boolean | Always `false` on failure. |
| `errorCode` | string | A short machine-readable code, for example `not_found`. |
| `message` | string | A human-readable explanation, safe to log. |
| `correlationKey` | string | The trace ID for the request. Quote it when you report a problem. |
| `logUrl` | string | An Insy-internal log link for the same trace. You cannot open it; pass it on unchanged. |
`data` is omitted rather than sent as `null`. `correlationKey` and `logUrl` are present only
when the request carried a trace ID, so treat both as optional.
> **Treat errorCode as opaque**
>
> Codes are short lowercase snake_case strings — `not_found`, `bad_request`, `unauthorized`,
> `forbidden`, `already_exists`, `internal_server_error` among others — and the set grows as
> endpoints are added. A comparison against `"NOT_FOUND"` never matches. Do not build control
> flow on an exhaustive list either: switch on the HTTP status, and keep `errorCode` and
> `message` for logs and support tickets.
Do not show `message` to end users verbatim. It is written for developers and can name
internal concepts.
## Status codes
| Status | Meaning | What to do |
| --- | --- | --- |
| `400` | Validation failed. A required field is missing, malformed, or outside its allowed values. | Fix the request. Retrying the same body will fail again. |
| `401` | The API key is missing, malformed, unknown or revoked. | Check the `Authorization` header and the key itself. Do not retry. |
| `403` | Authenticated, but not allowed. The permission bit is missing, or the key owner is not OWNER or ADMIN of the community. | Issue a new key with that permission at [Account → Developer → API keys](https://insy.io/account/developer/api-keys) — permissions cannot be edited after creation — or point the call at a community the owner administers. Do not retry. |
| `404` | The addressed resource does not exist — a community or reservation that is not there, or a checkout whose payment has not completed yet. | Verify the IDs. Do not retry. |
| `409` | The membership already exists. `onOverlap: "error"` hit an active membership, or the membership is managed by a Stripe subscription and cannot be provisioned externally. Also returned when the same address is signed up twice for one drop. | Send `extend` or `replace`, or leave the Stripe subscription alone. Do not retry. |
| `500` | Something failed on Insy's side. | Retry with backoff. If it persists, contact Insy with the `correlationKey`, the `message` and the time of the call. |
The same mapping can also produce `412`, `422`, `503` and `504`. If you meet a status that is
not in the table, treat it by its class: 4xx means change the request, 5xx means retry with
backoff. API-key requests are not rate limited, so there is no `429` or retry-after to
handle — but avoid tight polling anyway.
> **Some failures arrive with a 2xx**
>
> Two paths report failure inside a successful-looking response.
> `POST /api/checkout/buy-plan` answers `201` for the failures its own logic reports (missing
> email, unknown plan): an unknown `pricingPlanId` gives `"success": true` with an empty
> `data`, and a missing `email` gives `"success": false` with no `errorCode`. Malformed or
> unauthorized requests still return `400`, `401` or `403` — the `201` applies only once the
> request has passed validation and auth. `GET /membership/join-telegram-community-external/{externalId}`
> answers `200` with `"success": false` and the message `Telegram bot not setup` when the
> community has no bot. Check that the field you needed is actually present rather than trusting
> the status code.
> **Retries are safe on provision-external**
>
> `POST /membership/provision-external` is idempotent on `externalOrderId`, so an immediate
> retry after a `500` or a network timeout cannot provision twice. Reuse the same
> `externalOrderId`, and retry before you provision another order for the same buyer — the
> guarantee only holds against that buyer's most recent provision. See
> [Endpoints](/developers/api/endpoints).
### 401 versus 403
- `401` normally means Insy could not identify you. The key is absent, mistyped, or no
longer active. That body carries `statusCode` and has no `errorCode`.
- `403` means Insy knows who you are and is refusing. Either the key lacks the permission
bit for that endpoint, or the key's owner is not an OWNER or ADMIN of the `communityId` in
the request.
A key that works against one community and returns `403` against another is almost always
the second case.
One endpoint breaks the `401` rule.
`GET /membership/join-telegram-community-external/{externalId}` answers `401` with
`"errorCode": "unauthorized"` and the message "You are not a member of this community" when
the buyer behind that checkout has no active membership. The key is fine; the membership is
not. Tell the two apart by the presence of `errorCode` — a rejected key never has one.
## OAuth errors are shaped differently
The OAuth token, revoke, userinfo, memberships and products endpoints do not use the
`BaseResponse` envelope. They return bare RFC-shaped JSON.
```json title="OAuth error"
{
"error": "invalid_grant",
"error_description": "..."
}
```
`invalid_client` is returned with HTTP `401`; every other token error is `400`. Resource
endpoints return `401` with `"error": "invalid_token"` and `403` with
`"error": "insufficient_scope"`. No `WWW-Authenticate` response header is sent, so a client
library that waits for one to decide how to re-authenticate will not get the hint. See
[Sign in with Insy](/developers/oauth).
## Common causes
**401 on every request, but the key looks right**
The key goes in `Authorization` as a bearer token: `Authorization: Bearer insy_...`.
There is no `x-api-key` header. Check that the word `Bearer` and a single space precede
the key, that nothing has trimmed the `insy_` prefix, and that no newline was copied
along with it. If the header is correct, the key may have been revoked — revocation
takes effect immediately.
**403 even though the key has the right permission**
Whenever a request carries a `communityId`, the key's owner must additionally hold an
active OWNER or ADMIN membership in that community. The permission bit and the community
role are two independent checks, and failing the second produces `403`. Confirm the
`communityId` is the one the key was issued for, and that the owner's membership in it is
still active.
**400 on provision-external**
Provisioning needs a way to find or create the person: supply `email` or
`telegramUserId`. Also check that `communityId` and `pricingPlanId` are UUIDs, that
`validFrom` and `validUntil` are ISO-8601 timestamps, and that `onOverlap` is one of
`extend`, `replace` or `error`. For a lifetime membership, omit `validUntil` — do not
send `null`.
**The same buyer was provisioned twice**
`externalOrderId` is the idempotency key, and it only protects you if it is stable. A
value derived from a timestamp, a UUID generated at call time, or a retry counter is a
different key on every attempt, so each attempt provisions. Derive it from something
durable on your side, such as your order ID. The check is also scoped: Insy compares the
ID against the buyer's current membership row for that community only, so replaying an
old order after a later one for the same buyer, or sending the same ID with a different
`email` or `telegramUserId`, provisions again. See
[Idempotency](/developers/api/endpoints#idempotency).
**buy-plan did not return a checkoutUrl**
`pricingPlanId`, `communityId`, `externalId`, `email`, `successUrl` and `cancelUrl` are
all required. `successUrl` and `cancelUrl` must be valid URLs, `externalId` is your own
identifier for the buyer rather than an Insy ID, and `utmSource` is capped at 100
characters. A missing `email` and an unknown `pricingPlanId` both come back as `201`
with no `checkoutUrl`, so read `message` to tell them apart.
**404 for an ID that exists in your dashboard**
Ownership is enforced through the `communityId` in the request, so an endpoint that does
not carry one — `GET /membership/join-telegram-community-external/{externalId}` — is not
scoped to your communities. A `404` there means the `externalId` is unknown, not that it
belongs to someone else: check you sent the `externalId` from `buy-plan` and not an
`externalOrderId` from `provision-external`, which creates no checkout reservation at
all. The same endpoint returns `404` with "Membership not found, membership has not been
processed yet" while the buyer's payment is still in flight — wait for the
[`payment.success` webhook](/developers/webhooks/events) and call again.
**The Telegram invite link no longer works**
Invite links from
`GET /membership/join-telegram-community-external/{externalId}` expire 24 hours after
they are minted, and each one is bound to the buyer's Telegram account — a join request
from a different account is rejected. A link emailed the day before is stale. Fetch a
fresh link at the moment you show it to the buyer.
## Reporting a problem
There is no per-key usage log, so Insy cannot look up your request after the fact from the
key alone. When you report an issue, include the endpoint, the UTC timestamp, the HTTP
status, and the `errorCode` and `message` from the response body.
If the body carried a `correlationKey`, quote it. That is the trace ID Insy can look the
request up by directly, and it turns a report into a single query. Send the `logUrl`
alongside it if one was present.
---
# Insy API
Source: https://docs.insy.io/developers/api/reference
The public Insy developer API: API-key endpoints, the account API (`/v1`, OAuth access token or API key) and Sign in with Insy (OAuth 2.0). Base URL https://api.insy.io.
## Membership API Key
## OAuth
## Checkout API Key
## Account API: customer
## Account API: communities
## Account API: products
## Account API: payouts, support, help
## Drop Notification API Key
---
# Find members of the communities the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/find-community-members
The dashboard's member search, for communities the person owns or administers. At most 10 matches.
Scope: `members.read`.
---
# Reviews of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/get-community-reviews
Average score, number of visible reviews, the count per score and the 5 latest reviews (text up to 300 characters).
Scope: `communities.read`.
---
# Statistics of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/get-community-stats
Revenue (completed PLN payments), new members and page views over the last `days`, each with the period before — the numbers on the community's dashboard.
Scope: `communities.read`.
---
# Access plans of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/list-access-plans
Name, price, billing period, whether on sale, trial days and the number of active and all-time members of each plan. At most 20.
Scope: `communities.read`.
---
# Recent events of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/list-community-activity
The dashboard's Activity tab: joins, departures, renewals, cancellations, failed renewal charges, refunds, Telegram joins and bans over the last `days`, newest first. Members are named with a masked e-mail. At most 20 events; `truncated` says there were more.
Scope: `members.read`.
---
# Members of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/list-community-members
The dashboard's Members tab: the number of members per status and up to 20 members matching the filter, named with a masked e-mail.
Scope: `members.read`.
---
# Recent payments of a community the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/list-community-payments
First purchases, renewals, extensions and refunds over the last `days`, newest first, from the dashboard's activity; the buyer's e-mail is masked. At most 20. Payouts are not listed: they are in the dashboard's Finance tab (Stripe).
Scope: `earnings.read`.
---
# List the communities the person manages
Source: https://docs.insy.io/developers/api/reference/account-api-communities/list-managed-communities
Scope: `communities.read`.
---
# Publish or unpublish a community
Source: https://docs.insy.io/developers/api/reference/account-api-communities/set-community-published
Publishing needs billing details and Stripe set up (`reason: billing_details_missing` otherwise).
Scope: `communities.write`.
---
# Cancel a membership subscription
Source: https://docs.insy.io/developers/api/reference/account-api-customer/cancel-subscription
Cancels at the end of the paid period where the plan allows it; access lasts until `accessUntil`.
Scope: `memberships.write`.
---
# Who the signed-in person is
Source: https://docs.insy.io/developers/api/reference/account-api-customer/get-customer-overview
Scope: `profile.read`.
---
# List the person's community memberships
Source: https://docs.insy.io/developers/api/reference/account-api-customer/list-memberships
Scope: `memberships.read`.
---
# List the person's payments and owned products
Source: https://docs.insy.io/developers/api/reference/account-api-customer/list-purchases
Scope: `purchases.read`.
---
# Report a problem with a purchase
Source: https://docs.insy.io/developers/api/reference/account-api-customer/report-problem
Raised with the seller first; insy steps in after 7 business days. Needs a purchase of the community or product.
Scope: `support.write`.
---
# Open a support case with the insy team
Source: https://docs.insy.io/developers/api/reference/account-api-payouts-support-help/create-support-case
At most 5 per hour.
Scope: `support.write`.
---
# List the person's Stripe payout accounts
Source: https://docs.insy.io/developers/api/reference/account-api-payouts-support-help/get-payout-status
Scope: `earnings.read`.
---
# Read one help article
Source: https://docs.insy.io/developers/api/reference/account-api-payouts-support-help/read-help-article
Scope: `help.read`.
---
# Search the help center
Source: https://docs.insy.io/developers/api/reference/account-api-payouts-support-help/search-help
The top 5 articles.
Scope: `help.read`.
---
# Add a price variant to a product
Source: https://docs.insy.io/developers/api/reference/account-api-products/add-product-variant
A one-time price, a subscription (`interval` required), pay-what-you-want or free. On a published product the price is live at once.
Scope: `products.write`.
---
# List the products the person sells
Source: https://docs.insy.io/developers/api/reference/account-api-products/list-managed-products
Scope: `products.read`.
---
# Publish or hide a product
Source: https://docs.insy.io/developers/api/reference/account-api-products/set-product-published
Scope: `products.write`.
---
# Start checkout session with external ID and custom URLs
Source: https://docs.insy.io/developers/api/reference/checkout-api-key/buy-plan
---
# Sign up for drop notification with auto-detected upcoming slot
Source: https://docs.insy.io/developers/api/reference/drop-notification-api-key/signup
---
# Check if a Telegram user has an active membership in a community
Source: https://docs.insy.io/developers/api/reference/membership-api-key/check-membership-by-telegram-user-id
---
# Join a telegram community using an external ID
Source: https://docs.insy.io/developers/api/reference/membership-api-key/join-telegram-community-external
---
# Provision a community membership from an external sales funnel. Looks up / creates the user by email or telegramUserId, handles overlap with existing memberships, and is idempotent via externalOrderId.
Source: https://docs.insy.io/developers/api/reference/membership-api-key/provision-external-membership
**Private access.** This endpoint provisions paid access without a payment, so it is granted only to vetted partners. Request it from support@insy.io.
---
# Authorize
Source: https://docs.insy.io/developers/api/reference/oauth/authorize
---
# Public identity of an OAuth client, for the consent screen
Source: https://docs.insy.io/developers/api/reference/oauth/get-public-client
---
# Memberships
Source: https://docs.insy.io/developers/api/reference/oauth/memberships
---
# Products
Source: https://docs.insy.io/developers/api/reference/oauth/products
---
# Revoke
Source: https://docs.insy.io/developers/api/reference/oauth/revoke
---
# Token
Source: https://docs.insy.io/developers/api/reference/oauth/token
---
# Userinfo
Source: https://docs.insy.io/developers/api/reference/oauth/userinfo
---
# Account API (v1)
Source: https://docs.insy.io/developers/api/v1
The Account API acts on **the person who signed in** through [Sign in with Insy](/developers/oauth):
their memberships and purchases, the communities and products they sell, their payout accounts and
their support cases. It is the same set of operations the [account MCP server](/developers/ai-and-mcp)
offers as tools — one endpoint per tool, with the same permissions and validation.
Every endpoint on this page is also in the [interactive API reference](/developers/api/reference),
under the **Account API** tags, with its request and response schemas and a Try-it panel.
## Authentication
Send a bearer token — either credential works:
- **An OAuth access token**, for an app acting for whoever signs in through
[Sign in with Insy](/developers/oauth). It carries the scopes that person approved.
- **An API key**, for your own scripts on your own account. It carries the
[account scopes](/developers/api/authentication#account-scopes) you picked when creating it —
never its permission bits — and its IP allowlist applies.
```bash title="Request"
curl https://api.insy.io/v1/me \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
An OAuth token issued with the `resource` parameter set to `https://api.insy.io/mcp` is bound to
the [account MCP server](/developers/ai-and-mcp) and is refused here with `401`, as RFC 8707
intends. Tokens issued without a `resource` — what Sign in with Insy issues unless you ask
otherwise — work here and on the MCP server alike, and so do API keys here.
Each endpoint needs one [scope](/developers/oauth/scopes). A missing or expired token returns
`401` in the [rejected-request shape](/developers/api/errors#rejected-before-the-endpoint-runs) with
`WWW-Authenticate: Bearer error="invalid_token"`. A token without the endpoint's scope returns `403`
with `reason: "insufficient_scope"`.
## Responses
Every response uses the [`BaseResponse` envelope](/developers/api#the-response-envelope). Failures
add `reason` when Insy has a more specific code than `errorCode`:
```json title="409"
{
"success": false,
"errorCode": "conflict",
"reason": "billing_details_missing",
"message": "Billing details and Stripe are not set up; nobody could pay. Point the user to the dashboard first."
}
```
| Status | `errorCode` | Typical `reason` |
| --- | --- | --- |
| 400 | `bad_request` | `invalid_input` — the message names each field, e.g. `published: Invalid input: expected boolean, received string`. |
| 403 | `forbidden` | `insufficient_scope` |
| 404 | `not_found` | — The slug is unknown, or not among the user's own. |
| 409 | `conflict` | `billing_details_missing`, `action_pending`, `action_unknown` |
| 422 | `unprocessable_entity` | `idempotency_key_reused` — see [Retries and idempotency](#retries-and-idempotency). |
| 429 | `too_many_requests` | `tool_budget_exceeded` — see [Rate limits](#rate-limits). |
| 500 | `internal_server_error` | `failed` — the message carries a reference to quote to Insy support. |
Amounts are integers in minor units next to an ISO 4217 code — `{ "amountCents": 3400, "currency": "PLN" }`
— and dates are `YYYY-MM-DD`. Resources are addressed by **slug**. Changes reach only the user's
own communities, products and memberships: a slug that belongs to someone else answers `404`
exactly like one that does not exist.
## Rate limits
Each account may make **120 requests a minute and 3000 an hour**, counted together across `/v1`
and the [account MCP server](/developers/ai-and-mcp) and across every token and key of that
account. Over the limit, requests answer `429` with a `Retry-After` header in seconds.
Two writes also have a budget of their own per account, shared with the MCP server and the Insy
assistant, because each one reaches a person:
| Endpoint | Budget |
| --- | --- |
| `POST /v1/support/cases` | 5 an hour |
| `POST /v1/me/reports` | 5 a day (24 hours) |
Over it the request answers `429` with `errorCode: "too_many_requests"` and
`reason: "tool_budget_exceeded"`. This answer has no `Retry-After` header; the `message` says how
many minutes to wait.
## Retries and idempotency
Send an `Idempotency-Key` header (up to 255 characters) on a write to make it safe to retry. A key
names one request of your account, whichever endpoint it went to — all `/v1` endpoints share one
key space. For 24 hours, a second request with the same key, to the same endpoint and with the
same body, returns the first request's result without doing the work again.
- **The same key with a different body, or on another endpoint**, answers `422` with
`reason: "idempotency_key_reused"`. Use a new key for a new request.
- **While the first request is still running**, the second gets `409` with
`reason: "action_pending"`.
- **If the first request has not finished within 2 minutes** — for example the server stopped
mid-request — a retry gets `409` with `reason: "action_unknown"`. Its outcome is unknown, and the
request is **never run again under that key**. Check the account (list the products, for
example) and, if the write did not happen, send it again with a new key.
- The key and its body fingerprint are kept for the full 24 hours either way.
- **A request refused before it changed anything** — invalid input, an unknown slug, missing
billing details, an exhausted budget — does not use up the key; fix it and send it again.
A write sent without the header runs every time.
```bash title="Retry-safe create"
curl -X POST https://api.insy.io/v1/products/trading-ebook/variants \
-H "Authorization: Bearer $INSY_TOKEN" \
-H "Idempotency-Key: 6f1e2a4c-ebook-standard" \
-H "Content-Type: application/json" \
-d '{"name":"Standard","description":"Lifetime access to the ebook.","priceCents":4900,"currency":"PLN"}'
```
## Profile and purchases
### `GET /v1/me` — `profile.read`
| Field | Type | Description |
| --- | --- | --- |
| `name` | string or null | Display name. |
| `email` | string or null | Masked, e.g. `j***@example.com`. The full address is on `GET /oauth/userinfo`. |
| `preferredLanguage` | string | `pl` or `en`. |
| `telegramLinked`, `discordLinked` | boolean | Whether those accounts are connected. |
| `activeMemberships` | number | Memberships flagged active. |
| `managedCommunities`, `managedProducts` | number | What the user sells. |
### `GET /v1/me/memberships` — `memberships.read`
Up to 20 community memberships:
```json title="200"
{
"success": true,
"data": [
{
"community": { "name": "Resellerzy", "slug": "resellerzy" },
"active": true,
"validUntil": "2026-11-03",
"plan": {
"name": "Monthly",
"price": { "amountCents": 4900, "currency": "PLN" },
"interval": "month"
},
"paymentMethod": "card",
"joinedTelegram": true,
"subscriptionStatus": "active"
}
]
}
```
`validUntil` is `null` for lifetime access, and `plan` is `null` when the membership was not bought
through a plan.
### `POST /v1/me/memberships/{communitySlug}/cancel` — `memberships.write`
Cancels the subscription at the end of the paid period, or immediately when payment is overdue.
Answers `200`:
| Field | Type | Description |
| --- | --- | --- |
| `community` | string | Community name. |
| `canceled` | string or null | `at_period_end`, `immediately` or `already_at_period_end`. |
| `accessUntil` | string or null | Last day of access; `null` when canceled immediately. |
Resuming a canceled subscription is done in the Insy app.
### `GET /v1/me/purchases` — `purchases.read`
`payments` lists the 15 newest payments — `date`, `status`, `amount`, `refunded`, `method`,
`item` (`type`, `name`, `slug`, `plan`) and `receiptAvailable`. `ownedProducts` lists up to 20
digital products the user bought, each with `name`, `slug` and `creator`.
### `POST /v1/me/reports` — `support.write`
Raises a problem with something the user bought. The seller is asked to respond first; Insy steps in
after 7 business days. Answers `201` with `{ "target": "…", "report": { "id", "caseId", "status" } }`,
or `404` when the user never bought the item.
| Field | Type | Description |
| --- | --- | --- |
| `target` | string | `community` or `product`. |
| `slug` | string | The community's or product's slug. |
| `reason` | string | `no_access`, `not_as_described`, `refund_request`, `billing` or `other`. |
| `details` | string | 10–2000 characters. |
## Selling
Slugs are 2–60 characters (products: up to 25) of lowercase letters, digits and single hyphens
between words. A product's `category` is one of the values the Insy app offers — `Metodki`,
`E-commerce`, `Krypto`, `Flipping / reselling`, `Trading`, `Bukmacherka`,
`Social media & marketing`, `Automatyzacje & AI`, `Selfcare`, `Sport`, `Umiejętności`, `Inne`.
Communities and products are created in the Insy app, not over the API.
### `GET /v1/communities` — `communities.read`
Communities the user owns or administers: `name`, `slug`, `published`, `isOwner`, `members`,
`newMembers`, `income` and `businessInfoMissing`.
`newMembers` counts members who joined in the last 24 hours. `income` is
`{ "amountCents": …, "currency": "PLN" }`: the community's completed payments in minor units, **PLN
payments only** — a community that sells in another currency shows `0` for those sales. It covers
the current day: payments since 00:00 UTC, not a rolling 24 hours.
### `GET /v1/communities/{slug}/stats` — `communities.read`
The numbers on a community's dashboard, for a community the user owns or administers: `revenue`,
`newMembers` and `pageViews` over the last `days` (query parameter, 1–90, default 30), each with
`current`, `previous` (the same number of days just before) and `changePercent`. `revenue.current`
and `revenue.previous` are `{ "amountCents": …, "currency": "PLN" }` and count **completed PLN
payments only**, like the dashboard. A community the user does not manage answers `404`.
### `GET /v1/communities/members` — `members.read`
Finds members of the communities the user owns or administers, with the same matching as the member
search in the Insy app. Moderators and plain members of a community cannot search it.
| Query | Description |
| --- | --- |
| `q` | Required, 3–120 characters. Matches the start of an e-mail or of a Telegram username (a leading `@` is ignored), case-insensitively, or a numeric Telegram user ID exactly. |
| `community` | Optional community slug. Without it, every community the user manages is searched. |
Answers an array of at most 10 matches, each with `community` (`name`, `slug`), `name`, `email`,
`telegramUserId`, `telegramUsername`, `role`, `active`, `banned`, `plan`, `validUntil` and
`joinedTelegram`. Inactive and banned memberships are included, marked by `active` and `banned`.
No match is an empty array, not an error. A `community` the user does not manage answers `404`.
### `GET /v1/communities/{slug}/activity` — `members.read`
The community's recent events, newest first, as on the dashboard's Activity tab. Query: `days`
(1–90, default 30) and `types`, a comma-separated list of event types — `user_joined_community`,
`user_left_community`, `user_kicked`, `membership_extended`, `subscription_payment_success`,
`subscription_cancelled`, `subscription_cancelled_at_period_end`,
`subscription_renewal_charge_failed`, `subscription_resumed`, `payment_refunded`,
`user_joined_telegram`, `user_left_telegram`, `user_kicked_telegram`, `user_banned`,
`user_unbanned`, `invite_code_used`; without it, all of them.
Answers `community` (`name`, `slug`), `days`, `events` and `truncated`. Each event has `type`,
`date`, `member` (`name` and a masked `email`, `a***@example.com`), `plan` and `amount` — the
payment the event carried, `{ "amountCents": …, "currency": … }`, or `null`. At most 20 events;
`truncated` is `true` when the period had more.
### `GET /v1/communities/{slug}/members` — `members.read`
The dashboard's Members tab. Answers `community`, `counts` (`active`, `expired`, `cancelled`,
`paymentError`, `banned`: how many members have each status), `filter`, `total` (how many match the
filter), `members` (at most 20) and `truncated`.
| Query | Description |
| --- | --- |
| `status` | Optional: `active`, `expired`, `cancelled`, `payment-error` or `banned`. Without it, every member, newest first. |
| `expiringWithinDays` | Optional, 1–90: active memberships that end within that many days, soonest first. Overrides `status`; `total` counts every such membership. |
Each member has `name`, a masked `email`, `plan`, `active`, `banned`, `validUntil`,
`joinedTelegram` and `subscriptionStatus` (the Stripe subscription's status, or `null`).
### `GET /v1/communities/{slug}/payments` — `earnings.read`
The community's recent payments, newest first, over the last `days` (1–90, default 30): first
purchases, renewals, extensions and refunds, from the same activity as the Activity tab. Answers
`community`, `days`, `payments` (at most 20), `truncated` and `payouts`, a sentence saying where
payouts are — they are not in this response; they are in the dashboard's Finance tab (Stripe).
Each payment has `date`, `kind` (`first_purchase`, `renewal`, `extension` or `refund`), `amount`
(in the payment's own currency, minor units), `status`, `method`, `plan` and `buyer` (`name` and a
masked `email`). For a refund, `amount` is the refunded payment's amount, not the refunded part.
Totals over a period are in `GET /v1/communities/{slug}/stats`.
### `GET /v1/communities/{slug}/plans` — `communities.read`
The community's access plans, on sale or not: `name`, `price` (`amountCents`, `currency`),
`paymentMode` (`one_time` or `recurring`), `interval`, `intervalCount`, `active` (on sale),
`trialDays`, `activeMembers` and `totalMembers` (every membership ever bought on the plan). At most
20; `truncated` says there were more.
### `GET /v1/communities/{slug}/reviews` — `communities.read`
The community's visible reviews: `averageScore` (`null` with no reviews), `totalReviews`,
`distribution` (the number of reviews per score, keyed `"1"` to `"5"`) and `latest`, the 5 newest
reviews with `score`, `date`, `text` (up to 300 characters, then `…`) and `creatorReplied`.
Reviewers are not named.
These five endpoints, like `stats`, answer `404` for a community the user does not own or
administer, and `400` for a query value out of range or not in the list.
### `PATCH /v1/communities/{slug}` — `communities.write`
Body `{ "published": true }` publishes the community, `false` unpublishes it — current members keep
access. `published` is the only field read. Answers `200` with `name`, `published`, `url` and
`manageUrl`, or `{ "unchanged": true, … }` when it already was in that state. Publishing without
billing details answers `409` with `reason: "billing_details_missing"`.
### `GET /v1/products` — `products.read`
Digital products the user sells: `name`, `slug`, `published`, `type` and `category`.
### `POST /v1/products/{slug}/variants` — `products.write`
Adds a price variant. Answers `201` with `product` and `variant`: `id`, `name`, `price`
(`amountCents` and `currency`), `priceType` and `interval` — as saved, which can differ from what
you sent: a `free` price is saved as `0`, an omitted currency is the product's existing one (or
`PLN`), and `interval` is `null` unless the price is a subscription.
| Field | Type | Description |
| --- | --- | --- |
| `name` | string | 2–100 characters. |
| `description` | string | 2–3000 characters. |
| `priceCents` | integer | Price in minor units. One-time and subscription prices must reach the currency's minimum (`PLN` 10.00; `EUR`, `USD` and `GBP` 2.00), or the request answers `400`; for `pay_what_you_want` it is the buyer's minimum and may be `0`; it is ignored for `free`. |
| `currency` | string, optional | `PLN`, `EUR`, `USD`, `GBP`, `CHF`, `CZK`, `SEK`, `NOK`, `DKK`, `RON` or `UAH`. |
| `priceType` | string, optional | `one_time` (the default), `subscription`, `free` or `pay_what_you_want`. |
| `interval` | string | `month` or `year`; required when `priceType` is `subscription`, ignored otherwise. |
### `PATCH /v1/products/{slug}` — `products.write`
Body `{ "published": true }` makes the product visible and buyable; `false` hides it, and existing
buyers keep access. Answers `200` with `name`, `published` and `url`, or `{ "unchanged": true, … }`.
### `GET /v1/payouts/accounts` — `earnings.read`
The user's Stripe accounts for selling: `businessName`, `serves` (the communities and products each
account is used for), `canAcceptPayments`, `canReceivePayouts`, `detailsSubmitted`,
`billingDetailsComplete`, `disabledReason`, `country` and `currency`.
## Support and help
### `POST /v1/support/cases` — `support.write`
Opens a case with the Insy team. Answers `201` with `caseId` and the `url` of its conversation.
| Field | Type | Description |
| --- | --- | --- |
| `category` | string | `access`, `wrong_email`, `subscription`, `payment`, `clipping`, `selling`, `payouts`, `dispute`, `bug` or `other`. |
| `subject` | string | 3–120 characters. |
| `description` | string | 10–2000 characters. |
### `GET /v1/help/search?q=…` — `help.read`
Up to five help-center articles, each with `title`, `section`, `url`, `route` and `excerpt`.
Developer pages are not included; the [docs MCP server](/developers/ai-and-mcp#docs-server)
searches those.
### `GET /v1/help/article?route=…` — `help.read`
One article by the `route` from a search: `title`, `section`, `url` and `markdown` (the first 6000
characters).
---
# Sign in with Insy
Source: https://docs.insy.io/developers/oauth
Sign in with Insy is an OAuth 2.0 authorization code flow. Your application sends a user to Insy,
the user signs in and approves the scopes you asked for, and you receive an access token that lets
you read that user's data on their behalf.
Use OAuth when the data belongs to a user who is not you. Use an [API key](/developers/api/authentication)
when your own backend acts on your own community.
> **OAuth 2.0, not OpenID Connect**
>
> This is plain OAuth 2.0. There is no `id_token`, no OpenID discovery document and no
> UserInfo claims beyond `sub` and `email`. (The RFC 8414 metadata at
> `https://api.insy.io/.well-known/oauth-authorization-server` exists for MCP clients.) Configure your client library as a generic OAuth 2.0
> provider with explicit endpoint URLs — an OIDC-only library will not work.
## Pick an integration
- **[Login widget](/developers/oauth/widget)** — One script tag, no backend. A public client that runs PKCE in the browser and hands you tokens through a callback or a DOM event.
- **[Server-side flow](/developers/oauth/server-side)** — The full redirect and token exchange for a confidential client, where the secret and the tokens stay on your server.
- **[PKCE](/developers/oauth/pkce)** — How to generate the verifier and the S256 challenge. Required for public clients, optional for confidential ones.
- **[Scopes](/developers/oauth/scopes)** — Every scope Insy grants, what each unlocks, and how to ask for the minimum.
- **[Reference](/developers/oauth/reference)** — Every OAuth endpoint, parameter, response shape and error code.
## How the flow works
1. **Send the user to Insy**
Redirect the browser to `GET https://api.insy.io/oauth/authorize` with your `client_id`, a
registered `redirect_uri`, the `scope` you need and a `state` value you can verify later.
2. **The user consents**
Insy authenticates the user and shows a consent screen naming your application. The user can
approve everything, keep only the read access, or set each resource to None, Read or Write;
read the granted `scope` from the token response rather than assuming what you asked for. If
the user declines you get redirected back with `error=access_denied`. The authorize and consent pages
refuse to be framed (`X-Frame-Options: DENY`, `frame-ancestors 'none'`), so open them as a
top-level page or a popup, never in an iframe.
3. **Insy redirects back with a code**
Your `redirect_uri` receives `?code=...&state=...`. The authorization code is valid for
60 seconds and can be exchanged once.
4. **Exchange the code for tokens**
`POST https://api.insy.io/oauth/token` returns an access token valid for one hour and a refresh
token valid for 30 days. The response status is `201`, not `200`.
5. **Call the resource endpoints**
Send `Authorization: Bearer ` to `/oauth/userinfo`, `/oauth/memberships` or
`/oauth/products`.
## Register your application
Register your own client at
[**Account → Developer → OAuth clients**](https://insy.io/account/developer/oauth-clients) and
press **Create client**. Credentials come back on the spot; nothing is provisioned by hand. The
same screen edits, rotates and deletes a client afterwards.
### What to fill in
| Item | Required | Notes |
| --- | --- | --- |
| Application name | Yes | Shown to the user on the consent screen. |
| Client type | Yes | `confidential` or `public` — see below. |
| Redirect URIs | Yes | Exact URIs. Anything not registered is rejected. List every environment you use. One exception: widget clients do not register the hosted callback — `https://insy.io/oauth/widget-callback` is accepted automatically for any client that has at least one web origin registered. |
| Scopes | Yes | The scopes your client may request, each picked individually — see [Scopes](/developers/oauth/scopes). The `ALL` mask is refused with `400`. Ask for the minimum. |
| Logo | Optional | Shown next to your application name on the consent screen. It must be a public image you uploaded yourself. |
| Web origins | Widgets only | The origins the login widget may run on. See [web origins](/developers/oauth/widget). |
### Confidential or public
The type is a property of the client, never inferred from a request — but you can change it on
the client's own screen if you picked wrong.
| | Confidential | Public |
| --- | --- | --- |
| Has a `client_secret` | Yes | No |
| Where it runs | Your server | A browser or a native app |
| `client_secret` in the token request | Required | Must be omitted — sending one returns `invalid_client` |
| PKCE | Optional | Required |
Choose **confidential** if you have a backend that can hold a secret. Choose **public** if the flow
completes in a browser or a mobile app, including anything built on the
[login widget](/developers/oauth/widget).
### What you get back
| Credential | Format | Issued to |
| --- | --- | --- |
| `client_id` | `oac_` followed by 24 hex characters | Every client |
| `client_secret` | `ocs_` followed by 48 hex characters | Confidential clients only |
> **The secret is shown once**
>
> `client_secret` is displayed a single time, when your client is created. Store it in your secret
> manager immediately. If it is lost, press **Rotate secret** on the client to mint a new one — the
> previous secret stops working at that moment, so swap it in your application first.
The `client_id` is not a secret. It appears in browser URLs and, for widgets, in your page source.
### Verified clients
The consent screen warns about every client Insy has **not verified**: anyone with an Insy account
can create a client under any name and logo, so the warning tells the user to continue only if they
started the sign-in themselves. A client you create starts unverified. Verification is set by the
Insy team after reviewing the client, and changing its name, its redirect URIs, its allowed web
origins (widget domains) or its logo clears it again — the user would be looking at a different app
from the one Insy reviewed. Saving the same values again keeps it, and so does changing anything
else, such as the client type.
A client whose every redirect URI is on **one** of `https://grok.com`, `https://claude.ai` or
`https://chatgpt.com` is shown as Grok, Claude or ChatGPT respectively, and without a warning,
whatever name it registered under: it can only send the authorization code to that product. The
match is on the exact host over `https`, with no port. A subdomain, plain `http`, or a single
redirect URI on any other host means the client is treated like any other.
`GET /oauth/client/{clientId}` reports the state as `verified`.
### Connected apps
Users see every client they approved under
[Account → Connected apps](https://insy.io/account/connected-apps), with the scopes, when they
approved it and when it last used a token. **Disconnect** removes the consent and revokes every
token and pending authorization code the client holds — including tokens left over without a
consent. Nothing issued before the disconnect works again after a reconnect; the app gets only
what the user approves the second time. Disconnecting is serialized with token issuance: a refresh or code exchange in flight at
that moment is either refused or its new tokens are revoked at once. Your next refresh fails with
`invalid_grant` and the user has to consent again.
## Token lifetimes
| Token | Lifetime | Behaviour |
| --- | --- | --- |
| Authorization code | 60 seconds | Single use. The first exchange spends it, even one that fails. |
| Access token | 1 hour (`expires_in: 3600`) | Opaque string. Do not parse it. |
| Refresh token | 30 days, sliding | Rotated: each refresh issues a new pair with a fresh 30-day window. |
Refreshing revokes the old refresh token **and** the old access token immediately. Replace both in
storage as a single atomic write, or an in-flight request will start failing with `invalid_token`.
A refresh token that was already rotated is still honoured for **30 seconds**, so two tabs racing
or a retry after a lost response get a new pair. Presented later than that, it is treated as
stolen: Insy revokes every token your application holds for that user, the request fails with
`invalid_grant`, and the user has to sign in again. Several processes sharing one refresh token
must coordinate their refreshes.
## Known deviations from the RFCs
**The token endpoint returns 201, not 200**
`POST /oauth/token` answers with HTTP `201` on success. Strict client libraries assert `200` and
will throw on an otherwise valid response. Either configure the library to accept `201` or make
the token request with plain HTTP.
**HTTP Basic client authentication is not supported**
Credentials go in the request **body** (`client_secret_post`). `client_secret_basic` — the
default in most libraries — is not accepted. Set the token endpoint authentication method
explicitly.
**scope is required on the authorize request**
RFC 6749 makes `scope` optional. Insy requires it. A request without `scope` will not produce a
code.
**No WWW-Authenticate header on 401 or 403**
Resource endpoints return the error as a JSON body only. Libraries that discover the error from
the `WWW-Authenticate` header will see nothing. Read the response body.
**There are no official SDKs**
Every example in these docs is plain HTTP against `https://api.insy.io`. There is no sandbox
environment and no version prefix in the URL.
## Response shapes
The OAuth token, revoke, userinfo, memberships and products endpoints return bare, RFC-shaped JSON —
not the `BaseResponse` envelope used elsewhere in the API.
```json title="POST /oauth/token — 201"
{
"access_token": "…",
"refresh_token": "…",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "memberships.read"
}
```
```json title="Any OAuth error"
{
"error": "invalid_grant",
"error_description": "Authorization code has expired"
}
```
The one exception is `GET /oauth/client/{clientId}`, the public endpoint for rendering your own
consent screen, which does use the envelope.
---
# PKCE and public clients
Source: https://docs.insy.io/developers/oauth/pkce
A public client is one whose code ships to the user: a single-page app, a mobile app, a desktop
app, a browser widget. Anything you put in that bundle is readable, so a public client has no
`client_secret` at all. PKCE (Proof Key for Code Exchange) replaces the secret with a value your
client invents per sign-in and proves knowledge of at the token exchange.
> **The drop-in widget already does all of this**
>
> If you are adding a login button to a web page, [the widget](/developers/oauth/widget) generates the
> verifier, derives the challenge, runs the popup and performs the exchange for you — one script
> tag, no code. This page is for hand-rolled integrations: mobile apps, native apps, and SPAs that
> need to own the flow.
## What makes a client public
The client type is a property of the client and is never taken from the request. Register one as
**public** at
[Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients) and you get
a `client_id` (format `oac_` plus 24 hex characters) and no secret.
| | Confidential client | Public client |
| --- | --- | --- |
| `client_secret` | Issued once, required in the token request | None exists |
| PKCE | Optional | Required |
| Where it runs | Your server | The user's device or browser |
Two rules follow, and both are enforced:
- A public client **must not** send a non-empty `client_secret`. Any non-empty value, including
one copied from another client, fails the token request with `invalid_client` and HTTP 401. An
empty string is treated as absent, but omit the field entirely.
- A public client **must** send `code_challenge` and `code_challenge_method=S256` on the
authorization request, and the matching `code_verifier` on the token request.
Confidential clients may use PKCE as well. It is optional for them, but there is no reason to skip
it — if you send a challenge, remember to send the verifier.
## The mechanics
1. **Generate a code_verifier**
A high-entropy random string, 43 to 128 characters long. Generate it fresh for every sign-in
attempt and never reuse it.
2. **Derive the code_challenge**
Take the SHA-256 digest of the ASCII bytes of the verifier and base64url-encode it without
padding: `code_challenge = base64url(SHA-256(code_verifier))`. Base64url means the standard
alphabet with `+` replaced by `-`, `/` replaced by `_`, and trailing `=` stripped.
3. **Send the challenge to /oauth/authorize**
Add `code_challenge` and `code_challenge_method=S256` to the query string. `S256` is the only
supported method — `plain` is not accepted.
4. **Keep the verifier until the exchange**
Store it somewhere that survives the redirect or the popup round-trip, and that no other origin
can read — `sessionStorage` in a browser, the platform keychain or an in-memory session in a
native app. If you lose the verifier you cannot complete the exchange, and the code is useless on
its own.
5. **Present the verifier at /oauth/token**
Send `code_verifier` in the token request body alongside `code` and `redirect_uri`. Insy hashes
it and compares against the challenge it stored at authorize time.
> **Why the code alone is not enough**
>
> An attacker who intercepts the authorization code — from a redirect URL in a log, from a
> malicious app registered on the same custom scheme — still cannot exchange it. The verifier never
> travels over the authorization request; only its hash does.
## A complete browser example
The two values come from the Web Crypto API, which is available only in a **secure context**:
an HTTPS page, or `http://localhost` during development. On a plain-HTTP page `crypto.subtle` is
`undefined` and the flow cannot start. (This is exactly what the widget reports as
`insecure_context`.)
```js title="pkce.js"
/** Base64url — the URL-safe alphabet, no padding. */
export function base64url(bytes) {
const binary = String.fromCharCode(...new Uint8Array(bytes));
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
}
/** 32 random bytes render as 43 base64url characters — the shortest legal verifier. */
export function createCodeVerifier() {
return base64url(crypto.getRandomValues(new Uint8Array(32)));
}
/** code_challenge = base64url(SHA-256(code_verifier)) */
export async function deriveCodeChallenge(verifier) {
if (!globalThis.crypto?.subtle) {
throw new Error("Web Crypto requires a secure context (HTTPS or localhost)");
}
const digest = await crypto.subtle.digest(
"SHA-256",
new TextEncoder().encode(verifier),
);
return base64url(digest);
}
```
### Starting the flow
```js title="start-login.js"
import { base64url, createCodeVerifier, deriveCodeChallenge } from "./pkce.js";
const CLIENT_ID = "oac_9f2c41ab77e05d3612b8c4ef";
const REDIRECT_URI = "https://app.example.com/auth/insy/callback";
export async function startLogin() {
const verifier = createCodeVerifier();
const challenge = await deriveCodeChallenge(verifier);
const state = base64url(crypto.getRandomValues(new Uint8Array(16)));
// Both values have to survive the trip to Insy and back.
sessionStorage.setItem("insy_verifier", verifier);
sessionStorage.setItem("insy_state", state);
const url = new URL("https://api.insy.io/oauth/authorize");
url.searchParams.set("response_type", "code");
url.searchParams.set("client_id", CLIENT_ID);
url.searchParams.set("redirect_uri", REDIRECT_URI);
url.searchParams.set("scope", "memberships.read");
url.searchParams.set("state", state);
url.searchParams.set("code_challenge", challenge);
url.searchParams.set("code_challenge_method", "S256");
window.location.assign(url.toString());
}
```
`scope` is required — Insy rejects an authorization request without it, even though RFC 6749
treats it as optional. The full list is `memberships.read` and `products.read`.
### Completing the exchange
```js title="callback.js"
export async function completeLogin() {
const params = new URLSearchParams(window.location.search);
const verifier = sessionStorage.getItem("insy_verifier");
const expectedState = sessionStorage.getItem("insy_state");
sessionStorage.removeItem("insy_verifier");
sessionStorage.removeItem("insy_state");
if (params.get("error")) {
throw new Error(params.get("error")); // access_denied, invalid_scope, ...
}
if (!expectedState || params.get("state") !== expectedState) {
throw new Error("State mismatch");
}
if (!verifier) {
throw new Error("Verifier lost — the sign-in has to be restarted");
}
const res = await fetch("https://api.insy.io/oauth/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
grant_type: "authorization_code",
client_id: "oac_9f2c41ab77e05d3612b8c4ef",
// No client_secret. A public client that sends one gets invalid_client.
code: params.get("code"),
redirect_uri: "https://app.example.com/auth/insy/callback",
code_verifier: verifier,
}),
});
// The token endpoint answers 201, not 200 — test for any 2xx.
if (!res.ok) {
const body = await res.json();
throw new Error(`${body.error}: ${body.error_description}`);
}
return res.json();
}
```
```json title="201 Created"
{
"access_token": "a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9",
"refresh_token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "memberships.read"
}
```
> **201, and no HTTP Basic**
>
> Both quirks apply to public clients too. The token endpoint returns **HTTP 201** on success, and
> credentials are read from the body only — `client_secret_basic` is not supported. A public client
> has nothing to put in an `Authorization` header anyway, so if your library insists on one, replace
> its token request with a plain `fetch`.
## Handling tokens on the client
Tokens issued to a public client land on the user's device. Treat them as user-scoped
credentials.
- The access token expires after an hour. The refresh token lasts 30 days on a sliding window,
and refreshing revokes both the old refresh token and the old access token immediately.
- Refresh with `grant_type: "refresh_token"`, `client_id` and `refresh_token` — again with no
`client_secret`.
- Avoid persisting the refresh token in `localStorage` if you can hold it in memory instead.
Anything reachable by injected script on your origin is reachable by an attacker's script.
- Do privileged work on your own server. A public client is a way to identify the user, not a
place to run trusted logic.
- There is no revocation path for a public client: `POST /oauth/revoke` requires `client_secret`,
and a public client presenting one is rejected with `invalid_client`. Drop the tokens on your
side and let the access token expire after an hour.
## Common failures
**invalid_client on the token request**
Either a public client sent `client_secret`, or a confidential client did not. The client
type is fixed at registration — check which kind you were issued rather than changing the
request until something works.
**invalid_grant on the token request**
The code is expired (they live 60 seconds), already used, or the `code_verifier` does not hash
to the `code_challenge` you sent. Confirm you are base64url-encoding the raw digest bytes, not
a hex string of them.
**crypto.subtle is undefined**
The page is not in a secure context. Serve it over HTTPS, or develop against
`http://localhost` rather than a LAN IP address.
**HTTP 400 from /oauth/authorize instead of a redirect**
Insy refuses to redirect when it cannot trust the destination: an unknown `client_id` or a
`redirect_uri` that does not exactly match a registered one. Every environment you run in has
to be registered.
For a public client there is a third cause, and it is the common one: a missing
`code_challenge`, which is rejected with `invalid_request` before the redirect URI is trusted.
A challenge outside 43–128 characters, or a `code_challenge_method` other than `S256`, is
rejected the same way.
## Next
- **[The login widget](/developers/oauth/widget)** — One script tag, PKCE handled for you, results on a DOM event.
- **[Endpoint reference](/developers/oauth/reference)** — Every parameter, response and error code in one place.
---
# Endpoint reference
Source: https://docs.insy.io/developers/oauth/reference
All OAuth endpoints live under `https://api.insy.io`. There is no version prefix in the path and
no sandbox environment — you develop against production with your own test account.
The OAuth token, revoke, userinfo, memberships and products endpoints return **bare JSON**, not
the `success` / `data` envelope used by the rest of the Insy API. `GET /oauth/client/:clientId` is
the one exception and does use the envelope.
> **Grants supported**
>
> Authorization Code, with and without PKCE, plus `refresh_token`. There is no implicit grant, no
> client credentials grant, no device code grant, and no OpenID Connect layer — no `id_token`, no
> OpenID discovery document, no JWKS. (RFC 8414 metadata for MCP clients is at
> `/.well-known/oauth-authorization-server`.)
## `GET /oauth/authorize`
Starts a sign-in. Browser-facing: it always answers with a 302, or with a 400 when it refuses to
redirect or the request does not validate. Every response carries `X-Frame-Options: DENY` and
`Content-Security-Policy: frame-ancestors 'none'`, and so does the consent screen: neither can be
shown in an iframe.
**Auth:** none. The user authenticates in the browser during this request.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `response_type` | string | No | Accepted but not enforced — the server never validates it and always treats the flow as `code`. Send `code` for spec compliance. |
| `client_id` | string | Yes | Your client identifier, `oac_` plus 24 hex characters. |
| `redirect_uri` | string | Yes | Must exactly match a redirect URI registered for the client. |
| `scope` | string | Yes | Space- or comma-separated [scope strings](/developers/oauth/scopes), each one among the client's allowed scopes. |
| `state` | string | No | Opaque value echoed back on the redirect. Max 1024 characters. Strongly recommended. |
| `code_challenge` | string | Public clients | `base64url(SHA-256(code_verifier))`. Optional for confidential clients. |
| `code_challenge_method` | string | No | Optional — `S256` is assumed whenever a `code_challenge` is present. Only `S256` is accepted; `plain` is rejected. |
| `resource` | string | No | RFC 8707 resource indicator, up to 2048 characters. The only resource Insy issues tokens for is the account MCP server, `https://api.insy.io/mcp` (a trailing slash is ignored). The code, and the tokens it is exchanged for, are bound to it: `/v1` and the `/oauth/userinfo`, `/oauth/memberships` and `/oauth/products` endpoints refuse them with `401 invalid_token`. Omit it for an ordinary sign-in. |
```text title="Request"
GET https://api.insy.io/oauth/authorize
?response_type=code
&client_id=oac_9f2c41ab77e05d3612b8c4ef
&redirect_uri=https%3A%2F%2Fapp.example.com%2Fauth%2Finsy%2Fcallback
&scope=memberships.read%20products.read
&state=7b1e4c9a2f6d8035
```
```http title="302 Found"
Location: https://app.example.com/auth/insy/callback
?code=c4f81a30d97b6e25f0a3c8d17b492e6a
&state=7b1e4c9a2f6d8035
```
**Errors**
| Condition | Result |
| --- | --- |
| User declines the consent screen | 302 to `redirect_uri?error=access_denied&state=...` |
| Unknown scope requested | 302 to `redirect_uri?error=invalid_scope&state=...` |
| `resource` other than `https://api.insy.io/mcp` | 302 to `redirect_uri?error=invalid_target&state=...` |
| Unknown `client_id` | HTTP 400 JSON. Deliberately **not** redirected. |
| `redirect_uri` not registered for the client | HTTP 400 JSON. Deliberately **not** redirected. |
| Public client without `code_challenge` | HTTP 400 JSON, `invalid_request`. Checked before the redirect URI is trusted, so it is **not** redirected. |
| Missing `scope`, `state` over 1024 characters, `code_challenge` outside 43–128 characters, `code_challenge_method` other than `S256` | HTTP 400 JSON, `invalid_request`. Not redirected. |
Authorization codes are single-use and expire after **60 seconds**. The first exchange by your
client spends the code, even when it then fails — on a wrong `redirect_uri`, a wrong
`code_verifier` or an expired code — so a code can never be tried twice. Two concurrent exchanges
of the same code cannot both succeed. A code exchanged after the user disconnected your app fails
with `invalid_grant` — so does a code issued before a disconnect, even after the user reconnects;
start a new authorization.
## `POST /oauth/token`
Exchanges an authorization code for tokens, or trades a refresh token for a new pair.
**Auth:** client credentials in the request body. Accepts `application/json` or
`application/x-www-form-urlencoded`.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `grant_type` | string | Yes | `authorization_code` or `refresh_token`. |
| `client_id` | string | Yes | Your client identifier. |
| `client_secret` | string | Confidential clients | `ocs_` plus 48 hex characters. Public clients must omit it — sending one returns `invalid_client`. |
| `code` | string | For `authorization_code` | The code from the authorize redirect. |
| `redirect_uri` | string | For `authorization_code` | The same value sent to `/oauth/authorize`. |
| `code_verifier` | string | With PKCE | 43–128 characters. Required whenever the authorization request carried a `code_challenge`. |
| `refresh_token` | string | For `refresh_token` | The refresh token from a previous response. |
| `resource` | string | No | RFC 8707 resource indicator; see the authorize parameter. On a code exchange or a refresh it can bind a grant that had no `resource` to `https://api.insy.io/mcp`, but it cannot move a grant that is already bound: it must then name the same resource or be omitted. Otherwise: `invalid_target`. |
**Authorization code**
```bash
curl -i -X POST https://api.insy.io/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"client_id": "oac_9f2c41ab77e05d3612b8c4ef",
"client_secret": "ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92",
"code": "c4f81a30d97b6e25f0a3c8d17b492e6a",
"redirect_uri": "https://app.example.com/auth/insy/callback"
}'
```
**Refresh**
```bash
curl -i -X POST https://api.insy.io/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d grant_type=refresh_token \
-d client_id=oac_9f2c41ab77e05d3612b8c4ef \
-d client_secret=ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92 \
-d refresh_token=5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18
```
```json title="201 Created"
{
"access_token": "a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9",
"refresh_token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "memberships.read products.read"
}
```
`scope` is what the token actually carries, which can be narrower than what you asked for: the
user chooses on the consent screen (RFC 6749 §5.1). Read it instead of assuming the request.
> **201 on success, and no HTTP Basic**
>
> The success status is **201**, not 200 — libraries that assert 200 will throw on a perfectly good
> response. And credentials are read from the body only: `client_secret_basic` is not supported, so
> configure your client for `client_secret_post`.
**Errors**
```json title="400 Bad Request"
{
"error": "invalid_grant",
"error_description": "Authorization code is invalid or expired"
}
```
`invalid_client` is returned with HTTP **401**. Every other token error is HTTP **400**.
**Lifetimes:** access token 1 hour, refresh token 30 days on a sliding window. A refresh issues a
new pair and immediately revokes both the old refresh token and the old access token. Tokens are
opaque random strings — do not parse them.
**Refresh token rotation:** every refresh token works once. A refresh token that was already
rotated is still honoured for **30 seconds** after its rotation (a race between two tabs, or a
retry after a lost response), and the request gets a new pair. Presented after that, it counts as
a replay: Insy revokes every token your client holds for that user and answers `invalid_grant`
(`refresh token reuse detected`). The user has to sign in again.
If the user disconnected your app in the meantime, a refresh fails with `invalid_grant` —
including one inside the 30-second window. The window never applies after a disconnect: every
refresh token from before it is dead for good, even if the user reconnects.
A refresh or a code exchange never yields more than the user's current consent: if the user
reconnected with fewer scopes, the new tokens carry only those.
## `POST /oauth/revoke`
Revokes an access token or a refresh token.
**Auth:** client credentials in the request body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string | Yes | Your client identifier. |
| `client_secret` | string | Yes | Required on this endpoint even for public clients — but a public client's secret is never accepted, so `/oauth/revoke` is confidential-clients-only today. |
| `token` | string | Yes | The token to revoke. |
| `token_type_hint` | string | No | `access_token` or `refresh_token`. |
```bash title="Request"
curl -i -X POST https://api.insy.io/oauth/revoke \
-H "Content-Type: application/json" \
-d '{
"client_id": "oac_9f2c41ab77e05d3612b8c4ef",
"client_secret": "ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92",
"token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18",
"token_type_hint": "refresh_token"
}'
```
```http title="200 OK"
HTTP/1.1 200 OK
```
Client authentication is checked first: bad or missing credentials answer 401 with
`{"error": "invalid_client"}` and no `error_description`. Once the client is authenticated, the
response body is empty and the status is 200 whether or not the token existed. A 200 tells you the
token is not usable — it is not confirmation that it ever was.
## `GET /oauth/userinfo`
The identity of the signed-in user. This is the endpoint to call first, because `sub` is the value
you key your own records on.
**Auth:** `Authorization: Bearer `. No scope required.
```bash title="Request"
curl https://api.insy.io/oauth/userinfo \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
```json title="200 OK"
{
"sub": "3f6b1c88-5d2e-4a71-9c40-8b71e2f0a5d3",
"email": "maja@example.com"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `sub` | string (uuid) | The Insy user identifier. Stable — store this. |
| `email` | string or null | The user's email address. Can be `null`, so never use it as a key. |
**Errors:** `invalid_token` with HTTP 401.
## `GET /oauth/memberships`
The user's currently active memberships.
**Auth:** `Authorization: Bearer ` with the `memberships.read` scope.
```bash title="Request"
curl https://api.insy.io/oauth/memberships \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
```json title="200 OK"
{
"memberships": [
{
"id": "b28d5f0a-91c4-4e7d-8a63-2f5c07be1d94",
"productType": "community",
"communityId": "8db53d9f-6731-4e4d-9b11-58a6169c5800",
"communityName": "Resellerzy",
"communitySlug": "resellerzy",
"isActive": true,
"validFrom": "2026-07-01T00:00:00.000Z",
"validUntil": "2026-09-01T00:00:00.000Z"
}
]
}
```
| Field | Type | Description |
| --- | --- | --- |
| `id` | string (uuid) | Membership identifier. |
| `productType` | string | The kind of product the membership grants access to: `community`, `digital_product`, `clipping_campaign` or `agency`. |
| `communityId` | string or null | Stable ID of the community. Use this to match access rules, not the membership `id`. Null for non-community memberships or a missing community. |
| `communityName` | string or null | Human-readable community title. Display only; it can change. |
| `communitySlug` | string or null | Community URL slug (for example `/communities/resellerzy`). Display/linking only; it can change. |
| `isActive` | boolean | Always `true` in this response — only active memberships are returned. |
| `validFrom` | string (ISO-8601) | Start of the current access period. |
| `validUntil` | string (ISO-8601) | End of the current access period. Absent or null for lifetime access. |
Only currently-active memberships appear, so an empty array means "no access right now", not "never
had access". The list is **not paginated**.
**Errors:** `invalid_token` with HTTP 401, `insufficient_scope` with HTTP 403.
To grant access for membership in a particular community, compare `communityId` with your
configured community ID and check `isActive`, `validFrom <= now`, and `validUntil > now`
when an end date is present. An absent or null end date means no scheduled expiry, not
an irrevocable grant: re-check membership periodically to detect cancellations. Community
names and slugs are for display and must not be used as authorization keys.
## `GET /oauth/products`
The products the user has **created as a seller**.
> **Not a purchase history**
>
> These are the user's own products, not the products they have bought. To find out what a user has
> access to, call `GET /oauth/memberships`.
**Auth:** `Authorization: Bearer ` with the `products.read` scope.
```bash title="Request"
curl https://api.insy.io/oauth/products \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
```json title="200 OK"
{
"products": [
{
"id": "0c9a4e17-6b3d-4c02-9f81-73ad5e6c2b18",
"name": "Trading Signals",
"slug": "trading-signals",
"type": "course"
}
]
}
```
| Field | Type | Description |
| --- | --- | --- |
| `id` | string (uuid) | Product identifier. |
| `name` | string | Display name. |
| `slug` | string | URL slug on the storefront. |
| `type` | string or null | Product type. One of `ebook`, `course`, `video`, `audio`, `document`, `consultation`, `other`. Can be `null` for older products. |
**Errors:** `invalid_token` with HTTP 401, `insufficient_scope` with HTTP 403.
## `GET /oauth/client/{clientId}`
The public display identity of a client — name, description and logo. Use it to render your own
consent or "connect" screen without hardcoding the branding.
**Auth:** none. This endpoint is public and unauthenticated.
| Parameter | In | Description |
| --- | --- | --- |
| `clientId` | path | The client identifier, `oac_` plus 24 hex characters. |
| `widget_origin` | query | Optional. The browser origin asking to receive this client's authorization code. When present, the response's `data` carries a `widgetOriginAllowed` boolean. Sent by the hosted widget callback, and by the consent screen when the sign-in comes from the hosted widget (its `redirect_uri` is Insy's `/oauth/widget-callback`). The consent screen names that origin as the destination only when the response says `widgetOriginAllowed: true`; otherwise it shows the callback host. |
```bash title="Request"
curl https://api.insy.io/oauth/client/oac_9f2c41ab77e05d3612b8c4ef
```
This is the one OAuth endpoint that uses the standard Insy response envelope:
```json title="200 OK"
{
"success": true,
"data": {
"clientId": "oac_9f2c41ab77e05d3612b8c4ef",
"name": "Example Shop",
"description": "Sign in to see your memberships",
"logoUrl": "https://cdn.example.com/logo.png",
"selfRegistered": false,
"verified": false,
"registeredAt": "2026-01-14T09:30:00.000Z",
"usage": "100_plus"
}
}
```
`registeredAt` is when the client was registered. `usage` is how many Insy accounts have the
client connected, as a bucket (`under_10`, `10_plus`, `100_plus`, `1000_plus`), never an exact
count; for a recognised AI product it counts every registration of that product. The consent screen
shows both, alongside "Not made by insy" and the host the user will be sent to.
`verified` is `true` once Insy has reviewed the client; while it is `false` the Insy consent screen
warns the user. It is also `true`, and `name` is the product's name, for a client whose every
redirect URI is on one of the hosts `grok.com`, `claude.ai` or `chatgpt.com` (see
[Verified clients](/developers/oauth#verified-clients)). `selfRegistered` is `true` for clients
that registered themselves through dynamic client registration (the MCP clients); for those the
warning says the name could not be confirmed and names the host the user will be sent to.
On failure the envelope carries the reason instead:
```json title="Failure envelope"
{
"success": false,
"errorCode": "not_found",
"message": "Unknown client"
}
```
An unknown `clientId` answers with HTTP 404 and this envelope; `errorCode` values are lowercase
snake_case. Keys that are unset are omitted rather than sent as `null` — a successful response
carries no `errorCode`, and a failure carries no `data`.
## Error codes
Token and revoke errors, and errors from the resource endpoints, use the RFC shape:
```json
{
"error": "invalid_grant",
"error_description": "Authorization code is invalid or expired"
}
```
Authorize errors are delivered as query parameters on the redirect instead, with `state` echoed
back — except for the ones listed above that are refused before the redirect URI is trusted, which
come back as a 400 in the same RFC shape.
| `error` | HTTP status | Where it appears | Meaning |
| --- | --- | --- | --- |
| `invalid_request` | 400 | `/oauth/token`, `/oauth/revoke`, `/oauth/authorize` | A required parameter is missing or malformed. |
| `invalid_client` | **401** | `/oauth/token`, `/oauth/revoke` | Unknown client, wrong secret, a confidential client that sent no secret, or a public client that sent one. The `/oauth/revoke` variant carries no `error_description`. |
| `invalid_grant` | 400 | `/oauth/token` | The code or refresh token is expired, already used, revoked, or the `code_verifier` does not match the challenge. A reused refresh token also revokes the client's other tokens for that user. |
| `invalid_scope` | — | `/oauth/authorize` (as a redirect parameter) | A requested scope does not exist or is not among the client's allowed scopes. Delivered as a 302 redirect, never a 400 body. |
| `invalid_target` | 400 on `/oauth/token`; a redirect parameter on `/oauth/authorize` | `/oauth/token`, `/oauth/authorize` | The `resource` is not `https://api.insy.io/mcp`, or does not match the resource the code or refresh token is bound to. |
| `access_denied` | — | `/oauth/authorize` (as a redirect parameter) | The user declined the consent screen. |
| `invalid_token` | **401** | Resource endpoints | The access token is missing, expired, revoked or unknown, or bound to another resource (a token issued for `https://api.insy.io/mcp`). |
| `insufficient_scope` | **403** | Resource endpoints | The token is valid but lacks the scope, for example `"memberships.read scope required"`. |
## Known deviations from the RFCs
Plan around these rather than assuming a library will cope.
| Deviation | Impact |
| --- | --- |
| `POST /oauth/token` returns **201**, not the RFC 6749 200. | Strict clients throw on success. Accept any 2xx. |
| `client_secret_basic` is not supported. | Credentials must go in the body. Configure `client_secret_post`; most libraries default to Basic. |
| No `WWW-Authenticate` header on 401/403 from resource endpoints. | Bearer-token middleware that parses that header for the error will see nothing. Branch on the status code and the `error` field. |
| `scope` is **required** on `/oauth/authorize`. | RFC 6749 makes it optional. An authorize request without a scope fails. |
| `/oauth/revoke` is unusable by public clients. | RFC 7009 allows an unauthenticated public client to revoke. Insy requires `client_secret` on the request and rejects any secret presented by a public client, so there is no request a public client can make that succeeds. Discard the token locally and let it expire. |
| No OpenID Connect. | No `id_token`, no OpenID discovery document, no JWKS. Identity comes from `GET /oauth/userinfo`. |
| No official SDKs. | Every integration is plain HTTP. The examples in these docs are the reference implementation. |
## Related
- **[Server-side flow](/developers/oauth/server-side)** — The confidential-client walkthrough, end to end.
- **[PKCE and public clients](/developers/oauth/pkce)** — For SPAs, mobile apps and anything without a secret.
---
# Scopes
Source: https://docs.insy.io/developers/oauth/scopes
A scope is the permission a user grants your application on the consent screen. Each one unlocks a
set of [Account API](/developers/api/v1) endpoints and the matching tools on the
[account MCP server](/developers/ai-and-mcp), and two of them also unlock the original
`/oauth/*` resource endpoints.
`scope` is **required** on every authorize request. RFC 6749 makes it optional; Insy does not. A
request without it will not produce an authorization code.
## All scopes
| Scope | Account API (`/v1`) | MCP tools | Also unlocks |
| --- | --- | --- | --- |
| `profile.read` | `GET /v1/me` | `get_customer_overview` | |
| `memberships.read` | `GET /v1/me/memberships` | `list_memberships` | `GET /oauth/memberships` |
| `memberships.write` | `POST /v1/me/memberships/{slug}/cancel` | `cancel_subscription`, `get_telegram_join_link` (MCP only) | |
| `purchases.read` | `GET /v1/me/purchases` | `list_purchases` | |
| `communities.read` | `GET /v1/communities`, `GET /v1/communities/{slug}/stats`, `GET /v1/communities/{slug}/plans`, `GET /v1/communities/{slug}/reviews` | `list_managed_communities`, `get_community_stats`, `list_access_plans`, `get_community_reviews` | |
| `communities.write` | `PATCH /v1/communities/{slug}` | `set_community_published` | |
| `members.read` | `GET /v1/communities/members`, `GET /v1/communities/{slug}/members`, `GET /v1/communities/{slug}/activity` | `find_community_member`, `list_community_members`, `list_community_activity` | |
| `products.read` | `GET /v1/products` | `list_managed_products` | `GET /oauth/products` |
| `products.write` | `PATCH /v1/products/{slug}`, `POST /v1/products/{slug}/variants` | `set_product_published`, `add_product_variant` | |
| `earnings.read` | `GET /v1/payouts/accounts`, `GET /v1/communities/{slug}/payments` | `get_payout_status`, `list_community_payments` | |
| `support.write` | `POST /v1/support/cases`, `POST /v1/me/reports` | `create_support_case`, `report_problem` | |
| `help.read` | `GET /v1/help/search`, `GET /v1/help/article` | `search_help`, `read_help_article` | |
| `refunds.write` | — (MCP and the Insy assistant only) | `find_refundable_payments`, `refund_payment` | |
| `editorial.discord.publish` | — (`/admin/mcp` only) | `publish_insy_discord_post` | Super administrators only; explicit opt-in and per-post confirmation for fixed INSY channels. |
| `newsletters.read` | — (MCP only) | `list_newsletters`, `get_newsletter`, `get_newsletter_stats`, `get_newsletter_clicked_links`, `get_newsletter_readiness` | Account-owned newsletters; feature access required. |
| `newsletters.test.send` | — (MCP only) | `send_newsletter_test` | One proof to the verified account email; 3/hour, separate opt-in. No audience sending. |
| `newsletters.drafts.write` | — (MCP only) | `create_newsletter_draft`, `update_newsletter_draft`, `import_newsletter_html` | Draft preparation only. No sending, scheduling or test emails. |
| `clipping.read`, `clipping.write` | — | — | Reserved; no endpoint uses them yet. |
`members.read` is separate from `communities.read` because it returns other people's personal data:
the e-mail and Telegram account of each member found, and the names of the members in a
community's member list and activity (their e-mails masked, `a***@example.com`). A token or key
that had `communities.read` before does not get it. A community's payments name the buyer the same
way and need `earnings.read`.
`refunds.write` moves money, so it is a scope of its own rather than part of `communities.write`:
an app can edit a community without being able to refund out of it. Only the community's
**owner** can refund (not its admins or moderators), only card payments made through Stripe, and
every refund is confirmed by the person on a card that states the amount and the customer. There is
no REST endpoint, because the Account API does not ask for confirmation.
`get_telegram_join_link` sits under `memberships.write` although it only hands out a link: the
link lets the first Telegram account that opens it join as the signed-in person, so it is treated
as a write. It has no REST endpoint.
`GET /oauth/userinfo` needs **no scope at all**. Any valid access token issued without a `resource`
can read it, so you can identify a user without asking for any permission. A token bound to
`https://api.insy.io/mcp` (see the [`resource` parameter](/developers/oauth/reference#get-oauthauthorize))
is refused with `401 invalid_token`.
## The `/oauth` resource endpoints
These endpoints accept only tokens issued without a `resource`; a token bound to
`https://api.insy.io/mcp` is refused with `401 invalid_token`.
### memberships.read
Returns every membership whose `isActive` flag is set. There is no date filter on the query —
`isActive` is maintained by Insy's billing and expiry jobs, so check `validFrom` and `validUntil`
yourself if you need a hard boundary rather than a flag. The list is not paginated.
```json title="GET /oauth/memberships"
{
"memberships": [
{
"id": "3f9a1c02-7b41-4e8d-9a63-5c0e2d81f7ab",
"productType": "community",
"isActive": true,
"validFrom": "2026-01-14T09:12:44.000Z",
"validUntil": "2026-09-14T09:12:44.000Z"
}
]
}
```
An empty `memberships` array means the user has no membership flagged active — it does not mean the
request failed.
### products.read
Returns the digital products the user created as a seller. Communities are not products in this
sense and are never returned — a seller whose catalogue is only paid communities gets an empty array.
```json title="GET /oauth/products"
{
"products": [
{
"id": "b71e4d90-2a55-4c31-8f0d-6e9a3b12c4df",
"name": "Trading Signals",
"slug": "trading-signals",
"type": "course"
}
]
}
```
`type` is one of `ebook`, `course`, `video`, `audio`, `document`, `consultation` or `other`, and may
be `null` if the seller never set one.
> **products.read is the seller's catalogue, not the buyer's library**
>
> `GET /oauth/products` returns products the user **created** as a seller. It does **not** return
> products the user purchased.
>
> If you are building a "what has this customer bought" feature, `products.read` is the wrong scope
> and will return an empty array for every ordinary customer. Use `memberships.read` instead — active
> memberships are how Insy represents what a user currently has access to.
## Requesting scopes
Scopes go in a single `scope` parameter, separated by a space or a comma — both work, and you
can mix them. In a URL a space is percent-encoded as `%20`. The examples below use a space,
which is the RFC 6749 convention.
**Authorize URL**
```text
https://api.insy.io/oauth/authorize
?response_type=code
&client_id=oac_9f2c41e7a83b06d5c4e19f27
&redirect_uri=https%3A%2F%2Fshop.example%2Fcallback
&scope=memberships.read%20products.read
&state=1f7c9b2e4a8d
```
**Node.js**
```js
const authorizeUrl = new URL("https://api.insy.io/oauth/authorize");
authorizeUrl.searchParams.set("response_type", "code");
authorizeUrl.searchParams.set("client_id", "oac_9f2c41e7a83b06d5c4e19f27");
authorizeUrl.searchParams.set("redirect_uri", "https://shop.example/callback");
authorizeUrl.searchParams.set("scope", "memberships.read products.read");
authorizeUrl.searchParams.set("state", crypto.randomUUID());
// URLSearchParams encodes the separating space for you.
console.log(authorizeUrl.toString());
```
**Login widget**
```html
```
## Check what you were granted
The token response echoes the scopes actually attached to the access token.
```json title="POST /oauth/token — 201"
{
"access_token": "…",
"refresh_token": "…",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "memberships.read"
}
```
Branch on the `scope` in the response, not on what you asked for. **The user can grant less than
you asked for**: the consent screen lets them set each resource to None, Read or Write, and the
token then carries only what they left on. Refreshing a token carries the same scopes forward — or
fewer, if the user has since narrowed or removed the connection; there is no way to widen a token's
scope, so to gain a scope you must send the user through the authorize flow again. Asking again for
a scope the user turned off shows the consent screen again rather than granting it silently.
## Unknown or ungranted scopes
If you request a scope that does not exist, the user is redirected back to your `redirect_uri` with
an error instead of a code:
```text
https://shop.example/callback?error=invalid_scope&state=1f7c9b2e4a8d
```
Handle `error` on your callback route the same way you handle `code`. The `state` you sent is
returned with the error, so you can still match the response to the attempt that started it.
Calling a resource endpoint with a token that lacks the required scope returns `403`:
```json title="GET /oauth/memberships — 403"
{
"error": "insufficient_scope",
"error_description": "memberships.read scope required"
}
```
An expired or revoked token returns `401` with `invalid_token`. Note that neither response carries a
`WWW-Authenticate` header, so read the JSON body to tell the two cases apart.
## Ask for the minimum
Request only the scopes the feature you are shipping actually needs.
- **Signing users in?** Ask for the narrowest scope that works. `/oauth/userinfo` needs none, so a
pure sign-in integration does not need `memberships.read` at all.
- **Gating content on an active subscription?** `memberships.read` alone.
- **Building a creator-facing dashboard over someone's own catalogue?** That is the case
`products.read` is for.
Every extra scope is one more line on the consent screen. You cannot widen a token later, so it is
tempting to request everything up front — resist it, and re-run consent when a feature genuinely
needs more.
---
# Server-side flow
Source: https://docs.insy.io/developers/oauth/server-side
This is the flow for a confidential client: an application with a backend that can keep
`client_secret` out of the browser. You send the user to Insy, receive a short-lived
authorization code on your redirect URI, and exchange that code for tokens from your server.
If your application cannot hold a secret — a single-page app, a mobile app, a browser widget —
use a public client with PKCE instead. See [PKCE and public clients](/developers/oauth/pkce).
> **Two things that break off-the-shelf OAuth libraries**
>
> `POST /oauth/token` answers with **HTTP 201**, not the RFC-mandated 200. And Insy does **not**
> support HTTP Basic authentication (`client_secret_basic`) — credentials go in the request body.
> Configure your library before you write any other code.
## Register your client
You register the client yourself at
[Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients). You supply
an application name, your redirect URIs and the scopes you need; you receive a `client_id` (format
`oac_` plus 24 hex characters) and
a `client_secret` (format `ocs_` plus 48 hex characters). The secret is shown once — store it in
your secret manager, never in a repository or a client bundle.
Only redirect URIs registered up front are accepted. An unregistered `redirect_uri` is rejected
with an HTTP 400 rather than redirected, so register every environment you intend to run in.
1. **Build the authorization URL**
Send the user's browser to `https://api.insy.io/oauth/authorize` with the parameters below. This
endpoint is browser-facing: it always answers with a 302, or a 400 in the cases where it refuses
to redirect.
| Parameter | Required | Description |
| --- | --- | --- |
| `response_type` | No | Accepted but not enforced — the server never validates it and always treats the flow as Authorization Code. Send `code` for spec compliance. |
| `client_id` | Yes | Your client identifier, `oac_` plus 24 hex characters. |
| `redirect_uri` | Yes | Must exactly match one of the redirect URIs registered for the client. |
| `scope` | Yes | Space- or comma-separated list. Currently `memberships.read` and `products.read`. |
| `state` | No | Opaque value echoed back on the redirect, max 1024 characters. Strongly recommended — it is your CSRF defence. |
| `code_challenge` | Public clients | Base64url SHA-256 of your `code_verifier`. Optional for confidential clients. |
| `code_challenge_method` | No | Optional — `S256` is assumed whenever a `code_challenge` is present. Only `S256` is accepted; no other method is supported. |
> **scope is required**
>
> RFC 6749 makes `scope` optional. Insy requires it. Omitting it fails the request, so always set
> it explicitly even when you only need one scope.
```js title="Build the URL (Node.js)"
import { randomBytes } from "node:crypto";
const state = randomBytes(16).toString("hex");
// Persist `state` against the user's session — you compare it on the way back.
session.oauthState = state;
const authorizeUrl = new URL("https://api.insy.io/oauth/authorize");
authorizeUrl.searchParams.set("response_type", "code");
authorizeUrl.searchParams.set("client_id", process.env.INSY_CLIENT_ID);
authorizeUrl.searchParams.set(
"redirect_uri",
"https://app.example.com/auth/insy/callback",
);
authorizeUrl.searchParams.set("scope", "memberships.read products.read");
authorizeUrl.searchParams.set("state", state);
response.redirect(authorizeUrl.toString());
```
The resulting URL looks like this:
```text title="Authorization request"
https://api.insy.io/oauth/authorize
?response_type=code
&client_id=oac_9f2c41ab77e05d3612b8c4ef
&redirect_uri=https%3A%2F%2Fapp.example.com%2Fauth%2Finsy%2Fcallback
&scope=memberships.read%20products.read
&state=7b1e4c9a2f6d8035
```
2. **Handle the redirect and verify state**
After the user signs in and approves the request, Insy redirects the browser back to your
`redirect_uri` with `code` and `state` in the query string:
```text title="Success redirect"
https://app.example.com/auth/insy/callback?code=c4f81a30d97b6e25f0a3c8d17b492e6a&state=7b1e4c9a2f6d8035
```
If the user declines, you get an error instead of a code — with `state` still echoed back:
```text title="User declined"
https://app.example.com/auth/insy/callback?error=access_denied&state=7b1e4c9a2f6d8035
```
An unknown scope comes back the same way, as `error=invalid_scope`. Two failures are **not**
redirected at all, because Insy cannot trust the destination: an unknown `client_id` and an
unregistered `redirect_uri` both return an HTTP 400 with a JSON body. If you are staring at a
400 in the browser, check those two values first.
```js title="Callback handler (Node.js)"
app.get("/auth/insy/callback", async (request, response) => {
const { code, state, error } = request.query;
// Constant-time-ish comparison is unnecessary here, but the check is not:
// an unsolicited callback with no matching state is a CSRF attempt.
if (!state || state !== request.session.oauthState) {
return response.status(400).send("State mismatch");
}
delete request.session.oauthState;
if (error) {
// The redirect carries `error` and `state` only — never an error_description.
return response.status(400).send(`Insy returned ${error}`);
}
const tokens = await exchangeCode(code);
// ... persist the tokens against your own user record
});
```
> **The code expires in 60 seconds**
>
> An authorization code is valid for 60 seconds and is single-use. Exchange it in the callback
> handler, not on a queue.
3. **Exchange the code for tokens**
`POST /oauth/token` accepts either `application/json` or
`application/x-www-form-urlencoded`. Send `client_id` and `client_secret` in the **body**.
| Field | Required | Description |
| --- | --- | --- |
| `grant_type` | Yes | `authorization_code` for this step. |
| `client_id` | Yes | Your client identifier. |
| `client_secret` | Confidential clients | Required for confidential clients. Public clients must omit it. |
| `code` | Yes | The code from the redirect. |
| `redirect_uri` | Yes | The same value you sent to `/oauth/authorize`. |
| `code_verifier` | With PKCE | Required whenever the authorization request carried a `code_challenge`. |
**curl**
```bash
curl -i -X POST https://api.insy.io/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "authorization_code",
"client_id": "oac_9f2c41ab77e05d3612b8c4ef",
"client_secret": "ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92",
"code": "c4f81a30d97b6e25f0a3c8d17b492e6a",
"redirect_uri": "https://app.example.com/auth/insy/callback"
}'
```
**Node.js**
```js
async function exchangeCode(code) {
const res = await fetch("https://api.insy.io/oauth/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
grant_type: "authorization_code",
client_id: process.env.INSY_CLIENT_ID,
client_secret: process.env.INSY_CLIENT_SECRET,
code,
redirect_uri: "https://app.example.com/auth/insy/callback",
}),
});
// The success status is 201. Test for any 2xx — never for `res.status === 200`.
if (!res.ok) {
const body = await res.json();
throw new Error(`${body.error}: ${body.error_description}`);
}
return res.json();
}
```
A successful exchange returns **HTTP 201** and this body:
```json title="201 Created"
{
"access_token": "a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9",
"refresh_token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "memberships.read products.read"
}
```
> **201, not 200**
>
> Strict OAuth client libraries assert a 200 on the token endpoint and throw on anything else.
> If your library exposes a way to widen the accepted status codes, set it to accept any 2xx. If it
> does not, perform the token request with a plain HTTP client — it is a single POST with a JSON
> body.
> **client_secret_basic is not supported**
>
> Most OAuth libraries default to `client_secret_basic`, which sends the credentials in an
> `Authorization: Basic` header. Insy does not read that header. Depending on what your library
> still puts in the body, the request fails with `invalid_request` (HTTP 400, because `client_id`
> never arrived) or `invalid_client` (HTTP 401, because the secret never arrived). Configure the
> client for **`client_secret_post`** so both credentials go in the body.
Errors come back as a JSON object with `error` and `error_description`. `invalid_client` is
returned with HTTP 401; every other token error is HTTP 400:
```json title="400 Bad Request"
{
"error": "invalid_grant",
"error_description": "Authorization code is invalid or expired"
}
```
Tokens are opaque random strings. Do not attempt to decode or parse them — there is no JWT
payload, no `id_token` and no OpenID Connect discovery document behind them.
4. **Call a resource endpoint**
Send the access token as a bearer token. Start with `GET /oauth/userinfo`, which requires no
scope and gives you the stable identifier to key your own records on.
**curl**
```bash
curl https://api.insy.io/oauth/userinfo \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
**Node.js**
```js
const res = await fetch("https://api.insy.io/oauth/userinfo", {
headers: { Authorization: `Bearer ${accessToken}` },
});
const profile = await res.json();
```
```json title="200 OK"
{
"sub": "3f6b1c88-5d2e-4a71-9c40-8b71e2f0a5d3",
"email": "maja@example.com"
}
```
`sub` is the Insy user UUID and is stable — store it. `email` can be `null`, so never use it as
your primary key.
With the `memberships.read` scope you can then read the user's active memberships:
```bash title="curl"
curl https://api.insy.io/oauth/memberships \
-H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"
```
Resource endpoints return bare JSON, not the `success` / `data` envelope used elsewhere in the
API. On failure you get `invalid_token` with HTTP 401, or `insufficient_scope` with HTTP 403.
No `WWW-Authenticate` header is sent, so branch on the status code and the `error` field.
See the [endpoint reference](/developers/oauth/reference) for every response shape.
5. **Refresh before the access token expires**
An access token lives for one hour (`expires_in: 3600`). A refresh token lives for 30 days on a
sliding window: each refresh issues a new pair and a fresh 30-day window, so a user who returns
at least once a month never has to sign in again.
**curl**
```bash
curl -i -X POST https://api.insy.io/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "refresh_token",
"client_id": "oac_9f2c41ab77e05d3612b8c4ef",
"client_secret": "ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92",
"refresh_token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18"
}'
```
**Node.js**
```js
// Refresh a minute early so an in-flight request never races the expiry.
const REFRESH_MARGIN_MS = 60_000;
async function getAccessToken(account) {
if (Date.now() < account.expiresAt - REFRESH_MARGIN_MS) {
return account.accessToken;
}
const res = await fetch("https://api.insy.io/oauth/token", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
grant_type: "refresh_token",
client_id: process.env.INSY_CLIENT_ID,
client_secret: process.env.INSY_CLIENT_SECRET,
refresh_token: account.refreshToken,
}),
});
if (!res.ok) {
const body = await res.json();
// invalid_grant here means the refresh token is spent, revoked or 30 days old.
throw new Error(`${body.error}: ${body.error_description}`);
}
const tokens = await res.json();
await saveTokens(account.id, {
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresAt: Date.now() + tokens.expires_in * 1000,
});
return tokens.access_token;
}
```
The response is the same 201 and the same body shape as the code exchange. Always persist the new
`refresh_token` — the old one stops working the moment the new pair is issued.
> **Refreshing invalidates the old access token too**
>
> A refresh revokes the previous refresh token **and** the previous access token immediately. The
> old access token does not keep working until its hour is up.
>
> If several processes share one stored refresh token, they will knock each other offline: server A
> refreshes, server B's access token dies mid-request, server B refreshes with the token server A
> already spent. Within 30 seconds of A's refresh that still works (B gets a pair of its own), but
> later Insy treats it as a stolen token being replayed: it revokes **every** token your client holds
> for that user, A's new pair included, and the user has to sign in again. Serialise it — a single
> refresh path behind a lock or a mutex on the shared token store, with the other processes reading
> the result.
## Lifetimes at a glance
| Credential | Lifetime | Notes |
| --- | --- | --- |
| Authorization code | 60 seconds | Single use. Exchange it in the callback handler. |
| Access token | 1 hour (`expires_in: 3600`) | Revoked early by a refresh or by `POST /oauth/revoke`. |
| Refresh token | 30 days, sliding | Each refresh mints a new pair with a fresh 30-day window and revokes the old pair. |
## Signing the user out
To drop a token deliberately, call `POST /oauth/revoke` with your client credentials and the
token. It returns HTTP 200 with an empty body whether or not the token existed, so treat a 200 as
"the token is gone" rather than as confirmation that it was ever valid.
```bash title="curl"
curl -X POST https://api.insy.io/oauth/revoke \
-H "Content-Type: application/json" \
-d '{
"client_id": "oac_9f2c41ab77e05d3612b8c4ef",
"client_secret": "ocs_3b71e0d9c85a24f6b0d78e13a45c9f27e6b18d04a7c35f92",
"token": "5e2c9a71d84f0b36c7a1e93f5b820d4ec6a37f18",
"token_type_hint": "refresh_token"
}'
```
## Next
- **[PKCE and public clients](/developers/oauth/pkce)** — For SPAs, mobile apps and anything that cannot hold a secret.
- **[Endpoint reference](/developers/oauth/reference)** — Every parameter, response and error code in one place.
---
# Login widget
Source: https://docs.insy.io/developers/oauth/widget
The login widget is a drop-in `script` tag that renders a Sign in with Insy button and completes the
whole OAuth flow in the browser. It is a public client and uses PKCE, so it needs no client secret
and no backend on your side.
## Button builder
Pick a look and copy the tag. The preview uses the widget's real styles; it does not sign anyone in.
_The interactive configurator is available on the web version of this page._
## Copy and paste
The button renders inline where the script tag sits — place the tag where you want it.
```html title="index.html"
```
> **Always set data-scope**
>
> The authorize endpoint requires a scope. A widget without `data-scope` will not complete the flow.
> See [Scopes](/developers/oauth/scopes) for the two available values.
## Attributes
| Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `data-client-id` | string | — | **Required.** Your public client ID, in the form `oac_` plus 24 hex characters. |
| `data-scope` | string | — | Space-separated scopes. Always set this; the server requires a scope. |
| `data-size` | `sm` \| `md` \| `lg` | `md` | Button size. `small`, `medium` and `large` are also accepted. |
| `data-lang` | `pl` \| `en` | `pl` | Button label language. |
| `data-text` | string | — | Overrides the button label entirely. Ignores `data-lang`. |
| `data-radius` | number | — | Corner radius in CSS pixels. |
| `data-on-auth` | string | — | The name of a function on `window` that receives the result. |
### data-on-auth is a name, not an expression
The value is resolved as a dotted path against `window`, so `data-on-auth="myApp.onInsyAuth"` finds
`window.myApp.onInsyAuth`. It is never evaluated as JavaScript, which is what lets the widget run
under a strict Content Security Policy. Anything that is not a plain dotted path — a call, an arrow
function, an inline statement — will not resolve.
```html title="Valid"
```
```html title="Will not work"
```
## Receiving the result
There are two ways to get the result, and both fire for every attempt. Pick whichever fits your
codebase — you do not need both.
**data-on-auth callback**
Define a function on `window` and name it in the attribute.
```html title="callback.html"
```
**insy-auth DOM event**
The widget also dispatches a bubbling `CustomEvent` named `insy-auth`. Its `detail` is the same
object the callback receives. Use this if you would rather not attach anything to `window` — it
suits frameworks where a module-scoped listener is cleaner.
```js title="listener.js"
document.addEventListener("insy-auth", async (event) => {
const result = event.detail;
if (!result.ok) {
showError(result.error);
return;
}
await fetch("/api/insy/session", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ accessToken: result.accessToken }),
});
});
```
Because the event bubbles, a listener on `document` catches results from every widget on the page.
Attach the listener before the widget script loads so you cannot miss an early result.
### The success object
```js title="result when ok is true"
{
ok: true,
state: "…", // the state value tied to this attempt
accessToken: "…", // opaque; send it as Authorization: Bearer
refreshToken: "…", // opaque; 30 days, sliding
expiresIn: 3600, // seconds until the access token expires
scope: "memberships.read",
tokenType: "Bearer"
}
```
Both tokens are opaque random strings. Do not try to decode or parse them — they carry no claims.
`scope` reflects what was actually granted, which is what you should branch on, not what you asked
for.
### The failure object
```js title="result when ok is false"
{
ok: false,
error: "popup_blocked",
errorDescription: "…"
}
```
| `error` | Cause | What to do |
| --- | --- | --- |
| `popup_blocked` | The browser blocked the popup, usually because the click was not treated as a user gesture. | Ask the user to allow popups, or trigger the widget directly from a real click rather than from timers or async code. |
| `closed_by_user` | The user closed the popup before finishing. | Treat as a cancel. Leave the UI in its signed-out state and let them retry. |
| `insecure_context` | The page is not HTTPS and not `localhost`, so Web Crypto is unavailable and PKCE cannot run. | Serve the page over HTTPS. There is no fallback — PKCE is mandatory for public clients. |
| `verifier_lost` | The PKCE verifier was gone when the code came back, typically because the page reloaded or storage was cleared mid-flow. | Start a fresh attempt. Do not navigate or reload the opener while the popup is open. |
| `no_code` | The callback returned without an authorization code. | Retry. If it persists, check that the origin the page runs on is registered. |
| `token_request_failed` | The code-for-token exchange was rejected. | Check the client ID, that the client is registered as **public**, and that the requested scopes are granted to it. |
| `access_denied` | The user declined on the consent screen. | Treat as a cancel, same as `closed_by_user`. |
`error` may also carry any other OAuth error returned by the authorize endpoint, such as
`invalid_scope` for a scope your client is not registered for. Handle unknown values with a generic
failure path rather than assuming the list above is exhaustive at runtime.
## How the popup flow works
1. **The widget prepares a PKCE pair**
On click it generates a random `code_verifier` and derives the S256 `code_challenge` using Web
Crypto. The verifier stays on your page and is never transmitted.
2. **A popup opens the authorize URL**
The popup goes to `https://api.insy.io/oauth/authorize` carrying the challenge, your client ID,
the scope and a state value.
3. **The user signs in and consents**
Everything credential-related happens on Insy's own origin. Your page never sees the user's
password. The consent screen names your page's host as the place the user will be sent — the
origin the widget put in `state`, once Insy has checked it is one of the client's registered web
origins — not the host of Insy's callback page.
4. **The popup lands on a callback page Insy hosts**
That page posts the authorization code back to the opener — your page — and closes.
5. **Your page exchanges the code**
The widget calls `POST /oauth/token` with the code and the verifier it kept, then delivers the
result through `data-on-auth` and the `insy-auth` event.
This split is what makes a browser-only client safe: the authorization code is useless without the
matching `code_verifier`, which never leaves your page, so an attacker who intercepts it — from a
log, a referrer header, or a malicious extension reading the popup URL — cannot redeem it. The code
is also single-use and expires after 60 seconds.
## Registering web origins
The widget only runs on origins registered on the client at
[Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients). An origin
is the scheme, host and port together.
Each entry is either an exact origin or a host with one leading `*.` label, which covers every
subdomain beneath it at any depth — the latter exists for per-branch preview deploys. The scheme and
the port are never wildcarded.
You do not register a redirect URI for the widget. The flow always returns to the callback page Insy
hosts at `https://insy.io/oauth/widget-callback`, accepted for any client with at least one web
origin registered — your web origins are what gate where the widget runs.
### Exact origins
```text title="Registered"
https://shop.example
https://app.shop.example
http://localhost:5173
```
`https://shop.example` matches only `https://shop.example`. It does not cover
`https://www.shop.example`, `http://shop.example` or `https://shop.example:8443` — register each one
you actually use.
### Wildcard subdomains
```text title="Registered"
https://*.vercel.app
```
| Origin | Matches | Why |
| --- | --- | --- |
| `https://my-app-git-main.vercel.app` | Yes | Any host under the suffix matches. |
| `https://preview-42.vercel.app` | Yes | Same. |
| `https://deep.nested.vercel.app` | Yes | The wildcard matches at any depth, not just one label. |
| `https://vercel.app` | No | The apex is not covered by a wildcard label. Register it separately. |
| `http://my-app.vercel.app` | No | The scheme is never wildcarded. |
| `https://my-app.vercel.app:8443` | No | The port is never wildcarded. |
If you need the apex as well as the previews, register both `https://vercel.app` and
`https://*.vercel.app`.
Every host under the suffix is authorised, at every depth, to run the widget and to call the token
endpoint cross-origin. Register the narrowest suffix you control — on a shared preview domain that
means asking for exact origins instead.
> **Register your local dev origin too**
>
> The widget runs on `localhost` without HTTPS, because `localhost` is a secure context. Ask for your
> dev origin — including the port, for example `http://localhost:5173` — at registration time so you
> are not blocked on the first day.
## Security
> **Tokens land in the browser**
>
> The widget hands the access token and the refresh token to JavaScript running on your page. Treat
> them as user-scoped credentials with the same care you would give a session cookie:
>
> - **Do privileged work on your own server.** Post the access token to your backend and let the
> backend call Insy. Do not build user-facing features that assume the browser is a trusted caller.
> - **Avoid persisting the refresh token in `localStorage`.** It is readable by any script on the
> page, including anything a compromised dependency injects, and it is valid for 30 days.
> - **Scope down.** Ask only for what the page genuinely needs. A widget that only checks membership
> status has no reason to hold `products.read`.
> - **Verify server-side.** Anything the browser tells your backend about the user should be
> re-derived from the token via `GET /oauth/userinfo`, keyed on `sub`.
If your application has a backend that can hold a secret, the [server-side flow](/developers/oauth/server-side)
with a confidential client keeps tokens out of the browser entirely and is the stronger option.
---
# Quickstart
Source: https://docs.insy.io/developers/quickstart
Insy exposes three integration surfaces, and which one you want depends on whose data you are
touching. Pick a surface, then follow the section that matches.
- **API key** — server-to-server. You act on behalf of a community you own or administer.
- **Sign in with Insy (OAuth 2.0)** — you act on behalf of an Insy user, after they grant you
access.
- **Webhooks** — you react to things that happen inside Insy, with no polling.
They are not mutually exclusive. A typical integration uses an API key to create checkouts and a
webhook to learn when the payment succeeded.
- **[I run the community](/developers/api)** — You have your own funnel, landing page or CRM and want to provision memberships and open checkouts. Use an API key.
- **[I want users to log in](/developers/oauth)** — You are building a product for Insy users and need to read their memberships or products with their consent. Use OAuth.
- **[I need to know when things happen](/developers/webhooks)** — Payments, membership changes and digital product purchases, pushed to your endpoint as signed JSON.
- **[I just want the reference](/developers/api/endpoints)** — Every endpoint an API key can call, with request and response shapes.
## Choosing a surface
| | API key | OAuth 2.0 | Webhooks |
| ---------------------- | --------------------------------------------- | ---------------------------------------- | -------------------------------------------- |
| Direction | You call Insy | You call Insy | Insy calls you |
| Acts on behalf of | Communities you administer | An Insy user who consented | Not applicable |
| Credential | `insy_` key, `Authorization: Bearer` | `client_id` and access token | A 64-hex signing secret |
| Who issues it | You, inside the Insy app | You, inside the Insy app | The creator, inside the Insy app |
| User interaction | None | The user sees a consent screen | None |
| Scope of access | Permission bitmask, plus OWNER or ADMIN on the community | `memberships.read`, `products.read` | All five event types, filter in your handler |
| Typical use | Provision a membership, create a checkout | Sign in, read the user's memberships | Fulfil an order when payment succeeds |
| Runs in a browser | No — the key is a server secret | Yes, via the login widget | No |
> **Never ship an API key to a browser**
>
> An API key acts as the user it was issued to, on every community where that user is an OWNER or
> ADMIN — not just one. It belongs on your server, in an environment variable. If you need
> something client-side, use the OAuth login widget, which is a public client and holds no secret.
## Path 1 — API key
Use this when you own the community and want to drive it from your own systems.
1. **Create a key**
Open [Account → Developer → API keys](https://insy.io/account/developer/api-keys), press
**Create key**, and tick the permissions you need: `MEMBERSHIP_READ`, `MEMBERSHIP_WRITE`,
`CHECKOUT_WRITE`, `DROP_NOTIFICATION_WRITE`. A key belongs to a user account rather than to
one community, so it reaches every community that account administers. The plaintext key is
shown once, at creation, and stored only as a hash — save it immediately.
2. **Confirm your community role**
Every request that carries a `communityId` also checks that the key owner holds an active
OWNER or ADMIN membership in that community. Without it the call fails with 403 even when the
permission bit is set.
3. **Make a call**
Send the key as `Authorization: Bearer insy_...`. There is no `x-api-key` header. Full details
in [Authentication](/developers/api/authentication) and the
[endpoint reference](/developers/api/endpoints).
### Your first request
This creates a hosted checkout session and returns a URL you send the buyer to. It needs the
`CHECKOUT_WRITE` permission.
**curl**
```bash
curl -X POST https://api.insy.io/api/checkout/buy-plan \
-H "Authorization: Bearer insy_4f3a9c1e7b2d5081a6c4e9f3b7d2508a" \
-H "Content-Type: application/json" \
-d '{
"pricingPlanId": "8f14e45f-ceea-4d19-9b0a-1c2d3e4f5a6b",
"communityId": "3c9a7b21-5d4e-4f8a-9c1b-0e2d4f6a8b3c",
"externalId": "order_10482",
"email": "buyer@example.com",
"successUrl": "https://shop.example/thanks",
"cancelUrl": "https://shop.example/pricing",
"utmSource": "newsletter"
}'
```
**Node.js**
```js
const response = await fetch("https://api.insy.io/api/checkout/buy-plan", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INSY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
pricingPlanId: "8f14e45f-ceea-4d19-9b0a-1c2d3e4f5a6b",
communityId: "3c9a7b21-5d4e-4f8a-9c1b-0e2d4f6a8b3c",
externalId: "order_10482",
email: "buyer@example.com",
successUrl: "https://shop.example/thanks",
cancelUrl: "https://shop.example/pricing",
utmSource: "newsletter",
}),
});
const body = await response.json();
// buy-plan answers 201 even when it fails, so a missing URL means failure.
const url = body?.data?.checkoutUrl;
if (!url) {
throw new Error(body?.message ?? "checkout session was not created");
}
console.log(url);
```
A successful response uses the standard envelope:
```json title="Response"
{
"success": true,
"data": { "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_live_..." }
}
```
`errorCode` and `message` appear only on failures, so branch on `success`, not on
`errorCode === null`. buy-plan returns `201` even when it fails — treat a missing
`data.checkoutUrl` as failure and read `message` for the reason.
The host of `checkoutUrl` depends on the payment provider configured on the plan: a Stripe-hosted
page, or CoinGate for a crypto plan. Treat `checkoutUrl` as opaque, redirect the buyer to it
as-is, and do not allowlist a host.
> **This is not a sandbox**
>
> Insy has one environment. The request above creates a real checkout session and completing it
> takes a real payment — there is no test mode. Point your first calls at a community you control.
## Path 2 — Sign in with Insy
Use this when the data belongs to an Insy user rather than to you.
1. **Register a client**
Open [Account → Developer → OAuth clients](https://insy.io/account/developer/oauth-clients)
and press **Create client**: application name, redirect URIs, the scopes you need
(`memberships.read`, `products.read`), and — for a browser widget — the web origins it will
run on. You get a `client_id` back straight away, plus a `client_secret` if the client is
confidential.
2. **Pick confidential or public**
A confidential client has a secret and sends it in the token request body. A public client has
no secret and must use PKCE. The type is a property of the client, not something chosen per
request, and you can change it later on the client's own screen. See
[PKCE](/developers/oauth/pkce).
3. **Run the flow**
Either drop in the [login widget](/developers/oauth/widget) — one script tag, no backend — or implement
the [server-side authorization code flow](/developers/oauth/server-side) yourself. Then call
[the resource endpoints](/developers/oauth/reference) with the access token.
> **Two things that break strict OAuth libraries**
>
> `POST /oauth/token` answers with HTTP 201, not the 200 the RFC mandates, and HTTP Basic
> (`client_secret_basic`) is not supported — credentials go in the request body
> (`client_secret_post`). Configure your library accordingly. Both are covered in
> [the OAuth reference](/developers/oauth/reference).
## Path 3 — Webhooks
Use this to learn about payments, membership changes and digital product purchases without
polling.
1. **Register an endpoint**
Webhooks are registered inside the Insy app by the account that owns the community or product,
not through a public API. You receive a signing secret of 64 hex characters, shown when the
webhook is created and returned again when you re-save it.
2. **Verify every request**
`X-Insy-Signature` is an HMAC-SHA256 of the raw request body, keyed with the secret as a
literal 64-character string — do not hex-decode it first. Verify before parsing the JSON. See
[Verifying signatures](/developers/webhooks/verify).
3. **Handle the five event types**
Every active webhook receives all of `membership.created`, `membership.updated`,
`payment.success`, `payment.failed` and `digital.product.purchase`; there is no per-event
subscription. Switch on `X-Insy-Event-Type`, deduplicate on `X-Insy-Event-Id`, and respond 2xx
within 10 seconds. See [Events](/developers/webhooks/events).
## Next
- **[API authentication](/developers/api/authentication)** — Key format, the permission bitmask and the community role check.
- **[Endpoint reference](/developers/api/endpoints)** — The complete list of five endpoints an API key can call.
- **[Webhook events](/developers/webhooks/events)** — The envelope and the payload fields of each event type.
- **[OAuth reference](/developers/oauth/reference)** — Endpoints, token lifetimes, error shapes and known deviations from the RFC.
---
# Webhooks
Source: https://docs.insy.io/developers/webhooks
Instead of polling, you register an endpoint and Insy sends it a signed HTTP `POST` with a JSON body whenever a membership, payment or digital product purchase changes. There are exactly five event types — `membership.created`, `membership.updated`, `payment.success`, `payment.failed` and `digital.product.purchase` — documented on [Events](/developers/webhooks/events).
## Registering an endpoint
Register endpoints inside the Insy app, under the account that will receive the events. Management is first-party: there is no public REST API to create, list or delete webhooks, and no way to script registration.
1. **Add the endpoint in your Insy account**
Provide the HTTPS URL that will receive deliveries.
2. **Copy the signing secret**
32 random bytes as 64 hexadecimal characters, shown once when the webhook is created. Store it where your handler can read it (an env var). The list won't show it again, but saving the webhook returns it, so it is recoverable without recreating the endpoint.
3. **Verify and acknowledge**
Your handler recomputes the signature over the raw body, compares it in constant time, then answers `2xx`. See [Verifying signatures](/developers/webhooks/verify).
## Who receives which events
A webhook belongs to a **user**, not to a community or product. Which events reach that user depends on their role:
| Events | Delivered to the webhooks of |
| --- | --- |
| `membership.created`, `membership.updated`, `payment.success`, `payment.failed` | The community's `owner`, `admin` and `moderator` members |
| `digital.product.purchase` | The creator of the product |
Every active webhook belonging to an eligible user receives the event.
> **There is no per-event subscription**
>
> You cannot subscribe a webhook to a subset of event types. Every active webhook of an eligible user receives all five types, so your handler must branch on `event_type` and ignore what it does not care about. Treat an unrecognised `event_type` as a no-op and still return `2xx` — new fields and future payload additions should not break you.
## The delivery contract
Each delivery is a `POST` to your URL with a JSON body and these headers:
| Header | Value |
| --- | --- |
| `Content-Type` | `application/json` |
| `X-Insy-Signature` | Lowercase hex HMAC-SHA256 of the raw request body |
| `X-Insy-Event-Id` | Event identifier, in the form `insy_event__` |
| `X-Insy-Event-Type` | One of the five event types |
### Timing and retries
- A dispatcher runs **once a minute** and picks up to **100 pending deliveries** per run.
- Each request has a **10 second timeout**.
- **Any `2xx` counts as success.** The response body is ignored.
- Anything else — a non-`2xx` status, a connection error, a timeout — is a failure and is retried on a later dispatcher run, up to **3 attempts in total**. After the third attempt the delivery is abandoned.
- There is **no exponential backoff** and **no manual replay**. A delivery that exhausts its attempts is gone; you cannot ask Insy to send it again.
A burst can queue up behind the per-minute batch, so events arrive close to real time, not instantly — there is no latency guarantee.
> **Delivery is at-least-once and unordered**
>
> The same event can arrive more than once, and events can arrive out of order — `membership.updated` may land before the `membership.created` for the same membership, and a retried delivery can overtake a newer one. Make your handler idempotent: key on `X-Insy-Event-Id`, record ids you have already processed, and drop repeats. When you apply state, prefer the values in the payload over assumptions about what came before.
## Handling deliveries
- **Acknowledge, then process.** The 10 second timeout counts against you, so respond `2xx` immediately and do slow work from your own queue, where you control retries. A non-`2xx` buys two more attempts and nothing else.
- **Verify before you parse.** Your endpoint is public; anyone can post JSON to it. Run the HMAC check over the raw bytes first — see [Verifying signatures](/developers/webhooks/verify).
- **Reject forgeries with `401`.** An invalid signature is the one case where failing is right: a genuinely forged request keeps failing and is discarded, while a transient misconfiguration gets a couple more chances.
- **Log the raw body on verification failure**, at least while integrating — it is the only way to tell a wrong secret from a re-serialised body.
- **[Events](/developers/webhooks/events)** — The shared envelope and the payload of all five event types.
- **[Verifying signatures](/developers/webhooks/verify)** — The HMAC scheme, the hex-decoding trap, and runnable examples.
---
# Events
Source: https://docs.insy.io/developers/webhooks/events
Insy sends five event types, and every active webhook of an eligible user receives all of them. Each delivery uses the same envelope; only the contents of `data` differ per type. Branch on `event_type` and ignore anything you do not handle.
| Event type | Fires when |
| --- | --- |
| `membership.created` | A membership is created for a user in a community |
| `membership.updated` | An existing membership's active state flips |
| `payment.success` | A payment completes |
| `payment.failed` | A payment does not complete |
| `digital.product.purchase` | A digital product is purchased |
## The envelope
Every event has the same four top-level fields.
```json title="Envelope"
{
"event_type": "membership.created",
"event_id": "insy_event_1756742400000_k3f9d2a1x8b",
"data": {
"membershipId": "4f9a1c2e-7b3d-4e58-9c01-6d2f8a5b3e17",
"metadata": { "userProfile": {} }
},
"timestamp": "1756742400000"
}
```
| Field | Type | Description |
| --- | --- | --- |
| `event_type` | string | One of the five event types. Also sent as the `X-Insy-Event-Type` header. |
| `event_id` | string | The event identifier, in the same `insy_event__` form as the `X-Insy-Event-Id` header. Use it as your deduplication key. |
| `data` | object | The event payload. Always contains `metadata`, plus the type-specific fields documented below. |
| `timestamp` | string | Epoch **milliseconds**, as a JSON **string**. |
> **timestamp is a string of epoch milliseconds**
>
> `"timestamp": "1756742400000"` is not ISO-8601 and not a number. A schema that types it as an integer or parses it as a date string will fail. Convert it explicitly: `new Date(Number(event.timestamp))` in JavaScript, `datetime.fromtimestamp(int(event["timestamp"]) / 1000, tz=timezone.utc)` in Python. Also note that this is the event's own timestamp, not the delivery time — a retried delivery carries the original value.
### data.metadata.userProfile
Every payload carries `data.metadata.userProfile`, the Insy profile of the user the event is about. The examples below abbreviate it as `{}`. Read the properties you need defensively and ignore the rest; the object is additive.
The `data` fields listed in the tables below are in addition to `metadata`.
> **Treat status-like strings as open sets**
>
> `role`, `paymentStatus`, `paymentMethod`, `paymentType` and `lastPaymentMethod` come from server-side enums that can gain members without notice. The values documented below are the ones in use today. Match the values you care about and let unknown ones fall through to a default branch rather than throwing.
>
> They are lowercase snake_case on the wire — `stripe`, `stripe_one_time`, `one_time`, `partially_refunded`. Compare against the lowercase form.
## membership.created
Fires when a membership record is created for a user in a community. Delivered to the webhooks of that community's `owner`, `admin` and `moderator` members.
Creation is not activation: a membership backed by a not-yet-active Stripe subscription is created with `isActive: false`, so `membership.created` can arrive for a member without access. Grant access only when `isActive` is `true`, not on the event itself.
| Field | Type | Description |
| --- | --- | --- |
| `membershipId` | string | Identifier of the membership. Stable across later updates, so it is the right key to store. |
| `isActive` | boolean | Whether the membership is active now. |
| `wasActive` | boolean | Whether it was active before this change. |
| `role` | string | The role the user holds in the community. The values are `owner`, `admin`, `moderator` and `member`. |
| `validFrom` | string | Start of the membership window, ISO-8601. |
| `validUntil` | string | End of the membership window, ISO-8601. Do not assume it is always populated — a lifetime membership has no end date. |
| `lastPaymentMethod` | string | The payment method most recently used for this membership. |
```json title="membership.created"
{
"event_type": "membership.created",
"event_id": "insy_event_1756742400000_k3f9d2a1x8b",
"data": {
"membershipId": "4f9a1c2e-7b3d-4e58-9c01-6d2f8a5b3e17",
"isActive": true,
"wasActive": false,
"role": "member",
"validFrom": "2025-09-01T16:00:00.000Z",
"validUntil": "2025-10-01T16:00:00.000Z",
"lastPaymentMethod": "stripe",
"metadata": { "userProfile": {} }
},
"timestamp": "1756742400000"
}
```
## membership.updated
Fires when a membership's active state flips — an activation or a lapse. The payload has the same shape as `membership.created`.
A role change, or a renewal that only moves `validUntil` while the membership stays active, does **not** produce a webhook. Poll or re-read the membership if you need those.
| Field | Type | Description |
| --- | --- | --- |
| `membershipId` | string | Identifier of the membership being updated. |
| `isActive` | boolean | The state after the change. |
| `wasActive` | boolean | The state before the change. |
| `role` | string | The role the user holds in the community. |
| `validFrom` | string | Start of the membership window, ISO-8601. |
| `validUntil` | string | End of the membership window, ISO-8601. |
| `lastPaymentMethod` | string | The payment method most recently used for this membership. |
The pair `wasActive` and `isActive` tells you which direction the membership moved:
| `wasActive` | `isActive` | Meaning |
| --- | --- | --- |
| `false` | `true` | **Activation** — grant access. |
| `true` | `false` | **Lapse** — revoke access. |
`wasActive` is always the negation of `isActive` — every membership event is a transition. There is no "nothing changed" delivery.
Deliveries are unordered and can repeat, so do not toggle a flag on receipt — compare against the state you hold and treat `isActive` and `validUntil` from the payload as authoritative.
```json title="membership.updated — a lapse"
{
"event_type": "membership.updated",
"event_id": "insy_event_1756831245880_9qz4m7t2v1c",
"data": {
"membershipId": "4f9a1c2e-7b3d-4e58-9c01-6d2f8a5b3e17",
"isActive": false,
"wasActive": true,
"role": "member",
"validFrom": "2025-09-01T16:00:00.000Z",
"validUntil": "2025-09-02T16:00:00.000Z",
"lastPaymentMethod": "stripe",
"metadata": { "userProfile": {} }
},
"timestamp": "1756831245880"
}
```
## payment.success
Fires when a payment completes. Delivered to the webhooks of the community's `owner`, `admin` and `moderator` members.
| Field | Type | Description |
| --- | --- | --- |
| `paymentId` | string | Identifier of the payment. Use it, together with the event id, to keep your bookkeeping idempotent. |
| `membershipId` | string | The membership this payment belongs to. |
| `paymentStatus` | string | Status of the payment. For `payment.success` this is always `completed` — the event type is derived from it. |
| `paymentMethod` | string | How the payment was made. |
| `paymentType` | string | What kind of payment it is. The values are `subscription`, `one_time` and `refund`. |
| `amountCents` | integer | Amount in **minor units** of `currency`. `4900` with `"currency": "pln"` is 49.00 PLN. |
| `currency` | string | Currency code for `amountCents`. Case is not normalised — Stripe-settled payments send the lowercase ISO code (`pln`, `usd`), crypto settlements may send uppercase. Compare case-insensitively. |
| `periodStart` | string, optional | Start of the paid period, ISO-8601. |
| `periodEnd` | string, optional | End of the paid period, ISO-8601. |
| `durationMonths` | integer, optional | Length of the paid period in months. |
> **The period fields are omitted, not null**
>
> `periodStart`, `periodEnd` and `durationMonths` are dropped from the JSON entirely when the emitting code does not set them, so the keys are absent rather than `null`. `durationMonths` in particular is only sent on one-time and crypto purchases — a `subscription` payment never carries it. Guard for the missing key: `new Date(data.periodEnd)` on an absent field yields `Invalid Date`.
> **amountCents is minor units**
>
> Never render `amountCents` directly. Divide by 100 for currencies with two decimal places, and do the arithmetic in integers — floating point on money is how rounding bugs get shipped.
```json title="payment.success"
{
"event_type": "payment.success",
"event_id": "insy_event_1756742463127_7hd4p9s2n6r",
"data": {
"paymentId": "b81d5f60-3c2a-4d19-95e7-0af6c3241b8d",
"membershipId": "4f9a1c2e-7b3d-4e58-9c01-6d2f8a5b3e17",
"paymentStatus": "completed",
"paymentMethod": "stripe",
"paymentType": "subscription",
"amountCents": 4900,
"currency": "pln",
"periodStart": "2025-09-01T16:00:00.000Z",
"periodEnd": "2025-10-01T16:00:00.000Z",
"metadata": { "userProfile": {} }
},
"timestamp": "1756742463127"
}
```
## payment.failed
Fires when a payment does not complete. In practice this means one thing: a subscription renewal invoice Stripe could not charge, typically a declined card. Same field names as `payment.success`, but fewer of them — see the note below.
| Field | Type | Description |
| --- | --- | --- |
| `paymentId` | string | Identifier of the failed payment. |
| `membershipId` | string | The membership the payment was for. |
| `paymentStatus` | string | Status of the payment. For `payment.failed` this is always `failed`. |
| `paymentMethod` | string | How the payment was attempted. Today this is always `stripe`, since only a Stripe renewal charge produces the event. |
| `paymentType` | string | What kind of payment it was. Today this is always `subscription`, for the same reason. |
| `amountCents` | integer | Amount in minor units of `currency`. |
| `currency` | string | Currency code for `amountCents`. Case is not normalised — see the note under `payment.success`. |
> **No period fields on payment.failed**
>
> Unlike `payment.success`, a `payment.failed` body never carries `periodStart`, `periodEnd` or `durationMonths`. The only code path that emits this event does not set them, and absent values are omitted from the JSON rather than sent as `null`. Do not read those keys here.
A failed payment is not, by itself, a loss of access. The membership state is carried by `membership.updated`: expect a lapse only when a later event reports `wasActive: true` with `isActive: false`.
```json title="payment.failed"
{
"event_type": "payment.failed",
"event_id": "insy_event_1756831188441_c5w8j1r4y0k",
"data": {
"paymentId": "e02b7a94-6d15-42c8-b3f1-58ac0d97e264",
"membershipId": "4f9a1c2e-7b3d-4e58-9c01-6d2f8a5b3e17",
"paymentStatus": "failed",
"paymentMethod": "stripe",
"paymentType": "subscription",
"amountCents": 4900,
"currency": "pln",
"metadata": { "userProfile": {} }
},
"timestamp": "1756831188441"
}
```
## digital.product.purchase
Fires when a digital product is purchased. Unlike the other four, this event is delivered to the webhooks of the **product's creator**, not to community moderators.
| Field | Type | Description |
| --- | --- | --- |
| `membershipId` | string | The membership created for the purchase. |
| `productVariantId` | string | The specific variant of the product that was bought. |
| `paymentId` | string | The payment behind the purchase. |
| `amountCents` | integer | Amount in minor units of `currency`. |
| `currency` | string | Currency code for `amountCents`. This event is always Stripe-settled, so the code is lowercase (`pln`, `usd`). |
| `validFrom` | string | Start of the access window, ISO-8601. |
| `validUntil` | string | End of the access window, ISO-8601. |
```json title="digital.product.purchase"
{
"event_type": "digital.product.purchase",
"event_id": "insy_event_1756744812004_m2v6b3t9q7d",
"data": {
"membershipId": "a17c8e42-9f05-4b6d-8e31-27c9a4d05f6b",
"productVariantId": "5d3f0b71-8a24-4c96-a0e5-1b7f62d84c39",
"paymentId": "c94e2d18-7b60-4f53-8a2c-3e15d097ab42",
"amountCents": 12900,
"currency": "pln",
"validFrom": "2025-09-01T16:40:12.004Z",
"validUntil": "2026-09-01T16:40:12.004Z",
"metadata": { "userProfile": {} }
},
"timestamp": "1756744812004"
}
```
## Routing the five types
A single handler receives everything, so the dispatch is a switch with a default branch that does nothing but still acknowledges.
```js title="Node.js"
function handle(event) {
switch (event.event_type) {
case "membership.created":
// A created membership is not always active — grant only when it is.
return event.data.isActive ? grantAccess(event.data) : undefined;
case "membership.updated":
return event.data.isActive
? grantAccess(event.data)
: revokeAccess(event.data);
case "payment.success":
return recordPayment(event.data);
case "payment.failed":
return flagDunning(event.data);
case "digital.product.purchase":
return fulfilProduct(event.data);
default:
// Unknown type: acknowledge and move on.
return undefined;
}
}
```
Signature verification comes first — see [Verifying signatures](/developers/webhooks/verify).
---
# Verifying signatures
Source: https://docs.insy.io/developers/webhooks/verify
Your webhook endpoint is a public URL — anyone can post JSON to it, and the only thing that separates a real Insy delivery from a forgery is the `X-Insy-Signature` header. Verify it before you parse the body or act on anything inside it.
## The scheme
Insy computes:
```text title="Signature"
X-Insy-Signature = hex_lowercase( HMAC_SHA256( key = signing_secret, message = raw_request_body ) )
```
Four properties, all of which matter:
| Property | Value |
| --- | --- |
| Algorithm | HMAC-SHA256 |
| Key | Your signing secret — 64 hexadecimal characters — used as a **literal UTF-8 string** |
| Message | The **raw request body bytes**, exactly as received |
| Encoding | Lowercase hexadecimal |
You get the signing secret when the webhook is created; see [Registering an endpoint](/developers/webhooks) for recovering it.
> **Do not hex-decode the secret**
>
> The secret looks like hex because it is a hex rendering of 32 random bytes — but the HMAC key is the **64-character ASCII string**, not those 32 bytes. Decoding it first produces a completely different digest and every verification will fail.
>
> - Node.js: `crypto.createHmac("sha256", secret)` where `secret` is the string. Not `Buffer.from(secret, "hex")`.
> - Python: `secret.encode("utf-8")`, which gives 64 bytes. Not `bytes.fromhex(secret)`.
> - PHP: pass the string straight to `hash_hmac`. Not `hex2bin($secret)`.
>
> This is the single most common cause of a failing check, and it fails silently — the digest is well-formed, just wrong.
> **Sign the raw body, not a re-serialised one**
>
> The HMAC covers the exact bytes Insy sent. If a JSON body parser has already turned the request into an object, `JSON.stringify()` of that object is a *different* byte sequence — key order, whitespace, number formatting and Unicode escaping all drift — and the signature will not match.
>
> Capture the raw body first: `express.raw({ type: "application/json" })` in Express, `request.get_data()` in Flask, `file_get_contents('php://input')` in PHP. In frameworks that parse globally, exempt the webhook route or stash the raw buffer during parsing.
## Verification steps
1. **Read the raw body**
As bytes, before any JSON middleware touches it.
2. **Compute the HMAC**
HMAC-SHA256 over those bytes, keyed with the secret as a string, hex-encoded lowercase.
3. **Compare in constant time**
Use `crypto.timingSafeEqual`, `hmac.compare_digest` or `hash_equals`. A plain `===` comparison leaks timing information about how many leading characters matched.
4. **Reject or acknowledge**
On mismatch, return `401` and do nothing else. On success, parse the body, respond `2xx` immediately and queue the work.
## Examples
Each example verifies, then acknowledges before doing any real work, because the delivery times out after 10 seconds.
**Node.js — Express**
```js
import crypto from "node:crypto";
import express from "express";
const app = express();
// 64 hex characters, used as a string. Never Buffer.from(secret, "hex").
const SECRET = process.env.INSY_WEBHOOK_SECRET;
// express.raw gives req.body as a Buffer of the untouched bytes. Mount it on
// this route; if the app also uses express.json(), keep that off this path.
app.post(
"/webhooks/insy",
express.raw({ type: "application/json" }),
(req, res) => {
const received = req.get("x-insy-signature") ?? "";
const expected = crypto
.createHmac("sha256", SECRET)
.update(req.body)
.digest("hex");
const a = Buffer.from(received, "utf8");
const b = Buffer.from(expected, "utf8");
// timingSafeEqual throws on a length mismatch, so check length first.
if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) {
res.status(401).send("invalid signature");
return;
}
const eventId = req.get("x-insy-event-id");
const event = JSON.parse(req.body.toString("utf8"));
// Acknowledge first, process out of band.
res.status(200).send("ok");
void enqueue(eventId, event);
},
);
app.listen(3000);
```
**Python — Flask**
```python
import hashlib
import hmac
import os
from flask import Flask, request
app = Flask(__name__)
# .encode() gives the 64 ASCII bytes of the secret. Never bytes.fromhex().
SECRET = os.environ["INSY_WEBHOOK_SECRET"].encode("utf-8")
@app.post("/webhooks/insy")
def insy_webhook():
raw = request.get_data() # bytes, before any JSON parsing
received = request.headers.get("X-Insy-Signature", "")
expected = hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, received):
return "invalid signature", 401
event_id = request.headers.get("X-Insy-Event-Id")
event = request.get_json()
# Hand off to a queue; do not do slow work in the request.
enqueue(event_id, event)
return "", 200
```
**PHP**
```php
**One account, whichever door you use**
>
> Your account is tied to your identity, not to a login method. Logging in with the same email — or
> linking the same Telegram — reaches the same account rather than making a second one.
## What "no sign-up" means in practice
- You never create a password, so there's nothing to reset or leak.
- No registration form, no email-confirmation step, no "activate your account" wait.
- The first login **is** the sign-up. Whatever the login hands over — your email, your Google name,
your Telegram username — becomes your account's starting details, editable later on your
[profile](/getting-started/profile).
## Phone numbers and verification
You don't need a phone number to have an account. Where one comes in:
- **Logging in with Telegram and sharing your number** marks it verified immediately — Telegram has
already checked it, so Insy sends no code of its own.
- Adding or changing a number some other way can require a verification step.
> **Extra security screens exist, but aren't part of normal login**
>
> Insy has building blocks for SMS phone-verification and two-factor authentication (an
> authenticator-app code), but these are **not** part of the everyday login — a normal login is just
> the email link, Google, or Telegram above. If you never see a code prompt, nothing is wrong.
## Once you're in
You land in the Insy app as a normal account. There's no seller application — creating your first
community or digital product is what turns you into a seller. Before that, make your public profile
presentable.
- **[Set up your profile](/getting-started/profile)** — Display name, @username, avatar, bio and links — what buyers see.
- **[Understand fees](/getting-started/fees)** — What Insy takes when you make a sale.
---
# Understanding fees
Source: https://docs.insy.io/getting-started/fees
When you make a sale, Insy takes a commission and passes the rest to your balance. Here's exactly
what comes off the top.
## The platform commission
Insy's standard commission is **8% of the sale** — the default on both card and crypto. How it's
charged differs by rail:
- **Card sales** — Insy collects its commission through Stripe as an **application fee**. VAT on the commission depends on the merchant's billing details and applicable treatment. When 23% VAT applies, an 8% base commission becomes **9.84% of the sale**.
- **Crypto sales** — The standard commission is **8%**. Crypto fees are handled through a separate billing arrangement rather than shown like card — getting paid in crypto is covered in the payouts section.
VAT included in the platform fee is separate from sales tax on your buyer's purchase. Complete your
country and business details before selling: do not assume the Polish example applies to every
merchant. The transaction breakdown shows the fee and its included VAT separately.
The commission is calculated on the full amount the buyer pays. If you collect VAT on top of your
price through Stripe Tax, that includes the VAT: on a 100 zł + 23% VAT sale the base is 123 zł.
## Payment-provider costs are passed through to you
The commission is Insy's own cut. Separately, the payment provider that processes the sale — Stripe
for cards, the crypto processor for crypto — charges its own fee, and **that fee is carried by the
sale that caused it**: it comes out of your side, not Insy's.
So a sale splits like this:
1. Insy takes its commission, including VAT where applicable.
2. The payment provider's processing fee comes off your share.
3. What's left is credited to your balance.
Use the recorded settlement for the amount credited by Stripe. Its currency may differ from the
purchase currency, and an affiliate commission can be shown separately in its own currency.
## A worked example
For a **100 PLN** card sale with an 8% base commission and 23% VAT on that commission:
| Line | Amount |
| --------------------------------------- | ------------- |
| Sale | 100.00 PLN |
| Insy commission (8% + 23% VAT = 9.84%) | −9.84 PLN |
| Stripe's own processing fee | passed to you |
| **Your balance** | the remainder |
Stripe's fee depends on the card, so it's shown as "passed to you" rather than a fixed figure — it's
set by the payment provider, not Insy.
## Who sets the rate
> **Fees aren't self-serve**
>
> 8% is the standard base commission. There's no screen to change your own commission — rates are managed by the Insy team and
> can be set per product or community. If your account has an agreed rate that differs from the
> default, that rate applies.
## Reading the recorded fee
The **Insy platform fee** in [transaction details](/selling/transaction-details) uses the application
fee reported by Stripe. Until those details arrive, Insy can show an estimate using the rate saved
with the payment. **VAT included in platform fee** is already inside that fee, not an extra charge.
**Settlement fees** are the total fees reported on Stripe's balance transaction. Do not add the
separately displayed Insy application fee to that total again.
## What isn't a fee
- **Creating an account, profile, community or product costs nothing.** You're only charged as a
share of a sale that actually happened.
- **The commission is on sales, not on your balance.** Holding a balance doesn't cost you over time.
## Next
- **[Getting paid out](/payouts)** — How your balance becomes money in your account, and any hold before it can be withdrawn.
- **[Selling & payments](/selling)** — Prices, checkout, coupons and how buyers pay.
---
# Setting up your profile
Source: https://docs.insy.io/getting-started/profile
Your profile is the public face buyers see, and the page your communities and products live on. Get
it right before you share a link. Everything here is editable at any time.
## The basics
- **Display name** — The name shown across Insy — your brand or your own name. Up to 50 characters.
- **@username** — Your unique handle and the address of your public page. It's tidied into a clean slug (lowercase, no spaces) and no two people can share one.
- **Bio** — A short description of who you are and what you offer. Up to 1000 characters.
- **Avatar** — A profile picture. If you logged in with Telegram, your Telegram photo can be used as a starting point; you can upload your own or remove it entirely.
> **Your @username is your link**
>
> The username is your public page's address, so pick something you're happy to hand out. You can
> change it later, but anyone using the old link will need the new one.
## Contact and social links
Add links so buyers can find and reach you — all optional, and blanks don't appear on your page:
- **Public contact email** — a separate address you're happy to show publicly. It doesn't have to
be your login email.
- **Instagram**
- **TikTok**
- **Telegram**
- **Discord**
- **Website**
> **Your login email stays private**
>
> The contact email on your profile is a display field you choose to show. It's separate from the
> email your account logs in with, which is never put on your public page.
## The profile showcase
Your public page lists the communities and digital products you sell — but you decide which appear,
and in what order. For each item you can:
- **Show or hide it** — keep a work-in-progress or a private offer off your public page until it's
ready.
- **Pin it** — pinned items are highlighted at the top so your headline offer leads.
Items only appear in the showcase after you create the community or product they point to. A
brand-new account has nothing to show or pin yet.
## Marketing emails from Insy
Your account has a switch for whether Insy may send you its **own newsletter and promotional
email**.
> **This toggle is about Insy's newsletter only**
>
> Turning off marketing email stops Insy's promotional sends. It does **not** stop email about your
> own account or sales — login links, receipts and payout notices are account mail, not marketing,
> and keep arriving regardless.
## Next
- **[Understand fees](/getting-started/fees)** — What Insy takes when you sell.
- **[Sell a community](/communities)** — Set up a paid community and gate a Telegram group.
---
# Welcome to Insy — what it is and how it works
Source: https://docs.insy.io/getting-started/welcome
Insy is a platform for **selling access**. You set up what you're selling once, and Insy handles
the checkout, the money and the access — including letting paying members into a private Telegram
group automatically. No code, nothing to install; everything happens in the Insy app in your
browser.
## What you can sell
- **Paid communities** — A subscription to a community you run. Members pay — once, or on a recurring plan — and keep access while their subscription is active.
- **Telegram-gated groups** — Attach a private Telegram group to a community. Insy invites paying members in and removes them when they stop paying, so you never manage the member list by hand.
- **Digital products** — A one-off sale — a file, a guide, a template, access to something you host. The buyer pays and receives what they bought.
Communities and digital products are what you create and sell. A Telegram group isn't sold on its
own — it's the gate you put in front of a paid community.
## The shape of the journey
1. **Create your account**
Log in with an email link, Google, or Telegram. The first login creates your
account — there's no separate sign-up form. See
[Creating your account](/getting-started/account).
2. **Set up your profile**
Your display name, @username, avatar and links. This is what buyers see, and
it's the public page your products live on. See
[Setting up your profile](/getting-started/profile).
3. **Create something to sell**
Make your first community or digital product, set a price, and — for a
community — connect the Telegram group you want to gate.
4. **Share your link and get paid**
Buyers check out and pay by card or crypto. Insy grants access, takes its
cut, and holds the rest as your balance until you withdraw it. See
[Understanding fees](/getting-started/fees).
> **There's no “become a creator” switch**
>
> There's no separate seller account, application or "creator mode" to turn on. The moment you create
> your first community or digital product, you're selling — from the same account you log in with.
## How buyers pay
Checkout supports two rails: **card** through Stripe's hosted checkout, and **crypto** through a
hosted crypto-payment page. Which one a buyer sees depends on how their chosen plan is set up.
> **Every test is a real charge**
>
> Insy has **one live environment** — there's no sandbox. Both rails are real payments against a real
> account, so test with a small amount on something you control.
## Where to go next
- **[Create your account](/getting-started/account)** — The login options and what happens the first time.
- **[Communities & Telegram](/communities)** — Set up a paid community and connect a Telegram group.
- **[Selling & payments](/selling)** — Digital products, prices, coupons and checkout.
- **[Payouts](/payouts)** — Get your earnings out and get discovered.
---
# Growth
Source: https://docs.insy.io/growth
Two levers sit between a page existing and a page being found. The first is what a link to it looks
like when somebody pastes it into Telegram, X or Discord — the title, the description and the image
that get pulled in. The second is paying other people to do the sharing for you.
- **[SEO settings & share cards](/growth/seo)** — Set the title, description and share image for a community or a product, and understand the preview cards Insy draws for you automatically.
- **[Affiliate program](/growth/affiliate)** — Set commission rates, recruit affiliates from the marketplace, and understand exactly when a referral counts.
> **Getting listed is a separate thing**
>
> Everything here is about pages you already have. To get in front of people browsing Insy itself —
> the explore page, ranking and reviews — see [Getting discovered](/payouts/discovery).
---
# Affiliate program
Source: https://docs.insy.io/growth/affiliate
An affiliate program lets other people earn a cut of the sales they send you. It hangs off a single
**community or product** — one program per item — and the commission comes out of your side of the
sale. The buyer pays the same price either way.
This page is written for the creator running a program. If instead you want to promote someone
else's community or product, skip to [being an affiliate](#if-you-want-to-be-an-affiliate).
## Create the program
Open **Affiliate program** in the sidebar of the community or product you want promoted. The first
visit opens a short setup wizard.
1. **Name and describe it**
Both are **required** — the button stays disabled until each has text. They are what someone
browsing the affiliate marketplace reads before deciding to join you.
2. **Set the two rates**
**First purchase %**, pre-filled with **10**, and **Recurring %**, pre-filled with **5**. Each
takes a percentage between 0 and 100.
3. **Launch it**
Finishing the wizard creates the program, but leaves it switched off. Press **Launch** in the
header of the affiliate page — or flip **Program status** in **Settings** — to put it live.
> **A new program is created paused**
>
> The wizard's closing screen reads as though you are done, but the program is always stored as
> inactive whatever the wizard sends. Until you launch it, the program is not listed in the affiliate
> marketplace and no checkout carries an affiliate fee, so nothing is being set aside to pay
> commissions with.
## The two rates, and who pays them
| Rate | Applies to | Pre-filled with |
| ---------------- | ---------------------------------------------------------------------------- | --------------- |
| First purchase % | The referred buyer's first completed payment for this community or product | 10 |
| Recurring % | Every later payment by that same buyer, subscription renewals included | 5 |
- **The percentage is taken from the full payment amount**, and rounded down to the cent. A rate
that works out to zero on a given payment records no commission at all.
- **You pay it, the buyer does not.** The affiliate's share is added on top of Insy's own platform
commission in the fee deducted from the sale — see [Understanding fees](/getting-started/fees).
Nothing is added to the buyer's price.
- **Commissions are recorded and transferred in PLN.**
- **The rate that counts is the one saved on the program when the payment completes.** Editing a
rate does not rewrite commissions that were already recorded.
> **Recurring % cannot be saved as zero**
>
> Saving the program ignores a recurring rate of `0` and quietly keeps the previous value. **First
> purchase %** does accept `0`. If you want commission to stop being charged, pausing the program is
> the lever that actually works.
## Editing and pausing
**Settings** holds the program status toggle, the name, the description and both rates. The
**Launch** / **Pause** button in the page header does the same switch in one click.
There is **one program per community or product** — a second attempt to create one is rejected with
"Program already exists" — and no way to delete a program once it exists. Pausing is the off switch.
## How a referral is attributed
1. **Someone opens the affiliate's link**
The link is `https://insy.io/a/`. Opening it sets an `affiliate_code` cookie on the root
domain, then redirects to your community or product page. Treat the window as long: the value
written today does not lapse in any practical timeframe.
2. **They create a new Insy account**
This is the step that binds a buyer to an affiliate, and it only happens at **sign-up** — a
magic-link or Google account being created for the first time, or a first contact with the
community's Telegram bot. Someone who already has an Insy account is never attributed, no matter
whose link they arrived through.
3. **They pay**
Their first completed payment for that community or product pays the affiliate the **first
purchase** rate and counts as a conversion. Every payment after that pays the **recurring** rate.
> **Attribution turns on the sign-up, not on the cookie**
>
> Once the account exists, the buyer is tied to that affiliate permanently. There is no expiry on the
> pairing: a payment made two years later still earns the affiliate the recurring rate. All the cookie
> has to do is be there at the moment the visitor creates their Insy account.
> **The Cookie figure in the marketplace is always 30 days**
>
> Every program advertises a 30-day attribution window in the marketplace. That number is fixed in the
> database, there is no field anywhere that changes it, and no part of the commission logic reads it.
> It describes an intent, not a rule the code enforces — neither the cookie nor the pairing is cut
> off at 30 days.
## Refunds reverse commissions that have not been paid
If a payment is refunded, any commission on it still sitting as pending is reversed: the amount comes
back off the affiliate's total, and reversing a first-purchase commission puts the referral back to
unconverted — so their next payment would earn the first-purchase rate again. A commission that has
already been paid out is **not** clawed back.
## Getting affiliates on board
- **The marketplace** is the main route. Every **active** program is listed at **Affiliates →
Marketplace** for signed-in users, with the commission split, the cookie window and the member
count. The category filter there works off community categories only, so a product program is not
reachable by category.
- **The signup link** button in your affiliate page header copies a recruiting link, and the two
versions do not behave the same. On a **community** it copies
`https://insy.io/subscriptions/?affiliateProgram`; a visitor who is not a member is
forwarded on to `/communities/?affiliateProgram`, which opens the affiliate sign-up dialog.
On a **product** it copies `https://insy.io/p//a`, and no route answers that path — the link
is dead, so send people to the marketplace instead.
> **The signup link is not a tracking link**
>
> It carries no affiliate code. Sending buyers to it attributes nothing. It exists to recruit
> affiliates, who then get their own `/a/...` link to share.
## What you can see about your affiliates
The affiliate page shows six figures: total affiliates, active affiliates, total conversions,
conversion rate, commissions paid and commissions pending.
> **Active affiliates is the same number as total affiliates**
>
> The tooltip describes it as affiliates who have referred at least one user, but the figure counts
> every affiliate code flagged active — and a code is created active and is never switched off. Read
> it as a duplicate of the total, not as a measure of who is actually promoting you. The conversions
> column in the table below is the figure that answers that.
Below that sits a **Top performers** list and a paginated table of every affiliate with their leads,
conversions and earnings — click a row for that one affiliate's detail.
## Paying commissions out
> **Commission payouts are not self-serve**
>
> There is no payout button on your affiliate page, and none on the affiliate's dashboard either.
> Creating a payout and sending the transfer is done by the Insy team, by hand — nothing runs on a
> schedule. Email [support@insy.io](mailto:support@insy.io) when an affiliate is due.
The conditions a payout has to satisfy:
- **First-purchase commissions are locked for 30 days** from the moment they are earned. Recurring
commissions carry no lock and are eligible immediately.
- **The minimum payout is 100 PLN** of eligible pending commission. A payout below that is rejected.
- **The affiliate needs a connected Stripe account**, or the transfer has nowhere to land.
- **Your affiliate balance has to cover the amount.** The affiliate's share of each completed card
sale is held against your Stripe account, and the transfer draws on that balance.
- **Payouts are created against a community.** The payout call takes a community, so there is no
equivalent path for commissions earned on a product program today.
## If you want to be an affiliate
1. **Find a program**
**Affiliates → Marketplace** lists the active programs. Each card shows the commission split
(first purchase, plus recurring where there is one), the cookie window and the member count.
2. **Join**
Joining issues you a **16-character code** and your link, `https://insy.io/a/`. For a
community running a Telegram bot you also get a `telegram.me` deep link carrying the same code.
3. **Connect a Stripe account**
Connect one per program, from the join dialog or from the **Affiliates** dashboard. Without it a
payout can be created for you but never transferred.
4. **Share it, then watch the dashboard**
**Affiliates** shows total earnings, pending and paid out, alongside leads, conversions and your
conversion rate — one row per program, with your link in it.
> **Only brand-new accounts count**
>
> Your link earns nothing when the person clicking it already has an Insy account. It pays when it
> brings a genuinely new sign-up who then buys.
## Next
- **[Understanding fees](/getting-started/fees)** — What Insy keeps on each sale, before the affiliate's share comes off your side.
- **[Your wallet](/payouts/wallet)** — Available versus pending, and your full money history.
---
# SEO settings and link previews
Source: https://docs.insy.io/growth/seo
Every community and product page already ships with metadata Insy assembles from the item itself.
The **SEO settings** screen lets you overwrite it: the title in the browser tab and in search
results, the description under it, and the image that appears when someone pastes your link into a
chat.
This page covers the form, where each field lands, and how the share image is chosen. Ranking on the
Insy explore page is a different topic — see [Getting discovered](/payouts/discovery).
## Where the settings live
Open a community and pick **SEO** in its menu, or open a product and pick **SEO** there. Both open
the same form, and each shows the public URL the settings apply to — `insy.io/communities/`
for a community, `insy.io/p/` for a product. A product's SEO record is also used on the
copy of that product under your creator profile, at `/@handle/`.
Two things have no SEO form of their own. **Creator profile pages** take their title from your
display name and handle and their description from your bio, and their share image is the card Insy
generates for your profile, falling back to your avatar. **Clipping campaigns** can serve SEO data
through the API but have no screen to fill it in.
## The four fields
| Field | Required | Max length | Where it ends up |
| --- | --- | --- | --- |
| **Title** | Yes | 255 | `title`, `og:title`, `twitter:title` |
| **Name** | Yes | 255 | Structured data only — the `name` in the page's JSON-LD |
| **Description** | Yes | 255 | `meta name="description"`, `og:description`, `twitter:description`, JSON-LD |
| **Image** | No | see below | `og:image`, `twitter:image`, JSON-LD |
All three text fields are required. You cannot save the form with one of them blank, even if you
only came to change the image.
Insy appends `" | Insy"` to your title everywhere the title is used, so budget for those seven extra
characters. If you never fill the form in, the title and name fall back to the community or product
name, and the description falls back to the item's own description.
> **The Name field is invisible to humans**
>
> **Name** only feeds the structured data Insy embeds for search engines. It does not change the
> browser tab, the search snippet or the share card — those all read **Title**. Filling both with the
> same text is a reasonable default.
The **255-character limit is enforced by the API, not by the form**. There is no character counter
and nothing stops you typing past it; the save is simply rejected when you submit.
## How the description gets trimmed
On a **community** page the description is stripped of markdown formatting and cut to **160
characters** at the nearest word boundary before it goes into the tags. On a **product** page a
description you wrote yourself is used in full — only the structured-data copy is cut at 160.
So the same 255-character description can appear whole on a product page and truncated on a
community page. Put what matters in the first 160 characters either way.
## The image field
The picker accepts image files and rejects anything else. The hint under it says **10 MB**, and that
is a recommendation rather than a rule: the uploader only refuses files above **110 MB**, and the
API's own ceiling is **120 MB**. A 40 MB photo is accepted without complaint, so treat the 10 MB
figure as the guidance it is rather than a limit you will be stopped at.
Your image is delivered resized to **1200 px wide**, and the preview panel renders it at a 1.91:1
crop — the same proportion as Insy's generated cards, which are exactly 1200x630. An image at that
ratio is the one that will not be cropped.
> **An image can be replaced, never removed**
>
> Saving without touching the image field keeps the image already stored — that is what lets you edit
> the text without re-uploading. The flip side is that there is no clear or delete control, and no
> request the form can send that empties the field. Once a page has an SEO image, uploading a
> different one is the only way to change what it shows.
## Which image a share actually uses
This is the part that surprises people, because three different images compete and only one wins.
Insy checks them in a fixed order.
1. **Your SEO image**
If you uploaded one, it wins outright. Nothing overrides it and nothing is layered on top of
it — the generated card below is skipped entirely.
2. **The automatically generated OpenGraph card**
If you have not uploaded an image, Insy uses the card it rendered for that community or product,
provided the card has finished rendering. It is passed through untouched, because it is already
exactly 1200x630 and a second resize would soften the text drawn on it.
3. **A picture from the item itself**
Last resort. For a community that is the cover image, and the avatar if there is no cover. For a
product it is the main cover, then any other background image, then the avatar. Whichever is
found is resized to 1200 px wide.
If none of the three exists, the page ships with no `og:image` tag at all.
## Cards are generated for you
You do not switch generated cards on, and there is nothing to design. A background job walks the
catalogue **every five minutes** and draws cards for four things: every active, unsuspended
community with a handle, every published product, every creator profile, and every clipping
campaign. Drafts and unpublished items do not get one. A single pass renders at most 50 cards, so a
large backlog drains over several passes rather than all at once.
A community card carries the name, the verified badge, the avatar and banner, the price and
billing interval of the cheapest active plan, the member count, the rating, and the owner's handle
and avatar. A product card carries the name, verified badge, avatar, cover, category, rating, and a
price label reading `Free`, `Pay what you want`, a single price, or `from` plus the cheapest one.
Redraws are not instant, and they are not all equally urgent:
- **Structural edits redraw at the next sweep** — a new name, a replaced banner or avatar, a price
change, a different category. Within five minutes, in practice.
- **Numbers that drift on their own wait a day.** Member count, rating and campaign progress only
earn a redraw once the current card is at least **24 hours old**, so a counter ticking all
afternoon cannot mint a new picture every few minutes.
Each version of a card is published at its own URL derived from its contents, so a redraw means a
new URL. The replaced file stays reachable for **30 days** rather than being deleted, so links
already shared elsewhere keep resolving. If a render fails — an image it needs cannot be fetched,
say — the page falls back to the item's own picture until a later sweep succeeds.
> **Chat apps and social networks keep the first preview they fetched**
>
> Editing your SEO settings, or waiting for a card to redraw, changes what Insy serves — not what
> someone else already stored. A message you posted yesterday keeps yesterday's title, description and
> image, and nothing on Insy's side can reach into it and update it. Insy leans on this on purpose:
> replaced card files are kept alive for 30 days precisely so previews that were already fetched do
> not turn into broken images. The dependable way to see a change is a link that platform has not
> fetched before.
## Reading the link preview panel
Beside the form (or above the save button on a narrow screen) there is a **Link preview** card that
updates as you type, before you save anything. It shows the URL without its `https://`, the title
clamped to two lines and the description to three — that clamping is display only, not a limit on
what gets published.
Three gaps are worth knowing, because they make the panel disagree with a real share:
- **It never shows the generated card.** The panel only ever draws the file you just picked or the
SEO image already saved. An empty image area here does not mean an empty preview out there — the
generated card will still be used.
- **It leaves off the `" | Insy"` suffix** that the real title tag carries.
- **Its title falls back further than the page does.** If the title box is empty the panel shows the
saved title, then the name box, then the saved name, then the slug.
Saving clears Insy's cached copy of the record straight away, so the public page serves your new
text on its next load.
## On a custom domain the chain is shorter
A product served on a [connected custom domain](/integrations/custom-domain) skips the generated
card. There the image is your SEO image, and a product picture if you have not uploaded one —
nothing else. The canonical URL on that page still points back at `insy.io/p/`, which is
deliberate: search engines are told the Insy URL is the original.
## Next
- **[Getting discovered](/payouts/discovery)** — The explore page, how ranking works, and the reviews that feed into it.
- **[Creating a product](/selling/create-product)** — The images and description your SEO settings fall back to when a field is left empty.
---
# Integrations
Source: https://docs.insy.io/integrations
An integration connects one community or one digital product to something outside Insy — the account
that takes the money, the Telegram or Discord server you gate, the service that issues an invoice,
the analytics tools that count the visit. Each connection is stored against that single community or
that single product, so a second community or a second product means walking through the same cards
again from its own page.
This section covers the integrations you set up yourself. Getting paid and connecting your Telegram
group are covered in their own sections, linked at the bottom.
## Where to find it
There are three screens called **Integrations**, and they are not the same page. This section
covers the two that belong to something you sell:
- **For a community** — open the community you manage and pick **Integrations** in its menu:
`/managed//integrations`.
- **For a digital product** — open the product and pick **Integrations** in its menu:
`/products//integrations`.
The third, under **Account → Integrations**, is a different thing entirely: it links *your own*
Telegram and Discord accounts to Insy, and holds none of the cards below.
## What is on each page
| Card | Community | Digital product |
| --- | --- | --- |
| Stripe | Yes | Yes |
| Payment method | Yes | Yes |
| Telegram | Yes | — |
| Discord | Yes | — |
| Chat (experimental) | Yes | — |
| Fakturownia | Yes | Yes |
| inFakt | Yes | Yes |
| Google Analytics | Yes | Yes |
| Meta Pixel | Yes | Yes |
| Custom Domain | — | Yes |
Money, invoicing and analytics are on both pages. Telegram, Discord and the experimental chat
exist only for a community; **Custom Domain** only for a digital product. The **Payment method**
card appears at all only once Stripe is connected.
Crypto is no longer configured here. CoinPayments was removed and CoinGate took its place, and the
crypto balance now lives on the community's **Finance** page rather than as an integration card.
## What Inactive and Active mean
Every card carries a badge. **Inactive** means Insy has nothing stored for this community or product
yet. **Active** means it has something stored — it is a record of what you saved, not a health check
of whether the other side is working.
- **Stripe** — Active once a Stripe account is connected to this community or product.
- **Payment method** — always Active. The badge carries no information; the card only renders when
Stripe is already connected.
- **Telegram** — Active only while a group is linked *and* the bot is still in it. If the bot is
removed or kicked from the group, the card drops back to Inactive.
- **Fakturownia** and **inFakt** — Active means an API key is stored. The key is never tested when
you save it, so a wrong key stays green until a sale fails to produce an invoice.
- **Google Analytics** and **Meta Pixel** — the only two that are verified before they are stored.
Your credentials are sent to Google or Meta on save and rejected on the spot if they don't work.
- **Custom Domain** — Active from the moment you add a domain, before any DNS is in place. Whether
the domain actually serves your page — Pending, SSL Pending, Active or Error — is a second badge
inside the card, behind **Manage Domain**.
- **Chat (experimental)** — the card never reads its state back. After a page reload it shows
Inactive and offers **Activate** again, whether or not you already switched it on.
> **The red badge says Payment error, but no payment failed**
>
> When Fakturownia or inFakt rejects an invoice, the card turns red and the badge reads **Payment
> error** — the same label Insy uses for failed payments elsewhere. Nothing is wrong with the sale or
> the money. The invoicing provider refused the request, usually because the API key or subdomain is
> wrong. See [Automatic invoices](/integrations/invoicing).
> **Four integrations cannot be disconnected**
>
> Fakturownia, inFakt, Google Analytics and Meta Pixel have no disconnect button and no way to clear
> what you saved — you can only overwrite the stored credentials with new ones. The ones that can be
> undone are Telegram and Discord, which each carry a **Disconnect** button on the community page, and
> Custom Domain, which has **Remove Domain** inside **Manage Domain**.
## Next
- **[Automatic invoices](/integrations/invoicing)** — Connect Fakturownia or inFakt, what lands on the invoice, and when no invoice is created at all.
- **[Google Analytics and Meta Pixel](/integrations/analytics)** — Send page views, checkouts and purchases to your own GA4 property or Meta pixel.
- **[Connecting a custom domain](/integrations/custom-domain)** — Serve a digital product page from your own hostname — the DNS records, the certificate, the statuses.
- **[Connect your Telegram group](/communities/telegram)** — Covered with communities: the bot, the group, and how paying members are added and removed.
- **[How buyers pay](/selling/payments)** — The Stripe account behind the Stripe card, and the rail behind the crypto one.
---
# Google Analytics and Meta Pixel
Source: https://docs.insy.io/integrations/analytics
Insy can forward a small set of events about your community or product page to **your own** Google
Analytics 4 property and **your own** Meta pixel. Both integrations are **server-to-server**: your
Measurement ID and Pixel ID are never injected into any page. GA4 is reached through the
**Measurement Protocol**, Meta through the **Conversions API**, both from Insy's background worker.
Read the event table before you connect anything. Four internal events are forwarded, they carry a
deliberately thin payload, and a visitor who never accepted Insy's cookie banner produces nothing at
all. This page does not cover Insy's own built-in stats — those are recorded either way and are
unaffected by anything here.
## Where to connect
Both cards live in the **External analytics** section of an [Integrations page](/integrations) —
`/managed//integrations` for a community, `/products//integrations` for a digital
product. Each card carries a status badge that reads **Inactive** until a connection exists and
**Active** afterwards.
An integration belongs to **one community or one product**, not to your account. The same pixel on
three communities means connecting it three times. Each resource holds at most one Google Analytics
connection and one Meta connection; re-connecting overwrites the stored credentials in place.
## Connecting
**Google Analytics**
1. **Open the dialog**
Press **Connect** on the Google Analytics card. The dialog is titled *Connect with Google
Analytics* and has exactly two fields — there is no property picker and no Google sign-in.
2. **Measurement ID**
The Measurement ID of the GA4 **data stream** you want the events to land in. Not the
property number, not a Google Tag Manager container ID.
3. **API Secret**
A **Measurement Protocol API secret** created on that same data stream. It is not an OAuth
client, a service-account key or a Google Cloud API key — the Measurement Protocol is the
endpoint Insy calls, so only a secret issued for it works. The field is masked.
4. **Save**
Insy immediately posts one throwaway event named `creds_validation` to Google's Measurement
Protocol **debug** endpoint with both values, and refuses to store the pair if Google
complains about `measurement_id` or `api_secret`. The rejection message you see is Google's
own text, prefixed with `Invalid GA4 credentials:`.
**Meta Pixel**
1. **Open the dialog**
Press **Connect** on the Meta Pixel card. The dialog is titled *Connect with Meta Pixel* and
has exactly two fields — there is no Facebook login and no Business Manager step.
2. **Pixel ID**
The numeric ID of the pixel that should receive the events.
3. **Access Token**
A **Conversions API access token** generated for that pixel. Insy calls
`graph.facebook.com/v21.0/PIXEL_ID/events`, so a token without Conversions API access to
that exact pixel will be refused. The field is masked.
4. **Save**
Insy immediately posts a real `PageView` event to your pixel, tagged
`test_event_code: TEST00000`, with `client_user_agent: "validation-test"` and
`client_ip_address: "0.0.0.0"`. If Meta refuses it, the credentials are not stored and you
see Meta's own error text prefixed with `Invalid Meta Pixel credentials:`.
> **A rejection shows you two contradictory things at once**
>
> When Google or Meta rejects the credentials, the dialog closes and the *Google Analytics configured*
> / *Meta Pixel configured* toast fires anyway — and at the same time the card itself is replaced by a
> red box carrying the provider's own message, prefixed `Invalid GA4 credentials:` or
> `Invalid Meta Pixel credentials:`. Nothing was stored. Believe the red box, not the toast: press
> **Close** on it to bring the card back, then **Connect** again with corrected values.
> **Insy does not check the format of anything you paste**
>
> Both fields are accepted as any non-empty text. A typo is caught only by the provider's reply during
> that save-time round trip, never by Insy.
## What Insy forwards
This is the whole list. Anything not in this table is never sent to your GA4 or your pixel.
| Insy event | Google Analytics 4 | Meta |
| --- | --- | --- |
| `view_community` | `page_view` | `PageView` |
| `view_product` | `page_view` | `PageView` |
| `checkout_initiated` | `begin_checkout` | `InitiateCheckout` |
| `checkout_success` | `purchase` | `Purchase` |
| `view_profile` | not forwarded | not forwarded |
| `explore_page_view` | not forwarded | not forwarded |
Both providers get the same four events under different names. There is no way to add, rename or
filter events, and no way to send only purchases.
## When each event fires
- **`view_community`** — every load of the public community page, once the community data resolves.
There is no owner exclusion, so your own visits are counted too.
- **`view_product`** — on all three product page routes (the creator-scoped one, the short `/p/`
one, and a custom domain), once the product resolves. It is suppressed only for platform admins
and for a creator previewing an **unpublished** product; visiting your own published product does
count.
- **`checkout_initiated`** — for a **community**, the browser fires it once: on the plan selector
opening if the community has more than one plan, or on checkout opening if it has exactly one. The
server fires it once more when the embedded checkout session is created. Expect two per buyer, not
one.
- **`checkout_success`** — the forwarded one is sent server-side, after the payment has been
recorded. The thank-you page also fires a `checkout_success`, but that one carries no community or
product ID, so it is dropped before it reaches you and only lands in Insy's internal stats.
Repeat events with an identical payload are de-duplicated within a single page load, and reset on
refresh.
> **Digital products never send begin_checkout or InitiateCheckout**
>
> The browser fires `checkout_initiated` for a digital product with a product **variant** ID and a
> reservation ID, but no product ID. Insy drops any event carrying neither a community ID nor a
> product ID, so the event is stored internally and goes no further. For digital products your funnel
> in GA4 and Meta jumps straight from `page_view` to `purchase`.
## What the payload actually contains
To GA4, one event with:
- `client_id`, derived from the visitor's `_ga` cookie;
- `community_id` as a parameter;
- `page_referrer`, `utm_source` and `utm_medium` when Insy knows them;
- **nothing else** — no `value`, no `currency`, no `items`, no product ID.
To Meta, one event with:
- `event_name`, `event_time` and `action_source: "website"`;
- `user_data` containing **only** `fbp` and `fbc`, read from the visitor's `_fbp` and `_fbc`
cookies — no hashed email, no IP address, no user agent;
- `custom_data` with `community_id`, `currency` and `value`;
- `event_source_url` set to the visitor's referrer when there is one;
- no `event_id`.
> **Meta receives the amount in minor units**
>
> `value` is the payment amount in cents, sent without dividing. A **99.00 PLN** sale reaches your
> pixel as `value: "9900"` with `currency: "PLN"` — a hundred times the real figure. Any ROAS or
> value-based optimisation built on it is wrong by that factor. GA4, by contrast, receives no revenue
> at all: its `purchase` event arrives with no value and no currency.
## Server-side only — what a browser pixel would give you and this does not
There is no tag of yours running in the visitor's browser. Everything is a server call from Insy's
worker, which means:
- **no automatic events** — GA4's engagement events and Meta's automatic page/button events never
happen, because your tag is never loaded;
- **no audience building or retargeting** from your own pixel on Insy pages;
- **low Meta match quality** — `user_data` carries cookie identifiers only, with no hashed email;
- **no deduplication** — no `event_id` is set, so if you also run a pixel elsewhere, Meta has no way
to recognise an Insy event as the same conversion.
Delivery is fire-and-forget. The provider's response is read and thrown away, nothing is retried,
and a rejection from Google or Meta is recorded internally as a successful send. There is no
delivery log and no error surfaced in Insy: *sent* never means *accepted*.
## Cookie consent decides whether anything is sent at all
GA4 forwarding needs the visitor's `_ga` cookie; Meta forwarding needs `_fbp` or `_fbc`. Those
cookies are set by **Insy's own** Google and Meta tags, which load only after a visitor presses
**Accept** on Insy's cookie banner. With no cookie, the event is written to Insy's internal stats
and the external hop is skipped silently.
> **The banner is not shown on the pages that sell**
>
> Insy suppresses the cookie banner on community pages, product pages and custom-domain product pages,
> because it would cover the mobile buy bar. Consent is never *asked for* there. A visitor who lands
> straight on your sales page from an ad, buys and leaves therefore has no `_ga` and no `_fbp` at any
> point — your GA4 and your pixel receive **nothing for that session, including the purchase**. Only
> people who accepted the banner earlier, elsewhere on Insy, are measurable.
For a purchase the cookies are frozen onto the checkout reservation when checkout starts, and
replayed when the payment lands. If they were empty at checkout, they are still empty at payment.
## The "Test analytics" button
**Test analytics** sits in the header of the External analytics section, above both cards. It is not
a Meta-only button: one press fans the event out to **every** integration on that community or
product, so a connected GA4 and a connected pixel are both hit.
The dialog has two inputs: an **Event type** choice of *Page view* or *Checkout success*, and an
optional **Test code**, described as an optional code from Meta Events Manager to verify event
delivery. That code is passed straight through as Meta's `test_event_code`; GA4 ignores it.
- *Page view* sends `view_community` for a community or `view_product` for a digital product, which
arrive as `page_view` and `PageView`.
- *Checkout success* sends `checkout_success`, which arrives as `purchase` and `Purchase`.
> **A passing test does not mean your live traffic is measured**
>
> The test **fabricates** a fresh `_ga` and `_fbp` server-side, so it always clears the cookie
> requirement that real visitors routinely fail. It also hardcodes the money as `value: "100"` and
> `currency: "USD"`, regardless of your real prices or currency. What the test proves is that the
> credentials work and the route is wired — nothing about consent.
> **Test events pollute your own stats**
>
> The test travels through the same queue as real traffic, so it is also written as a genuine
> `AnalyticsAction` row and shows up in your Insy stats as a real page view or checkout. Also, the
> confirmation only reports that the event was queued — nothing is read back from Google or Meta.
## Known limits
- **There is no disconnect.** Neither the interface nor the API can remove an integration. The
card's only button is Connect, which reopens the same dialog and overwrites the credentials. To
stop the flow, revoke the API secret or access token on the provider's side.
- **Credentials are stored unencrypted** and are returned in full by the endpoint that lists a
resource's integrations, to anyone who can manage that community or product. Treat the GA4 API
secret and the Meta access token as shared with every administrator of that resource.
- **These endpoints are not part of the public API.** They are absent from the public OpenAPI spec
and are not a supported integration surface.
## When nothing shows up
**The test event arrives, but real traffic never does**
This is the expected outcome of the cookie rules above. The test invents the cookies; real
visitors have to have accepted Insy's banner on some earlier page, and the banner is never shown
on community or product pages. Compare Insy's own stats for the same period — if they show
traffic and your GA4 does not, this is why.
**GA4 purchases show zero revenue**
Expected. The GA4 payload carries no `value`, no `currency` and no `items` — only the event name
and `community_id`. Revenue cannot be reported in GA4 through this integration.
**Meta reports revenue 100 times too high**
Expected. `value` is sent in minor units without conversion, so 99.00 PLN is reported as 9900.
**A product logs views and purchases but no checkouts**
Expected. The digital-product `checkout_initiated` event carries no product ID and is dropped
before forwarding. Community checkouts are unaffected.
**The card still says Inactive after connecting**
The credentials were rejected by Google or Meta during the save-time check, and nothing was
stored — the success toast fires regardless. The provider's message is in the red box that
replaced the card; press **Close** on it, then correct the values and connect again.
## Next
- **[How buyers pay](/selling/payments)** — The payment rails behind the `purchase` events you are measuring.
- **[All integrations](/integrations)** — The other cards on the same screen, and what the status badges mean.
---
# Connecting a custom domain
Source: https://docs.insy.io/integrations/custom-domain
A custom domain puts one of your product pages on a hostname you own, like `shop.example.com`. You
add the domain in Insy, add the DNS records Insy shows you, and the certificate is issued for you.
The product itself does not move or change — the same page is served on both addresses.
Custom domains hang off **a product**. This page covers connecting a domain, getting it verified,
what it serves once it is live, and how to remove it.
> **Products only, one domain each**
>
> There is no custom domain for a community or for a creator profile — the
> setting exists on a product's Integrations screen and nowhere else. Insy shows
> a single domain per product; to change it, remove the current one and add
> another.
## Step 1 — Add the domain in Insy
1. **Open the product's Integrations screen**
Go to the product and open **Integrations**. The **Custom Domain** card is
there, and its button reads **Connect** while no domain is attached and
**Manage Domain** once one is.
2. **Enter the hostname**
The dialog has one field, **Domain**, with `shop.example.com` shown as the
example. Type the exact hostname you want the product served from, in that
same form.
3. **Press Connect Domain**
Insy registers the hostname with Cloudflare, which is what issues the
certificate and answers requests for it. On success the dialog switches
straight to the manage view with your DNS records in it.
> **A rejected hostname is not saved**
>
> Insy does not check the shape of what you type — whatever you enter goes
> straight to Cloudflare. If Cloudflare comes back with verification errors,
> they are listed in red in the dialog and **nothing is stored**. Correct the
> hostname and submit again; there is no half-finished record to clean up.
## Step 2 — Add the DNS records
The manage view shows a **Required DNS Records** table with **Type**, **Name** and **Value**
columns, and a copy button next to the values you need. Add every row of it at whatever service
hosts your domain's DNS.
| Row | Type | Name | Value |
| --------- | ------------- | ---------------------------------------- | ----------------------------- |
| Routing | `CNAME` | your hostname, exactly as you entered it | the target shown in the table |
| Ownership | usually `TXT` | generated for your domain | generated for your domain |
> **The actual values are not in this documentation, on purpose**
>
> Neither value is a constant that could be written down here. The CNAME target
> is server-side configuration on Insy's end, and the ownership record's name
> and value are generated by Cloudflare for your specific domain. **Copy them
> from the table in the dialog** — any value you find elsewhere is a guess.
The ownership row's type is whatever Cloudflare returns for your domain, and falls back to `TXT`
when Cloudflare does not state one. There is one ownership row, and pressing **Sync Status**
replaces it with whatever Cloudflare reports at that moment — always copy from the table in front of
you rather than from an older screenshot.
The routing record is always a `CNAME` on that exact hostname. Insy has no A-record path and no
separate handling for a root domain — whatever you enter, the table asks for a CNAME.
## Step 3 — Check the status
The manage dialog's main button is **Sync Status**. Pressing it asks Cloudflare where the domain
stands and rewrites the status badge, the error message and the **Last checked** timestamp with the
answer.
> **Nothing checks in the background**
>
> There is no polling, no scheduled job and no notification. The status you see
> is from the last time **you** pressed Sync Status — Insy will not tell you
> when the domain goes live, and a domain that became active hours ago still
> reads `Pending` until you press the button.
The badge is one of six states:
| Badge | What it means |
| --------------- | --------------------------------------------------------------------------- |
| **Active** | The hostname is verified and the certificate is issued. The domain is live. |
| **Pending** | Cloudflare has not verified the hostname yet. |
| **SSL Pending** | The hostname is verified, but the certificate is not issued yet. |
| **Error** | Anything else. The reason is shown above the DNS table. |
| **Deleted** | Cloudflare reports the hostname as deleted. |
| **Unknown** | No status has been recorded yet. |
A second button, **Refresh Validation**, asks Cloudflare to run domain-control validation again. It
only appears when your domain's nameservers are Cloudflare's own — on any other DNS host, Sync
Status is the only control you get.
## Certificates
The certificate is automatic. When the domain is added, Insy requests a domain-validated
certificate with HTTP validation and a minimum TLS version of **1.2**. You do not upload a
certificate, buy one, or renew one.
Until the certificate is issued the status reads **SSL Pending**. **Refresh Validation** asks
Cloudflare to run domain-control validation for the certificate again.
## How long it takes
Insy states no propagation time, sets no deadline, and enforces no timeout — there is no point at
which a pending domain is given up on or cleaned up. How long verification takes is down to your DNS
provider and Cloudflare, not to Insy.
In practice this means the workflow is: add the records, walk away, come back later and press
**Sync Status**. If it is still `Pending` well after your DNS changes are visible elsewhere, treat
that as a wrong record rather than as slow propagation, and re-check the Name and Value against the
table.
## What your domain serves once it is live
Requests to your domain are answered with the same product page that lives on `insy.io` — the same
content, prices and checkout. A few things are worth knowing about that copy:
- **Only the root of the domain serves the product.** `https://shop.example.com` shows your product
page. A deeper path such as `/pricing` has nothing behind it.
- **The canonical URL still points at insy.io.** The page sets its canonical link, `og:url` and
`twitter:url` to `https://insy.io/p/your-slug`, which tells search engines the insy.io copy is
the one to index.
- **The share preview is your SEO image, or a product picture.** Insy generates share cards for
product pages on insy.io, but the custom-domain copy does not use them. It falls back to one of
the product's own pictures, and if the product has neither, the page shares without an image.
- **There is nothing to allowlist.** A connected custom domain is recognised automatically when the
page calls the Insy API, so no extra origin configuration is needed on your side.
## Payment methods on your domain
Once **Sync Status** or **Refresh Validation** confirms that both the hostname and
its HTTPS certificate are active, Insy registers the exact hostname with Stripe
on the connected account linked to your product. This is separate from Cloudflare's
DNS and certificate verification. You do not need to create an Apple Merchant ID.
Insy also checks registrations at backend startup and every 10 minutes. This covers
existing active domains, a Stripe account connected after the domain was activated,
and retries after a temporary Stripe error. A hostname that is still Pending or
SSL Pending is not registered yet. Existing registrations are reused; disabled
registrations required by your active storefront are re-enabled.
Stripe treats `example.com`, `www.example.com` and `shop.example.com` as separate
hostnames. Connecting one does not register the others. Production and staging
use the frontend hostname configured for that environment and its Stripe credentials.
Registration is required for supported wallets and other domain-dependent methods
in the embedded checkout, but does not by itself make every method available.
Account capabilities, the buyer's device and the purchase currency still apply.
See [Stripe's domain registration guide](https://docs.stripe.com/payments/payment-methods/pmd-registration).
## Removing the domain
**Remove Domain** at the bottom of the manage dialog asks for confirmation and then deletes the
hostname from Cloudflare and the record from Insy in one go. The confirmation says it plainly: this
cannot be undone. After that the domain no longer resolves to your product, and reconnecting means
going through this page again from Step 1 with fresh records.
Insy never touches your DNS — not when connecting, not when removing. The records you added stay in
your DNS until you delete them yourself.
## When it isn't working
- **Your domain redirects to insy.io.** The hostname reached Insy but could not be matched to a
product, so the request is sent to `https://insy.io` instead. Check that the domain in the panel
is spelled exactly like the hostname you are visiting, and that it has not been removed.
- **Status is stuck on Pending.** Nothing re-checks on its own, so first press **Sync Status** —
the state you are looking at may simply be old. If it is genuinely still pending, compare every
Name and Value in the table against your DNS entries character by character.
- **There is a red error message.** The text above the DNS table comes verbatim from Cloudflare —
hostname verification errors and certificate validation errors, joined with semicolons. It
describes what Cloudflare could not do, and is the most specific information available.
- **Refresh Validation never appears.** The button is shown only when a nameserver lookup says your
domain is on Cloudflare. It also misreads multi-part suffixes: for a hostname under `.co.uk`, the
lookup checks `co.uk` rather than your actual zone, so the button stays hidden even when your
domain is on Cloudflare.
- **You renamed the product and the domain broke.** The hostname-to-product lookup is cached for
**10 minutes**. After a slug change, give it that long before concluding something is wrong.
---
# Automatic invoices with Fakturownia and inFakt
Source: https://docs.insy.io/integrations/invoicing
Insy can push an invoice into **your own** Fakturownia or inFakt account when a sale goes through.
The document is created under your account, numbered by your provider, and Insy keeps only the
number and — for Fakturownia — a link to the PDF.
This is about the invoices **you** issue to **your buyers**. It is not the commission invoice Insy
issues to you for platform fees; that one is produced by Insy and has nothing to do with this
integration.
## What you need before it can work
> **Without business information, no invoice is ever created**
>
> Two things must be true at the moment of the sale: the money went through a **connected Stripe
> account**, and that Stripe account has **business information** saved. If the business information
> is missing, invoice generation stops silently — no invoice, no error on the integration card, no
> email. Fill it in before your first sale, not after.
Business information is stored **per Stripe account**, not per community — so every community and
product that sells through the same Stripe account shares one record. You edit it on the Business
information screen of a community or a product, or on the Stripe account itself under your account
settings.
The fields:
- **Customer type** — individual or company. Required, and it decides which of the fields below you
can even see.
- **Country and tax identifier** — use the details applicable to your business, including a Polish
NIP where relevant.
- **Buyer** — the name. Required.
- **Street**, **Postal code**, **City** — all required.
- **VAT configuration** — where applicable to the seller and invoice integration.
> **The field says buyer, the invoice says seller**
>
> The record is labelled *Buyer* because Insy also uses it as your details on its own commission
> invoice. On an invoice created through this integration the same values are sent as the **seller** —
> name, NIP, street, postal code and city. Fill it in as the business doing the selling.
## Connecting a provider
Both providers live on the **Integrations** screen of a community, and on the Integrations screen of
a digital product. Each has a card — Fakturownia, inFakt — with a **Connect** button that opens a
short form. After saving, that button becomes **View**; the dialog it opens shows whether the
provider has rejected anything, and a **Reconfigure** button inside it brings the form back.
> **One connection per community or product**
>
> The integration is attached to a single community or product. There is no account-wide setting, so
> every community and every product you sell has to be connected on its own.
**Fakturownia**
Two fields, both required.
**API Key** — an API token from your own Fakturownia account. Insy sends it as `api_token` in
the body of the request that creates the invoice.
**Fakturownia subdomain** — the part before `.fakturownia.pl` in your account's address. For
`mycompany.fakturownia.pl` you enter `mycompany`. Insy posts to
`https://your-subdomain.fakturownia.pl/invoices.json`, so a typo here is the same as a wrong
key.
**inFakt**
One field.
**API Key** — an API key from your own inFakt account. Insy sends it in the `X-inFakt-ApiKey`
header to `https://api.infakt.pl/api/v3`, and no other value is stored: the seller details on
the invoice come from your inFakt account, not from Insy.
Insy does not link to your provider or explain where the key is generated — you create it in the
provider's own panel and paste it in.
> **Nothing checks the key when you save it**
>
> Saving only stores the string. Insy makes no test call, so a wrong key, a revoked key or a mistyped
> subdomain looks exactly like a working setup — the card says the integration is active. You find out
> at the first sale, once an invoice has already failed to be created.
## Fakturownia always wins
Both keys fit in the same record, and both cards will happily show themselves as connected. But
Insy picks the provider by looking at the Fakturownia key first: **inFakt is only used when the
Fakturownia key is empty**.
There is no provider switch and no **Disconnect**. The API has no delete for this integration, and
both forms refuse an empty key — so once a Fakturownia key has been saved, there is no way from the
interface to clear it and fall back to inFakt.
## When an invoice is created
Exactly two moments, both on the Stripe rail:
- **The first payment of a subscription** — when the subscription checkout completes.
- **A one-time payment** — both the hosted checkout in payment mode and the embedded checkout's
successful payment.
Insy keys the invoice to the payment, so a payment can never produce two invoices.
> **Nothing else creates an invoice**
>
> - **Subscription renewals do not.** Only the first charge is invoiced; every renewal after it goes
> by without one.
> - **Crypto payments do not.** The CoinGate rail never triggers invoicing.
> - **There is no manual issue-invoice button.** Nothing in the creator interface lets you generate a
> missing invoice yourself.
## What ends up on the invoice
Always exactly **one line item, quantity 1**. Its name is the pricing plan the buyer bought — or the
literal word `Payment` on a one-time sale where the plan can't be resolved — and its gross value is
the amount charged.
| On the invoice | Where it comes from |
| --- | --- |
| Line item name | The pricing plan's name, or `Payment` as a fallback |
| Line item amount | The gross amount actually charged, quantity always 1 |
| VAT treatment | Resolved from the transaction's tax information and seller billing configuration; it is separate from VAT on Insy's commission |
| Buyer name and email | The name and email from checkout |
| Buyer tax ID | Passed to the provider when available in the invoice's buyer information |
| Sale date, issue date, payment due | All today's date |
| Payment status | Marked **paid** |
| Invoice number | Assigned by your provider; Insy has no numbering of its own |
> **Buyer details depend on what was collected**
>
> Insy can pass the buyer's tax ID to Fakturownia and inFakt when it is available. Do not assume every
> purchase includes one. The [transaction details](/selling/transaction-details) retain available
> purchase information, but a later data refresh does not automatically correct an invoice already
> issued by your provider.
Keep your country and billing details current, and verify the invoice provider's configuration for
your sales. The Polish commission-fee example is not a universal sales-tax rate.
## Where the two providers differ
| | Fakturownia | inFakt |
| --- | --- | --- |
| Fields you supply | API key and subdomain | API key |
| Seller details | Taken from your Insy business information | Taken from your inFakt account |
| Currency of the sale | Sent through to the invoice | Not sent — your inFakt account's default is used |
| Amounts sent as | Gross | Net, computed back from the gross amount |
| Buyer name | One field | Split at the first space into first and last name |
| Document link kept by Insy | A PDF link | None |
| Marked paid | In the same request | In the same request, plus a follow-up call a few seconds later |
> **inFakt splits the buyer's name naively**
>
> The checkout name is split on spaces and only the first two parts are used. A one-word name leaves
> the last name empty; a three-part name loses everything after the second word.
## The buyer does not receive it
Insy never sends the invoice to anyone. Fakturownia is given the buyer's email address as a field on
the document and inFakt is given it as the invoice recipient, but Insy never calls either provider's
send-email endpoint — and the document is not shown to the buyer anywhere in Insy either.
If your buyer needs the invoice, send it from your provider's panel.
> **The invoice link in payment history is Stripe's**
>
> Members see an invoice link in their payment history. That is Stripe's own hosted invoice for the
> charge, not the document created in Fakturownia or inFakt.
## KSeF
> **This integration never sends anything to KSeF**
>
> KSeF exists in Insy only on the platform's own side — for the commission invoices Insy issues to
> you — and even there submission is a manual action taken by Insy staff. An invoice created in your
> Fakturownia or inFakt account through this integration is created and left there. If it has to reach
> KSeF, that happens in your provider's panel, on your schedule.
## When it goes wrong
**The card turns red and the badge says Payment error**
When your provider rejects the request — which is what a wrong, revoked or mistyped key
produces — Insy records the returned status code and response body against the integration and
stops. The card switches to an error state whose badge reads **Payment error**. That label is
shared with other parts of the app and says nothing about the buyer's payment: the sale itself
went through, only the invoice didn't.
**The error always reads Unknown error, with no detail**
The card looks for fields the backend never writes, so it falls back to **Unknown error** every
time, with no status code. The provider's real status code and response body *are* stored — but
no screen displays them. Ask [support@insy.io](mailto:support@insy.io) to read them out for you.
**The card stays red after you fix the key**
Nothing clears the recorded errors — not reconfiguring the integration, not a later successful
invoice. Once your provider has rejected a single request, the card stays in the error state
permanently. The reliable way to tell whether it works now is to check whether new invoices are
appearing in your provider's account.
**A sale produced no invoice and nothing was flagged**
If the community or product has no integration, or no API key, or the Stripe account has no
business information saved, generation stops before anything is recorded. There is no error on
the card, no email, and no marker on the sale. Silence is the expected symptom of a
misconfigured setup, so verify against your provider's account rather than against the card.
**You want a missing invoice re-issued**
There is no retry button for creators; only Insy staff can retry a stored invoice record, and a
record only exists if generation got past the checks above. The retry is also lossy: it rebuilds
the document from data that doesn't include the original line, so it goes out as a single line
named `Payment` for the full payment amount, with an empty buyer name. Issuing the invoice by
hand in your provider's panel is usually the cleaner fix.
## Next
- **[How buyers pay](/selling/payments)** — The card and crypto rails behind checkout, and which one can trigger an invoice.
- **[Understanding fees](/getting-started/fees)** — What Insy keeps on each sale, and the commission invoice you get for it.
---
# Payouts
Source: https://docs.insy.io/payouts
Once money starts coming in, two things matter: getting it out, and bringing more of it in. This
section covers both.
Insy keeps money in two separate places — know which is which before you go looking for a withdraw
button:
- A **fiat balance in Polish złoty (PLN)** — this is your **clip-program reward** balance, paid out
to a connected Stripe account. It is *not* your everyday sales income.
- A **crypto balance in USDC** — earnings from anything you sold with crypto checkout, paid out to a
wallet address you control.
> **Where your ordinary sales money goes**
>
> When someone buys your community or product through normal (card) checkout, that money settles to
> **your own Stripe account** as part of the sale — it does not sit in an Insy wallet waiting to be
> withdrawn. The balances here are the clip-reward and crypto rails specifically. Start with
> [Your wallet](/payouts/wallet) to see the difference.
- **[Your wallet](/payouts/wallet)** — Your fiat and crypto balances, what is withdrawable now versus still on hold, and your full money history.
- **[Withdrawing crypto earnings](/payouts/crypto-payouts)** — Add a wallet address, understand the hold and the fees, and withdraw your USDC.
- **[Getting paid in fiat](/payouts/fiat-payouts)** — Connect a Stripe account and withdraw your PLN clip-reward balance.
- **[Getting discovered](/payouts/discovery)** — Request a spot on the explore page, understand how ranking works, and handle your reviews.
---
# Withdrawing crypto earnings
Source: https://docs.insy.io/payouts/crypto-payouts
Crypto earnings are paid out in **USDC** to a wallet address you add yourself. The process is
deliberately careful: crypto transfers can't be undone, so Insy adds several safety steps a bank
transfer wouldn't need.
> **USDC only**
>
> Withdrawals settle in **USDC** and nothing else. Sales in other coins are converted to USDC before
> they land in your balance, so USDC is the only currency you'll ever withdraw. If you somehow hold a
> balance in another currency, Insy refuses to price a withdrawal for it rather than guess.
## Step 1 — Add a withdrawal address
Before you can withdraw, tell Insy where the money goes. You provide:
- **The wallet address** itself.
- **The blockchain network** to pay on — for example Polygon, Base, Arbitrum, Optimism, Solana, BNB
Smart Chain or Ethereum. Fees between these differ by *orders of magnitude* (see below).
- **A country** and either your **name** (personal payout) or your **company name and code**
(business payout). This is declarative information you fill in, not a document-upload identity
check.
The address is checked against the network you picked *before* it's saved. A malformed address, or
one that belongs to a different kind of chain, is rejected on the spot.
> **There is no undo on a wrong address**
>
> Double-check every character. Crypto sent to a wrong or mistyped address is not reversible, not
> refundable, and shows up as no error anywhere — the funds simply stop existing for their owner. Insy
> validates the *format* of the address, but can't know whether it's actually yours.
### The 24-hour wait on a new address
A newly added address can't be used for **24 hours**. This cooldown is a security measure: if someone
got into your account, it stops them changing the address and draining your balance in one motion.
You're notified when an address is added, giving you a day to notice and stop anything you didn't do.
Adding a new address also retires any previous one for that currency.
Your balance, history, and the address all stay visible during the cooldown — only the withdrawal
has to wait for the clock.
## Step 2 — Understand the hold
Earnings from a sale don't become withdrawable immediately. They sit as **pending** for a hold
window — **7 days by default** — before moving to your **available** balance.
The reason: a crypto payout is irreversible, but a sale isn't final the instant it happens. The hold
is the only window in which a refund or a compliance reversal can still be absorbed before the money
leaves the platform for good. Once it passes, the funds are released.
> **If a refund lands during the hold**
>
> A refund inside the hold window can push a balance negative — you'd owe that amount back. The debt is
> settled from your next earnings. If it's left standing too long (a grace period of about two weeks),
> crypto selling on that item is paused until it clears. Your withdrawal screen shows this plainly if
> it ever applies.
## Step 3 — Request the withdrawal
Every withdrawal is **held for a person to approve**. This isn't a threshold you can stay under or a
delay that only applies to large amounts — **every single withdrawal waits for manual review before
any money moves.**
> **Crypto withdrawals are never instant**
>
> Don't expect funds the moment you press the button. The request is created, you and the Insy team are
> notified, and it stays held until a human approves it. Only then is it sent to the network. This
> safeguard replaces the kind of two-factor prompt a provider would normally show — money only ever
> leaves because someone decided it should.
Once approved, the withdrawal is sent, and you can follow its status in your history until the chain
transaction hash appears.
## Leave room for the network fee
You **cannot** withdraw your entire balance in one go. The network charges a fee, taken **on top of**
the amount you request — not out of it. If you asked for every last unit, the fee would push your
balance negative, so Insy refuses it and tells you the most you can actually take.
The fee is the standard provider payout fee (roughly **0.50 EUR plus 0.5%** of the amount), and
**you** pay it — it's the cost of the network and chain you chose. Your withdrawal screen already
shows a **maximum** with that headroom subtracted; withdraw at or below it and you're fine.
### Minimum withdrawal per network
Because the fee is fixed-ish, a tiny withdrawal can cost more than it delivers. Each network has a
minimum, in USDC:
| Network | Minimum |
| --- | --- |
| Polygon, Arbitrum, Base, Optimism, Solana | 5 USDC |
| BNB Smart Chain | 10 USDC |
| Ethereum | 50 USDC |
> **Pick a cheap network**
>
> Ethereum is an order of magnitude more expensive than the others. Unless you have a specific reason
> to use it, a low-cost network (Polygon, Base, Arbitrum, Optimism or Solana) leaves far more of your
> money in your pocket.
## When withdrawals are paused
Crypto withdrawals can be switched off across the whole platform for a while (maintenance, say). Your
**balance and history still show normally** and an address can still finish its 24-hour cooldown —
only the withdraw action itself is unavailable until it's switched back on.
## Next
- **[Your wallet](/payouts/wallet)** — Available vs. pending, and your full money history.
- **[Getting paid in fiat](/payouts/fiat-payouts)** — The other rail — withdrawing your PLN clip-reward balance to Stripe.
---
# Getting discovered
Source: https://docs.insy.io/payouts/discovery
Beyond your own audience, Insy has an **explore page** that surfaces communities and products to
people browsing the platform. Getting placed there, and ranking well, is the main way to reach
buyers who've never heard of you.
## Request a spot on the explore page
Listing isn't automatic — you ask for it, and the Insy team reviews the request.
1. **Send the request**
From your community or product, request to be featured on the main/explore page. Only the
**owner** can make the request.
2. **Wait for review**
The request goes to the Insy team as **pending**. You can have only one pending request per item
at a time, and can check its status from your requests list.
3. **Go live**
Once accepted, your item becomes eligible to appear in the explore swimlanes. Where it shows up
is then decided by ranking, not by the request.
> **Acceptance is a yes/no, not a guaranteed placement**
>
> Being accepted makes you *eligible* to appear — it doesn't pin you to the top. The ranking below
> decides which lane you land in and how high. An admin can also feature specific items by hand, but
> that's the exception.
## How the explore page is laid out
The page is built from **swimlanes** — horizontal rows, each with a theme. Four kinds:
- **Trending** — What is picking up steam right now.
- **Bestsellers** — Consistent top sellers.
- **Top rated** — The best-reviewed items.
- **New & growing** — Newer items gaining momentum — including a rotating spotlight for promising newcomers.
Community and product lanes are interleaved (roughly three community rows to each product row). A
single creator can't fill a whole lane — placement is spread out so the page shows variety. New and
promising communities also get surfaced in reserved slots before they've racked up numbers, so a
good item isn't stuck invisible on day one.
## How ranking works
Insy scores each item and refreshes the scores about hourly. You don't tune the score directly — it's
earned — but it helps to know what it rewards and what drags it down.
**What lifts you up:**
- **Sales momentum** — how much you're selling recently.
- **Growth** — new members or buyers in the last week (the "X joined this week" figure on cards).
- **Quality** — your rating and reviews.
- **Conversion** — how often people who *view* your page actually join or buy.
- **Interest** — how often people who *see* your card click it.
- **Retention** — members sticking around and renewing rather than leaving.
**What drags you down:**
- Refunds, early cancellations, and pending cancellations.
- A run of bad reviews.
> **The short version**
>
> Sell steadily, convert the visitors you get, keep members happy enough to stay, and collect good
> reviews. The scoring is built so that genuine, healthy activity is what wins.
### Badges
A well-performing item can earn a single badge on its card — **Hot**, **Trending**, **Growth**, or
**Top rated**. Badges come from the same signals as ranking; you don't apply for them.
## Reviews
Reviews feed directly into the **quality** signal, so they're worth tending to.
- **Who can leave one** — a buyer can review only after a **14-day**, active, paid membership. This
keeps reviews coming from real, committed members; a member who can't review yet simply hasn't
passed the 14 days.
- **Reply to a review** — post a public reply to any review on your item, and edit or remove it
later. A thoughtful reply to a critical review often does more for a browsing buyer than the review
itself.
- **Report a review** — if a review breaks the rules, report it to the Insy team. Pick a reason:
inappropriate language, spam, harassment, false information, competitor attack, or other, with an
optional note. Each review can be reported once, and a human reviews it.
> **Report abuse, don't fish for removals**
>
> Reporting is for genuinely rule-breaking reviews — spam, harassment, a competitor's smear, plainly
> false claims. A fair-but-negative review isn't reportable; the better move is a calm public reply.
> Bad reviews do affect ranking, but the fix is addressing the underlying issue, not deleting honest
> feedback.
## Next
- **[Your wallet](/payouts/wallet)** — Now that buyers are finding you, keep an eye on what you have earned.
- **[Selling & payments](/selling)** — Prices, coupons and checkout — the levers behind your conversion and sales signals.
---
# Getting paid in fiat
Source: https://docs.insy.io/payouts/fiat-payouts
Your fiat balance is paid out in Polish złoty (PLN) to a **Stripe account you connect**. This is the
rail for your **clip-program rewards**.
> **This is your clip-reward balance, not your sales income**
>
> The PLN balance here is what you earned from the clip program. Money from selling your community or
> product through ordinary card checkout settles to your own Stripe account as part of each sale — it
> is not withdrawn from here.
## Step 1 — Connect a Stripe account
Before you can withdraw, you need a connected Stripe account for payouts. Set it up once through
Stripe's own onboarding, where Stripe collects the details it needs to send you money (your identity
and your bank account). Until an account is connected, the withdraw button tells you to connect one
first.
> **Stripe handles the bank details**
>
> Insy never sees or stores your bank account number — that lives with Stripe. Once the account is
> connected and verified, withdrawals land in the bank account you gave Stripe.
## Step 2 — Withdraw your balance
1. **Check what is available**
Your fiat balance shows an **available** amount (withdrawable now) and a **pending** amount (not
yet). You can only withdraw what is available.
2. **Request the payout**
Enter an amount up to your available balance and confirm. Insy reserves the amount on your ledger
and sends a single Stripe transfer to your connected account.
3. **Wait for it to settle**
The transfer is created immediately; the money then arrives on Stripe's usual payout schedule. If
it fails, the amount goes straight back onto your available balance and you can try again.
> **One withdrawal at a time**
>
> Only one PLN withdrawal can be in progress at once — wait for one to finish before starting another.
> There is no withdrawal fee on the fiat balance today.
## When fiat withdrawals are frozen
Fiat withdrawals can be turned off across the whole platform for a period. When that happens:
- Your **balance and history still show** exactly as before.
- The **withdraw button is disabled** until withdrawals are switched back on.
So a greyed-out button with a healthy balance behind it usually means a platform-wide pause, not a
problem with your account or Stripe connection. Nothing is lost; withdraw once it's re-enabled.
> **If a withdrawal seems stuck**
>
> On the rare occasion a payout gets stuck part-way (say, a crash right as it was sent), the Insy team
> can safely resume it — finishing it if the money already moved, or releasing it back to your balance
> if it didn't. Reach out and they'll unstick it.
## Next
- **[Your wallet](/payouts/wallet)** — See both balances and your money history in one place.
- **[Withdrawing crypto earnings](/payouts/crypto-payouts)** — The other rail — USDC to a wallet address you control.
---
# Your wallet
Source: https://docs.insy.io/payouts/wallet
Your wallet shows the money Insy holds **for you personally**, split across two rails. Both are
always shown, even at zero.
## The two balances
- **Fiat balance — PLN** — Your **clip-program reward** balance, in Polish złoty. Withdrawn to a connected Stripe account.
- **Crypto balance — USDC** — Your withdrawable crypto, in USDC. Withdrawn to a wallet address you add and control.
> **The fiat balance is clip rewards only — not your sales income**
>
> The PLN balance is **only** what you've earned from the clip program — **not** money from selling
> your community or product. Ordinary card sales settle straight to your own Stripe account as part of
> checkout; they never appear here, and there's no "withdraw my sales" button in this wallet. If
> you're looking for sales income, it's already on its way to your Stripe account.
Earnings from things you sold with **crypto checkout** are different again: tracked per community or
product, with a short hold before you can take them out. Those are covered in
[Withdrawing crypto earnings](/payouts/crypto-payouts).
## Withdrawable now vs. on hold
Each balance is shown as two numbers:
- **Available** — money you can withdraw right now.
- **Pending** — money that's arrived but is still inside a **hold window** and can't be withdrawn
yet. Crypto earnings sit here for a few days after a sale before moving to available (see
[the hold explained](/payouts/crypto-payouts#step-2--understand-the-hold)).
A withdrawal is only offered against your **available** figure. If the numbers don't add up to what
you expected, the difference is almost always money still on hold.
## Your money history
Your wallet keeps a running history of every movement, newest first (the most recent 50). It's a
**complete, append-only ledger** — nothing is ever quietly edited or deleted. A withdrawal that
later failed, for example, shows up as the withdrawal *and* its reversal.
Each entry is money **in** or money **out**, with a plain-language label:
| Label | What it means |
| --- | --- |
| **Clip reward** | A clip-program reward paid into your balance. |
| **Sale** | Money from a crypto sale, credited to that item's earnings. |
| **Funds released** | Held earnings that have cleared the hold window and are now available. |
| **Withdrawal** / **Crypto withdrawal** | Money you took out, to Stripe or to a wallet. |
| **Withdrawal reversed** | A withdrawal that failed, put back onto your balance. |
| **Refund** | A buyer refund reversing part or all of an earlier sale. |
| **Balance adjustment** | A manual correction by the Insy team, always with a written reason. |
> **A failed withdrawal is never lost money**
>
> Because the history is append-only, a reversal sits right next to the withdrawal it undoes. If a
> payout fails, the money returns to your available balance and you can try again — no need to contact
> anyone to "get it back".
## Next
- **[Withdraw crypto (USDC)](/payouts/crypto-payouts)** — Add a wallet address, mind the hold and the network fee, and cash out.
- **[Withdraw fiat (PLN)](/payouts/fiat-payouts)** — Connect Stripe and withdraw your clip-reward balance.
---
# Selling & payments
Source: https://docs.insy.io/selling
Digital products are the fastest thing to sell on Insy: an ebook, a course, a video, a booked
consultation — anything you can package as files or a booking. Describe the product once, give it
one to five priced options, and share its page. When someone buys, Insy takes the payment, grants
access, and emails them their files.
- **[Create a digital product](/selling/create-product)** — Name it, add pictures, pick a type, and set up the options buyers choose between.
- **[Choosing a price model](/selling/pricing)** — One-time, subscription, free, or pay-what-you-want — and how to show a crossed-out "was" price.
- **[How buyers pay](/selling/payments)** — Card, BLIK and P24 through Stripe, crypto through CoinGate, and what you need before you can publish.
- **[Coupons, refunds and limits](/selling/coupons-refunds)** — Discount codes, your refund policy, sales limits, availability windows, waitlists and custom checkout fields.
- **[Transaction details](/selling/transaction-details)** — Buyer information, fees, currencies and Stripe settlement status.
- **[Recover failed renewals](/selling/smart-retries)** — Set up Stripe Smart Retries and customer emails for subscriptions.
> **Selling access to a community instead?**
>
> This section is about digital products. To gate a Telegram group or run a paid community, see
> [Communities & Telegram](/communities). Getting your earnings out is in
> [Payouts](/payouts).
---
# Charging VAT on top of your prices
Source: https://docs.insy.io/selling/charging-vat
Every plan states whether its price already contains VAT (**VAT included**) or VAT is added at checkout
(**VAT added at payment**). This setting is fixed once a plan exists: Stripe does not let a price change its tax
behaviour, and a plan that has sold keeps its price because subscribers are billed on it. To start charging
"100 zł + VAT" you create a new plan and, if you want, move your subscribers to it.
## 1. Update your billing details
In your seller billing details, save your company data again so the VAT registry check runs with your new
status. If you previously set a manual VAT rate of "exempt" (zw.), change it to your VAT rate — a manual rate
takes priority over what Stripe Tax calculates on your invoices.
## 2. Turn on tax collection in Stripe
Open **Account → Stripe → Tax** for the account you sell with:
1. **Complete the tax settings**
Fill in your head office address and the tax code Stripe asks for, until the
status is active.
2. **Add your VAT registration**
Add the country you are registered in (for example Poland). Stripe only
collects tax where you have a registration — see below for buyers in other
countries.
3. **Enable automatic tax**
Switch on tax automation. Insy refuses to enable it until the settings are
active and at least one registration exists.
From then on Stripe calculates VAT at checkout based on the buyer's location, and the tax appears on the
invoices Insy issues through your invoicing integration — for the first payment and for every subscription renewal.
Insy sets your products' tax code to electronically supplied services (`txcd_10000000`) when you connect Stripe Tax.
### Buyers in other countries
Stripe adds VAT only where you have a registration; anywhere else the buyer pays the net price and the tax shows as
"not collecting". For consumers in other EU countries that means:
- **Below €10,000** a year of cross-border EU sales of digital services, you may charge your own country's VAT. When
you add your home registration, tell Stripe you are below the threshold (the small-seller option); Stripe then
applies your home rate to EU buyers and warns you when you pass the threshold.
- **Above the threshold**, or if you opt in earlier, you charge each buyer their own country's rate through the
EU One Stop Shop (OSS). Register for OSS with your tax office and add the OSS registration in Stripe.
Buyers outside the EU (for example Switzerland, the UK, the US) are usually outside the scope of EU VAT, but some
countries tax foreign sellers of digital services above their own thresholds. Agree the setup with your accountant
before you move subscribers — the price change quotes each subscriber the amount Stripe will actually charge them.
## 3. Create the new plan
Create a plan with the same name, currency and billing period, set the price to your net amount (for example
100 zł) and choose **VAT added at payment**. A buyer then pays 100 zł plus VAT, where Stripe collects it.
> **Info**
>
> A plan that has sold cannot have its price, currency, period or VAT setting
> changed — the form says so instead of saving. Create a new plan instead.
## 4. Move existing subscribers (optional)
On **Access plans**, use **Move subscribers** in the _Subscription price changes_ section:
1. Choose the plan your subscribers are on and the new plan. Only subscription plans in the same currency and
billing period can be chosen. A **VAT added at payment** plan can only be chosen once Stripe Tax is active on
your account — otherwise subscribers would pay the net price with no VAT.
2. Pick the date from which the new price applies — at least 30 days from today.
3. Confirm that your terms of service allow changing the price of a running subscription.
What happens next:
- The old plan stops being sold to new buyers. The new plan's price is locked and it cannot be switched off or
deleted until the change is done or withdrawn.
- Every active subscriber gets an e-mail with the old price, what they will pay from their next renewal (for
example "123,00 zł (100,00 zł + 23,00 zł VAT)"), the date, and a link to opt out. A week before the date they
get a reminder. A mail that fails to send is retried; nobody is moved without having been told, and nobody pays
the new price sooner than 30 days after their own notice — if it went out late, their date moves with it.
- A subscriber who opts out keeps access until the end of the period they paid for — also if a payment is
overdue — and their subscription then ends. Until the date they can undo it from the same link.
- Subscribers who do nothing are moved on the chosen date and pay the new price from their next renewal. Nothing
is charged at the moment of the move.
- Subscribers already set to cancel are moved too, without being charged; if they resume, they renew at the
price they were told.
- Access does not change: subscribers stay in your Telegram group and Discord server throughout. If the old plan
grants a Discord role and the new plan has none, the new plan gets the same role, so moved subscribers keep their
channels. A new plan with a different Discord role cannot be chosen.
Some subscribers are not moved and simply stay on the old price, with their subscription and access:
- they have no e-mail address to be told at;
- they switched to another plan, or took out a new subscription, after the change was announced;
- Stripe cannot tell which country to tax them in (no address on the customer and no billing country on their
payment method);
- they have a discount that applies only to the old plan.
The section lists them with the reason, next to how many subscribers are waiting, were moved or opted out. When
Stripe does not answer, the move is retried automatically.
You can withdraw a scheduled change until its date. The old plan is then sold again and everyone already notified
is told the change is off; those who opted out get a link to keep their subscription at the old price.
> **Warning**
>
> Moving subscribers who do not respond is only allowed if your terms of service
> provide for price changes and you give enough notice. Check your terms before
> scheduling a change.
## Platform fee
The Insy platform fee is calculated on the full amount the buyer pays, including VAT collected by Stripe.
---
# Coupons, refunds and limits
Source: https://docs.insy.io/selling/coupons-refunds
A few tools let you shape the offer: discount codes, a refund policy, limits on quantity and timing,
and extra questions at checkout.
## Discount coupons
A coupon is a code a buyer types at checkout for a **percentage off**. You control:
- **The code** and the **percentage** it takes off.
- **Which options** it applies to — attach it to specific priced options.
- **How long the discount lasts** on a subscription — one payment, a set number of months, or
forever (as long as the subscription runs).
- **An expiry date** and a **maximum number of uses**, both optional. Leave them off and the code
never expires and has no usage cap.
> **Coupons are percentage-based**
>
> Coupons take a percentage off, not a fixed amount. For a "10 PLN off" deal, work out the equivalent
> percentage or set a lower price on the option directly.
## Refunds
> **There is no refund button for creators**
>
> Refunds on Insy are **not self-service** — you can't issue one from your dashboard. What you can do
> is publish a **refund policy** buyers see at checkout: turn refunds on and state a "no questions
> asked within N days" window. That window sets expectations, but it's a promise, not an automated
> action — honouring it is handled manually through support, not by a button you press.
So: decide whether to advertise a refund window, set it if so, and route any refund request through
Insy support. A product with no refund policy simply doesn't show one.
## Sales limits
You can cap how many units sell, at two levels:
- **Per option** — a limit on a single priced option. Once reached, that option stops selling.
- **Whole product** — a limit across the product, whichever option is chosen.
Leave a limit unset and that level is unlimited. Useful for a cohort with fixed seats or a scarce
release.
## Availability windows
A product can have a start and an end for when it's on sale:
- **Available from** — before this, the page is visible but the buy button is closed.
- **Available until** — after this, it stops selling.
Outside the window the page still shows, so you can build anticipation before a launch or leave a
sold-out page up after one — buyers just can't check out until (or after) your dates.
## Waitlists
When an option is unavailable — sold out, or not yet open — a buyer can **join its waitlist** by
leaving their email. When it becomes available again, Insy emails everyone on the list so they can
come back and buy. It turns a closed page into a way to capture demand instead of losing it.
## Custom checkout fields
Add your own fields to the checkout to collect what you need from each buyer. Each field has a label,
can be marked **required**, and is one of these kinds:
| Field | For collecting |
| --- | --- |
| **Text** | A free-text answer — a name, a handle, a note |
| **Phone** | A phone number |
| **Address** | A postal address |
| **Consent** | A checkbox the buyer must tick; the label holds the full consent text |
Use a **consent** field for terms, a licence agreement or a marketing opt-in — the label is the full
wording the buyer agrees to. Keep required fields to what you genuinely need; every extra one is a
step between the buyer and the sale.
- **[Create a digital product](/selling/create-product)** — Start here if you have not built the product yet.
- **[Payouts](/payouts)** — Get your earnings out and get discovered by new buyers.
---
# Create a digital product
Source: https://docs.insy.io/selling/create-product
A digital product is one page with everything a buyer needs: what it is, what it looks like, and the
options they can buy. This page covers the product itself; the prices live on each option, covered
in [Choosing a price model](/selling/pricing).
## The basics
1. **Name it**
Up to 200 characters. Make it the thing a buyer would search for — "Notion Finance Template",
not "My product v2".
2. **Pick a web address**
Every product gets a short link of the form `insy.io/@yourusername/your-slug`. The slug is the
last part — 2 to 25 characters, lowercase, no spaces. Choose something short and stable; it's
what you paste into posts and bios.
3. **Write a description**
Up to 2000 characters of what the buyer gets and who it's for. This is the main sales copy, so
lead with the outcome.
4. **Add pictures**
Up to six images, plus a separate avatar picture that represents the product in listings.
Portrait images at roughly 1000x1500 px look best. One image can be marked as the main one shown
at the top of the page.
## Choose a product type
The type tells buyers what shape the product is and unlocks the right features behind the scenes.
There are seven:
| Type | Use it for |
| --- | --- |
| **Ebook** | A book or PDF guide |
| **Course** | A multi-part program or lessons |
| **Video** | One or more video files |
| **Audio** | Audio files, a podcast bundle, music |
| **Document** | Templates, worksheets, notes |
| **Consultation** | A booked one-to-one session (see below) |
| **Other** | Anything that does not fit the above |
You also pick a **category** (the topic) and, optionally, a **language**.
> **Consultation is different**
>
> A **consultation** product sells your time, not a file. Instead of content to download, you set your
> availability and each buyer books a slot from it. The rest of this page still applies — name,
> pictures, priced options — but the "content files" below are replaced by a calendar.
## Add one to five options
Every product needs at least one option to buy and can have up to five. Insy calls these
**variants** — one thing a buyer can pick, like "Basic / Pro / Bundle", or a single "Full access".
Each variant carries:
- **A name and description** — name up to 100 characters, description up to 2000. This is what the
buyer reads on the option they're choosing.
- **A feature list** — short bullet points, each with a title (up to 100 characters) and a line of
detail. Use it to show what this option includes and how it differs from the others.
- **The content files** — the actual files the buyer receives after paying: the ebook PDF, the
videos, the templates. (A consultation variant uses your availability instead.)
- **A price** — every variant is priced on its own, and can use a completely different price model.
See [Choosing a price model](/selling/pricing).
> **Why several options help**
>
> Two or three options at different prices let a buyer self-select — commonly a cheaper option with
> the core files and a higher one that adds a call, a community invite or extra templates.
## Before it goes live
Building the product doesn't publish it. When you're ready, flip it to **published** — but a product
with any paid option can only publish once you've connected a Stripe account that's fully set up to
take charges. A product where every option is free can publish without one.
The details of that, and how buyers actually pay, are on the next page.
- **[Choosing a price model](/selling/pricing)** — Set each option's price: one-time, subscription, free or pay-what-you-want.
- **[How buyers pay](/selling/payments)** — Payment methods, currencies, and the Stripe account you need before publishing.
---
# How buyers pay
Source: https://docs.insy.io/selling/payments
Insy handles the payment: the buyer pays on a hosted checkout, and once it succeeds Insy grants
access and sends their files. Two rails sit behind that checkout — cards, and crypto.
## Cards, BLIK and P24 (Stripe)
Card payments run through **Stripe**. Depending on what your connected Stripe account supports,
buyers can pay with:
- **Cards** — including Visa and Mastercard.
- **BLIK** and **Przelewy24 (P24)** — the two methods most Polish buyers reach for.
Checkout may also offer eligible wallets or other payment methods. Availability depends on the
connected account, purchase currency and whether the purchase is one-time or recurring. A method
available for one purchase is not necessarily available for every currency or subscription.
## Crypto (CoinGate)
Crypto payments run through **CoinGate** and work differently from cards. Insy holds the funds and
pays you out **net**, which is why crypto earnings settle on their own schedule rather than landing
in your Stripe balance. See [Payouts](/payouts) for how that money reaches you.
> **A crypto payment is never anonymous**
>
> Crypto checkout always needs the buyer's **email address** (or a linked Telegram account). CoinGate
> doesn't hand a buyer's identity back after they pay, so without an email up front there'd be no way
> to know who the purchase belongs to — and Insy refuses the checkout rather than take an untraceable
> payment. Pay-what-you-want and buying several units at once are handled on the card rail.
A digital product's own checkout is card-based. Crypto is offered on community and subscription
access — see [Communities & Telegram](/communities).
## Currencies
Insy supports these sale currencies:
- **PLN** — Polish złoty
- **USD** — US dollar
- **EUR** — euro
- **GBP** — pound sterling
- **CHF** — Swiss franc
- **CZK** — Czech koruna
- **SEK** — Swedish krona
- **NOK** — Norwegian krone
- **DKK** — Danish krone
- **RON** — Romanian leu
- **UAH** — Ukrainian hryvnia
Choose the currency when setting up your product or community pricing. Enter amounts in the selected
currency: `49` in EUR means €49.00. Payment-provider availability still applies; this list does not
mean every payment method supports every currency.
The currency charged to the buyer can differ from the currency Stripe settles to your balance.
[Transaction details](/selling/transaction-details) show each amount in its own currency. Selecting
`ALL` in the admin dashboard shows a breakdown by currency, rather than converting everything to PLN.
## What you need before publishing a paid product
> **A paid product needs a fully set-up Stripe account**
>
> To publish a product with any paid option, you must connect a **Stripe account that is fully
> onboarded and able to take charges**. Connecting the account isn't enough on its own — Stripe has to
> have finished verifying you and switched charges on. Until then the product won't publish and buyers
> can't see it.
The one exception is a product where **every** option is free: that can publish with no Stripe
account. Note that a pay-what-you-want option counts as paid even if its minimum is 0 — because a
buyer *can* pay — so it still needs Stripe.
> **Connect Stripe early**
>
> Stripe's verification can take time. If you plan to sell anything paid, finish Stripe onboarding
> before launch so publishing isn't the step that holds you up.
- **[Transaction details](/selling/transaction-details)** — Payment methods, buyer details, platform fees and settlement status.
- **[Recover failed renewals](/selling/smart-retries)** — Configure Stripe Smart Retries for subscription payments.
- **[Coupons, refunds and limits](/selling/coupons-refunds)** — Discount codes, your refund policy, and controlling how much sells and when.
- **[Payouts](/payouts)** — How your card and crypto earnings actually reach you.
---
# Choosing a price model
Source: https://docs.insy.io/selling/pricing
Price is set on each option (each **variant**), not on the product as a whole — so one product can
mix a free taster, a one-time bundle and a subscription. This page covers the four price models and
the two extras you can layer on top.
## The four price models
1. **One-time**
The buyer pays once and keeps access. The default if you choose nothing else. Good for ebooks,
templates and downloads.
2. **Subscription**
Billed on a repeating schedule — **monthly** or **yearly** — until they cancel. Good for ongoing
access, updates or a membership. You can add a free trial (see below).
3. **Free**
No charge. The buyer claims it and gets access immediately, with no payment step. A product may
have one free option alongside paid ones — a common taster.
4. **Pay-what-you-want**
The buyer chooses the amount, at or above a minimum you set. You can pre-fill a suggested amount
to nudge them. Good for tips, "name your price" releases and donations.
> **Choose the product currency**
>
> Choose one of the [supported currencies](/selling/payments#currencies) for your product. Its options
> share that currency. Enter prices in whole currency units, including decimals where needed. The
> current product editor requires a fixed paid option to be at least **5 units of the selected currency**.
> (A pay-what-you-want minimum is the one exception; see below.)
## Free trials, for subscriptions
A subscription option can start with a free trial of **1 to 100 days**. The buyer gets full access
straight away and is only charged when the trial ends, unless they cancel first. Trials apply to
subscriptions only — a one-time option has nothing to renew.
## Setting a pay-what-you-want price
Pay-what-you-want has two numbers doing different jobs:
- **The minimum** is the floor — the buyer can't pay less. It can be as low as 0, which makes the
product "free and up".
- **The suggested amount** is pre-filled as a starting point. If you set one, it must be at least
5 units of the selected currency. The buyer can raise or lower it down to the minimum.
> **Suggested amount does real work**
>
> Most buyers accept a sensible pre-filled number. A suggested amount a little above your minimum
> usually earns more than an empty box.
## Showing a "was" price
To show a higher, crossed-out price next to the current one — the "was 99, now 49" look — set a
**higher original price** on the option. Insy displays it struck through, with your real price
beside it.
This works on **one-time** and **subscription** options, not on free or pay-what-you-want. The
original price must itself be at least 5 units of the selected currency and higher than what you're actually charging.
## Which model for which option?
> **You can mix them within one product**
>
> Because the price lives on each option, a single product can offer a **free** sample, a **one-time**
> full bundle, and a **subscription** for ongoing updates — three options, three models, one page. Set
> each one independently when you [create the product](/selling/create-product).
Once the price is set, the last thing to understand is how the money reaches you — the payment
methods, the currencies, and the Stripe account a paid product needs.
- **[How buyers pay](/selling/payments)** — Card, BLIK, P24 and crypto, and what you need before you can publish a paid product.
- **[Coupons, refunds and limits](/selling/coupons-refunds)** — Discount codes, your refund policy, and limits on how much sells and when.
---
# Recover failed subscription payments
Source: https://docs.insy.io/selling/smart-retries
Stripe Smart Retries can help recover failed subscription payments. This setup is performed in
Stripe; the Insy payment-data refresh button does not turn it on.
## Choose the account that owns the subscription
Insy creates merchant checkout payments in the connected Stripe account's context. Find the account
containing the subscription and invoice you want to recover. Direct-charge subscriptions belong to
the connected account. [Stripe's Connect subscriptions guide](https://docs.stripe.com/connect/subscriptions).
For our integration, this means checking recovery settings on that account rather than assuming a
change on the main Insy account covers every merchant. With a Standard account, the owner can use
their Stripe Dashboard. If the relevant settings are unavailable, ask Insy support to help establish
the configuration path for your connected account.
## Configure retries
1. **Open revenue recovery**
In the correct account and environment, open **Billing → Revenue recovery → Retries**.
2. **Enable Smart Retries**
Start with Stripe's recommendation of **8 attempts over 2 weeks**.
3. **Choose what happens when recovery fails**
Set the final subscription action. For a finite recovery period, consider **Cancel the
subscription**, and test how this affects member access before using it in production.
4. **Save and test**
Save the policy on the relevant account. Missing payment methods and hard declines can require
the buyer to act before collection can succeed.
See [Stripe Smart Retries](https://docs.stripe.com/billing/revenue-recovery/smart-retries) for the
current settings. One-time BLIK/P24 purchases in Insy still require manual renewal.
## Help the buyer fix the payment
Enable Stripe's failed-payment emails and a link for updating payment details. For payments requiring
authentication, enable the Stripe-hosted confirmation link. Check the destination and message content
alongside the notifications Insy already sends. [Customer email settings](https://docs.stripe.com/billing/revenue-recovery/customer-emails)
and [3D Secure recovery](https://support.stripe.com/questions/subscription-retries-for-failed-3d-secure-authorizations).
## Check the full renewal flow
Before enabling a production policy, test a failed renewal, a successful recovery after updating the
payment method, and the case where all attempts fail. Check both the subscription in Stripe and the
member's access in Insy. The retry window does not itself promise an extension of access.
An authorized administrator can inspect the recovered payment in **Payments**, including its amount,
currency and payment method. A merchant can inspect the linked Activity entry.
> **Stripe Automations and the next retry date**
>
> With Automations, Stripe supplies the next attempt date through `invoice.updated`. Insy currently
> records retry information from `invoice.payment_failed` and does not handle `invoice.updated` for
> this purpose. The next retry date in Insy may therefore be missing even when Stripe has scheduled
> one. Start with standard Smart Retries if you need this information displayed; Automations requires
> an integration update. [Stripe webhook behavior](https://docs.stripe.com/billing/revenue-recovery/smart-retries#webhook-events).
- **[Transaction details](/selling/transaction-details)** — Understand payment-data synchronization and settlement status.
- **[Community pricing](/communities/pricing)** — Automatic subscriptions versus manually renewed access.
---
# Understanding transaction details
Source: https://docs.insy.io/selling/transaction-details
Open your community's **Activity** page and select a purchase to see its details. The amount is shown
in the currency the buyer paid. The transaction breakdown adds payment and settlement information as
it becomes available.
## Payment method and buyer information
The **Payment method** column shows how the buyer paid. When a method has a logo, hover over it to
see its name. Stripe is the payment provider; card, BLIK or a wallet is the payment method.
Insy keeps the available purchase information locally, including buyer contact and billing details,
payment references and the actual method used. Card details are limited to information such as the
brand and last four digits. Already captured buyer details are retained when payment data is refreshed.
Some fields may be unavailable. A dash means that information has not been recorded, not that the
amount is zero. Older Activity entries may lack payment details; the new presentation applies to
new entries with a linked payment.
## Reading the breakdown
| Field | What it means |
| --- | --- |
| Subtotal, discount and sales tax | Purchase amounts reported for the transaction, when available. |
| Insy platform fee | The application fee collected by Insy through Stripe. Before synchronization, an estimate may use the rate saved with the payment. |
| VAT included in platform fee | VAT already included in Insy's fee. Do not add it again. |
| Affiliate commission | Recorded affiliate commission, including its amount, currency and status. No recorded commission means no commission record is available for that payment. |
| Refunded | The recorded amount refunded to the buyer. |
| Settlement fees | Total fees reported for the Stripe balance transaction. Do not add the separately displayed application fee to this total again. |
| Net settlement | The net amount reported by Stripe, in the settlement currency. |
| Buyer at purchase | Available buyer details retained with the purchase. |
A purchase, an affiliate commission and a settlement can use different currencies. Compare amounts
in the same currency; do not subtract a PLN fee directly from an EUR purchase amount.
## Why is Stripe settlement pending?
**Pending availability** means the saved Stripe settlement is awaiting availability on the Stripe
balance. The buyer's payment can already be completed successfully.
**Expected availability** shows the date supplied by Stripe. Insy refreshes the settlement after
that date, so the displayed status can lag behind Stripe. This date is not a promised bank payout
date: bank payouts follow a separate schedule.
> **Pending does not mean the buyer should pay again**
>
> Check the payment status first. A completed payment with a pending settlement does not need a
> second payment from the buyer.
## Admin payment and merchant views
These views are for authorized Insy administrators. Merchants use their own Activity and finance pages.
The admin **Payments** page supports filters for currency, merchant, provider, actual payment method
and affiliation. The dashboard's **ALL** currency view keeps totals separated by currency.
In **Stripe Merchants**, the payment data sync section shows:
- **Tracked**: eligible payments included in reporting.
- **Synced**: payments with at least one successful data refresh; optional fields can still be absent.
- **Awaiting first sync**: payments with no successful refresh yet, including those that encountered an error.
- **Failed last attempt**: payments whose latest refresh failed, even if an older snapshot exists.
- **Awaiting Stripe balance availability**: payments whose recorded settlement is pending.
These counts overlap. A failed refresh can affect either a payment awaiting its first sync or one
that was synced earlier. Pending balance availability is separate from a synchronization failure.
The list and details refresh every 30 seconds.
**Retry payment synchronization** queues eligible missing data and failed refreshes for that
merchant. Processing happens automatically in batches, so results are not immediate. Previously
recorded details remain available after a failed refresh. Historical payments outside reporting are
not backfilled by this action. Refreshing the Stripe merchant account itself is a separate action.
> **Two different kinds of retry**
>
> Retrying synchronization only retrieves payment information. To retry collecting a failed
> subscription payment, configure [Stripe Smart Retries](/selling/smart-retries).
- **[Understanding fees](/getting-started/fees)** — The platform commission and VAT included in it.
- **[Recover failed renewals](/selling/smart-retries)** — Configure Stripe to retry subscription payments.