Kwern
Connectors

Stripe

How to install Kwern's Stripe App, which revenue figures Kwern keeps day by day, why the only thing it writes is a promotion code for an influencer offer, and how affiliate commissions are worked out from those codes.

What you need

A Stripe account. One Stripe account is one connection in Kwern, and the account is what a product reads.

Connect it

Open Settings · Add an account and press Connect Stripe. Stripe opens the install screen of Kwern's Stripe App, shows the permissions it asks for, and asks you to accept them on the account you choose. An install made on a Sandbox or in test mode reads and writes test data only; its connection is labelled (test).

Then open the product's Apps page and press Choose what Kwern reads, check the account and press Confirm.

What Kwern reads

The app reads subscriptions, invoices, charges, balance transactions, products, prices, coupons and promotion codes. From them, these lines accumulate day by day as the connector's series:

  • MRR, active subscriptions and active trials — the standing figure at the end of each day
  • new subscriptions, cancellations and gross revenue — what that day brought
  • referred customers, conversions, referred revenue, commissions earned and commissions paid — what the creators' codes brought that day (see Affiliate commissions)

Stripe has no MRR figure of its own, so Kwern computes it from the subscriptions active at the end of the day: each price times its quantity, brought to a month. Discounts are left out, so MRR is the list price of what is subscribed to. Gross revenue is the charges that succeeded that day, before refunds and fees.

Every figure is in one currency: the one most of your subscriptions are priced in, picked on the first sync and kept. A price or a charge in another currency stays out of MRR and revenue.

The Revenue tab of Analytics charts these, the affiliate lines included, beside RevenueCat's when the product has both, each under its own name and never added together.

What Kwern can change

Coupons and promotion codes, and nothing else: no payment, refund, payout, subscription or customer. Stripe refuses any other write, whoever asks.

In practice Kwern writes one thing on its own: a promotion code for an influencer offer.

  1. On the Influencers agent's settings, list the offers you are ready to make. A Stripe offer names a coupon you created in Stripe (the terms: a percentage off, for how long), how many times each code may be redeemed, and how many days it lives.
  2. Each message the agent drafts picks one of your offers and names a code for that person, such as MAYA-GYMUP.
  3. When you mark the message as sent, Kwern makes that promotion code on your coupon, with the cap, the expiry and first-time customers only. A code is made once, whatever retries happen.
  4. Each daily sync reads back how often every such code was redeemed, and the next run of the agent reads it.

If Stripe refuses the code (another active code already has that name, the coupon was deleted), the proposal fails with Stripe's own reason.

A creator redeems the code wherever your checkout accepts promotion codes: Checkout with promotion codes allowed, a Payment Link, or the customer portal.

Affiliate commissions

Kwern works out each creator's affiliate commission from what their code brought, on your own invoices.

  1. An affiliate offer names a Stripe coupon and a commission: a percentage, for so many months from each customer's first payment.
  2. When you mark the message as sent, Kwern makes the creator's code on that coupon, as for any Stripe offer.
  3. Each daily sync reads the paid invoices and the refunds on their charges. A customer whose first discounted invoice carries a code Kwern made is that creator's referred customer. Every invoice that customer pays within the offer's months, counted from their first payment, earns the creator its percentage, net of refunds.
  4. Once a month the Influencers agent proposes the payouts due: one per creator owed, with how much, where to pay and the commissions it covers. A commission that fails its fraud check comes as a proposal to remove it.
  5. You pay outside Kwern, by PayPal or bank transfer, then mark the payout as done. Its commissions count as paid from then on. Kwern moves no money.

Two things are left out. A credit note that credits the customer's balance, or an amount settled outside Stripe, is not netted from a commission. A code redeemed in a one-time Checkout payment that makes no invoice is not counted.

The agents that use it

The Influencers agent mints its offer codes here and proposes the affiliate payouts they earn. Every other agent reads the revenue as the product's reality.

When it breaks

Access tokens last an hour and are renewed on use; the refresh token behind them lives a year from its last use, so a connection the daily sync reads never expires. Uninstalling the app in Stripe marks the account as needing attention until you connect it again.

Stripe connector · All connectors · How a product is set up

On this page