Revenue attribution
Connect billing
Connect your payment provider so ProductLense can attribute every charge, refund and fee to the channel that brought the customer.
A billing connection gives ProductLense read access to your payment provider. ProductLense imports customers, subscriptions, charges, refunds and fees, converts every amount to USD, and attributes each payment to the first touch of the visitor who became that customer. ProductLense never writes to your billing account: it does not create, change, refund or cancel anything, and it never moves money.
Supported providers
| Provider | Fees come from | Refunds and chargebacks | Subscriptions |
|---|---|---|---|
| Stripe | The balance transaction fee, converted to the charge currency | Refunds; disputes as chargebacks | Yes |
| Paddle | Grand total minus your earnings (Paddle's cut and tax) | Refund and chargeback adjustments | Yes |
| Lemon Squeezy | Tax only; the platform fee is not exposed, so an estimate can be added | Refunded amount on orders and invoices | Yes |
| Polar | The platform fee when Polar includes it, else 0 or your estimate | Refunded amount on orders | Yes |
| Dodo Payments | Total minus settlement when both are in one currency, else tax only | Refunds; disputes as chargebacks | Yes |
| Razorpay | The fee on each payment, GST included | Refunds | Yes |
| Cashfree | Service charge (TDR) plus GST from the reconciliation ledger and charges webhook | Refunds; chargebacks | Yes, from webhooks |
| PayU | Service fee plus GST when PayU reports it, else a 2.36% estimate | Refunds | No: recurring charges are payments |
| Chargebee | Not available in Chargebee: 0 or your estimate | Refund transactions and credit notes | Yes |
| Shopify | Not in the orders API: 0 or your estimate | Order refunds | No |
| WooCommerce | Not in WooCommerce: an editable estimate, 2.9% + $0.30 to start | Refunds on each order | No |
| Gumroad | The Gumroad fee on each sale | Refund and chargeback flags | Memberships |
| Creem | Not itemised: 0 or your estimate | Refunds; disputes as chargebacks | Yes |
| Payments API | The fee you send | Payments sent with kind: "refund" or "chargeback" | Optional |
Plan limits
| Plan | Billing connections per site |
|---|---|
| Free | 1 |
| Starter | 1 |
| Growth | Unlimited |
| Scale | Unlimited |
The Payments API needs an API key, which is part of the Scale plan. See plans and limits.
What happens when you connect
- In your site, open Settings → Billing connections, choose the provider, fill in the fields and click Connect and import history.
- ProductLense makes one cheap authenticated read call to check the credentials. A wrong key fails here and nothing is saved.
- ProductLense imports the last 12 months: customers, subscriptions, payments and refunds. Progress shows on the connection card.
- The connection card shows the webhook URL for this connection. Add it in your provider so new payments arrive within seconds.
- Until webhooks arrive, ProductLense checks the provider for new payments and refunds every 2 minutes (see webhook status).
- Every night at 03:00 UTC ProductLense reconciles each connection from its last sync minus 48 hours, so anything missed is picked up the next day.
- Every day at 04:00 UTC ProductLense retries attribution for unattributed payments from the last 90 days, so a customer who identifies after paying is still credited to the right channel.
The webhook URL has this shape, and ProductLense shows the exact value with your connection id after you save:
https://api.productlense.app/api/webhooks/<provider>/<connection-id>Every webhook is verified (signature, HMAC or basic auth, depending on the provider) before anything is read from it, and each delivery is processed once by its event id.
Webhook status
Each connection card in Settings → Billing connections shows whether the provider's webhooks reach ProductLense:
| Card shows | Meaning | New payments arrive |
|---|---|---|
| Payments arrive instantly · last webhook 3 minutes ago | A verified webhook arrived in the last 7 days | Within seconds |
| No webhooks have arrived yet | The webhook URL is not set in the provider, or nothing has happened since | Within 2 minutes |
| Webhooks are being rejected | The last delivery failed: the signature did not match the saved webhook secret, it was sent to a URL for another connection, or it could not be stored | Within 2 minutes |
| No webhook for over 7 days | Webhooks worked before; check the URL is still set | Within 2 minutes |
While webhooks are not live, ProductLense lists only the payments and refunds created since its last check, every 2 minutes, and stores the new ones exactly as a webhook would: same USD conversion, attribution and alerts, each payment once. With live webhooks it still checks every 15 minutes, to catch a delivery the provider dropped. Subscription changes still need webhooks or the nightly reconcile.
The 2-minute check covers Stripe, Paddle, Dodo Payments, Razorpay, Chargebee, Shopify, Gumroad, Cashfree, PayU and WooCommerce. Polar, Creem, Lemon Squeezy and RevenueCat cannot list recent payments on their own, so without webhooks their new payments arrive with the nightly reconcile. Refunds of older Shopify and WooCommerce orders, and PayU refunds, also arrive by webhook or the nightly reconcile.
If a check fails (for example, the provider rejected the credentials), the card shows the error and ProductLense tries again in 10 minutes. The connection stays connected.
What ProductLense stores and never does
- Credentials are encrypted at rest with AES-256-GCM and never appear in logs or error messages.
- ProductLense only makes read calls to the provider's API. It never creates, changes, refunds or cancels anything, never moves money, and never sees full card numbers.
- Amounts keep their original currency and are converted to USD at the European Central Bank reference rate for the payment's day. See refunds, fees and currencies.
Link payments to visitors
Attribution needs a link between the paying customer and a visitor. The strongest link is your own user id: call identify with it on your site, and store the same id on the customer in your billing provider (each provider page names the field). See how payments are attributed and identify users.
Estimated fees
Some providers do not report what they kept. For those, a connection can carry a fee estimate (Processor fees on the connection card: a percent, a fixed amount per payment and its currency). The estimate is applied only to charges that arrive with a zero fee, those payments are flagged as estimated, and the dashboard shows what share of fees in a period is estimated. An estimate is only as accurate as the rate you enter.