Guides

Selling

Sell digital products and paid subscriptions to your readers, from the dashboard, the REST API or an AI assistant. Readers pay your own Stripe account. FlockStack takes no cut: only Stripe's processing fee comes off a sale.

Set up payments

On FlockStack Cloud, each account connects its own Stripe account from the Payments page (connect_payments): Stripe's page takes you through its details, and the account stays yours, with its own dashboard for payouts, refunds and disputes. get_payments_status says when it can take charges. On a self-hosted server, set STRIPE_SECRET_KEY and sales go to that Stripe account.

Stripe sends what happens to sales to https://flockstack.io/api/webhooks/payments. Add that endpoint in Stripe with the events below and put its signing secret in STRIPE_PAYMENTS_WEBHOOK_SECRET. On FlockStack Cloud, choose to listen to events on connected accounts.

  • checkout.session.completed
  • checkout.session.async_payment_succeeded
  • charge.refunded
  • charge.dispute.created
  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.paid
  • invoice.payment_failed
  • account.updated
  • account.application.deauthorized

Digital products

create_product makes a draft, set_product_file stores its file (up to 15 MB), and update_product with status active puts it on sale at /shop/<slug> on the newsletter's site. The reader pays with Stripe Checkout; when Stripe confirms the payment, FlockStack makes the order and emails them a download link from the newsletter's address.

The file lives in a private bucket and is never served from a public address. The link is signed, works for 7 days and 20 downloads, and stops when the order is refunded in full or disputed. resend_order_email sends a new link and ends the old one. A buyer can tick a box to join the newsletter's list; the newsletter's own signup rules, a confirmation email included, apply.

Terminal
curl https://flockstack.io/api/v1/products \
  -H "Authorization: Bearer $FLOCKSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Launch checklist","priceCents":1900}'

Paid subscriptions

set_paid_tier turns on a newsletter's paid tier with a monthly price, a yearly price and an optional free trial. Readers subscribe on its /subscribe page. Stripe tells FlockStack when a subscription starts, renews, is cancelled or fails to pay, and each contact is paid or free accordingly, with paidUntil as the end of the period they paid for. A failed renewal makes the reader free at once; the next successful payment brings them back.

A campaign has an audience: all, free or paid. A paid issue goes to paid readers only, shows a teaser on its web page and has the whole text in the email. Everything that protects a send applies to it as to any other: plan limits, pacing, the list cleanup (a paid reader is never set aside) and the suppression lists. Paid readers get a manage-subscription link in every email, which opens their Stripe billing page.