Paystack subscriptions and payments, after Paystack's fees

Connect a Paystack restricted key that may only read. Sumly reads subscriptions, successful transactions with Paystack's fee, refunds and your balance.

Drawn with example numbers.

Connected in three steps

A read-only key, pasted once. Sumly does the rest.

  1. 1

    In Paystack: Developers → API configuration → Restricted API keys → Create. Name it Sumly.

  2. 2

    Give it read on Transactions, Plans, Customers, Disputes & refunds and Balance, and on Subscriptions if Paystack lists them apart. Nothing to write.

  3. 3

    Paste the rk_live_… key below. A secret key (sk_live_…) works too, but it can also write.

  4. 4

    To trace payments to visits, pass metadata: { sumly_visitor_id: sumly.visitorId } when you initialize the transaction.

Or let your coding assistant do it

Paste this into Claude Code, Cursor or Codex in your project. It fits the code to how your project is built, asks you for the dashboard steps and leaves the keys to you.

See what it says
Set up Paystack for Sumly in this project.

Sumly (https://sumly.dev) shows revenue next to the visits and app users it came from. The full guide is https://sumly.dev/integrations/paystack; read it if anything below is unclear.

Steps:
1. In Paystack: Developers → API configuration → Restricted API keys → Create. Name it Sumly.
2. Give it read on Transactions, Plans, Customers, Disputes & refunds and Balance, and on Subscriptions if Paystack lists them apart. Nothing to write.
3. Paste the `rk_live_…` key into Sumly. A secret key (`sk_live_…`) works too, but it can also write.
4. To trace payments to visits, pass `metadata: { sumly_visitor_id: sumly.visitorId }` when you initialize the transaction.

So each payment shows which visit it came from: When you initialize a transaction, pass metadata with sumly_visitor_id set to the sumly_vid cookie (as its own key, or as a custom field with that variable name). Each payment then counts for the source, campaign and country of the visit that started it. In the EU and UK there is a visitor only after they agree.

Keep in mind: Built from Paystack's API reference and checked against responses shaped like it, not yet against a live Paystack account. Tell us if a number looks off. Paystack is not the merchant of record and reports no tax, so a payment counts what the buyer paid. Paystack keeps no time for a cancellation: a subscription stops counting on the day Sumly first sees it cancelled or set not to renew. Payment Pages take no field Sumly could carry the visitor in, so they are not traced.

How to work:
- Look at how this project is built first, and fit the code to its framework and its way of doing things; the examples above are a starting point, not something to paste as is.
- Steps that happen in a dashboard (Sumly, or Paystack's own) are mine: tell me exactly what to click, then wait for me.
- The Paystack key goes into Sumly (Projects and payments), not into this project: Sumly reads Paystack itself. Your part in the code is only carrying the visitor into checkout, as above.
- Keys the code needs belong in environment variables, never in the code or the repository. Never ask me to paste a secret key into this chat; tell me which variable to set.
- Change only what this needs, show me the changes before you commit, and tell me how to check that it works.

What you see after connecting

Paystack next to every other project and provider, on the same pages.

Overview

MRR, ARR, revenue per customer, paying customers and your Paystack balance.

Payments after Paystack's fee, with the customer and the card's country.

Metrics over time, with churn, LTV and quick ratio.

Plans by name, customers, the outlook and a CSV export.

With the visitor in the metadata

Revenue by source and campaign, and ROI for each cost.

Which visit paid

When you initialize a transaction, pass metadata with sumly_visitor_id set to the sumly_vid cookie (as its own key, or as a custom field with that variable name). Each payment then counts for the source, campaign and country of the visit that started it. In the EU and UK there is a visitor only after they agree.

How attribution works →

Counts toward your plan

Nothing: payments, customers and refunds never count toward your plan. Only the page views and app screens Sumly keeps do. Plans →

The details

What Sumly reads
  • Subscriptions with their plan, quantity and status
  • Successful transactions with Paystack's fee and the card's country
  • Processed refunds
  • Your balance
When Sumly reads Paystack
  • Every 15 minutes, together with the other connections of the project. The first read takes three years of transactions.
  • Subscriptions are read whole each time; transactions and refunds from shortly before the newest one kept.
  • With the webhook added, each successful charge and subscription change is read again from Paystack the moment it happens.
How Paystack money is counted
Monthly value
The subscription's amount times its quantity, spread over the plan's interval: weekly 52 ÷ 12, quarterly a third, biannually a sixth, annually a twelfth.
Cancellations
A subscription set not to renew leaves MRR at once, though it stays paid up. Paystack keeps no time for it, so it is the day Sumly first sees it.
Attention
A subscription whose last charge failed still counts while Paystack retries, as past due.
Tax
Paystack is not the merchant of record and reports no tax. Payments count what was paid.
Fees
The fee Paystack took on each transaction. Net revenue is after it.
Refunds
Each processed refund comes off on the day it was made.
Currency
Payments in naira, cedis, rand or shillings, turned into euros at the ECB rate of that day where the ECB has one. MRR converts at today's rate.
Good to know
  • Built from Paystack's API reference and checked against responses shaped like it, not yet against a live Paystack account. Tell us if a number looks off.
  • Paystack is not the merchant of record and reports no tax, so a payment counts what the buyer paid.
  • Paystack keeps no time for a cancellation: a subscription stops counting on the day Sumly first sees it cancelled or set not to renew.
  • Payment Pages take no field Sumly could carry the visitor in, so they are not traced.

Paystack questions

Can Sumly change anything in Paystack?

Not with a restricted key that only reads. A secret key could; Sumly never does.

Which scopes does the restricted key need?

Read on Transactions, Plans, Customers, Disputes & refunds and Balance, and on Subscriptions if Paystack lists it apart. Paystack's docs do not say which scope lists subscriptions; if the first read fails with 403, add the next read scope Paystack offers.

Do I need the webhook?

No. Sumly reads Paystack every 15 minutes either way. With the webhook, payments show up within seconds.

Does Sumly read test mode?

An rk_test_ or sk_test_ key reads test mode.

Why is the webhook not checked for a signature?

The address holds a secret of its own, and Sumly takes nothing from the call but which charge or subscription changed; it reads that again from Paystack with your key.

Other integrations

Try it with your own projects

Sign in with Google or a code by e-mail and connect your first project. Free for one project, and 14 days of a paid plan with no card.

Start free

Or look around first: open the live demo.