MenuConnect billing

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

ProviderFees come fromRefunds and chargebacksSubscriptions
StripeThe balance transaction fee, converted to the charge currencyRefunds; disputes as chargebacksYes
PaddleGrand total minus your earnings (Paddle's cut and tax)Refund and chargeback adjustmentsYes
Lemon SqueezyTax only; the platform fee is not exposed, so an estimate can be addedRefunded amount on orders and invoicesYes
PolarThe platform fee when Polar includes it, else 0 or your estimateRefunded amount on ordersYes
Dodo PaymentsTotal minus settlement when both are in one currency, else tax onlyRefunds; disputes as chargebacksYes
RazorpayThe fee on each payment, GST includedRefundsYes
CashfreeService charge (TDR) plus GST from the reconciliation ledger and charges webhookRefunds; chargebacksYes, from webhooks
PayUService fee plus GST when PayU reports it, else a 2.36% estimateRefundsNo: recurring charges are payments
ChargebeeNot available in Chargebee: 0 or your estimateRefund transactions and credit notesYes
ShopifyNot in the orders API: 0 or your estimateOrder refundsNo
WooCommerceNot in WooCommerce: an editable estimate, 2.9% + $0.30 to startRefunds on each orderNo
GumroadThe Gumroad fee on each saleRefund and chargeback flagsMemberships
CreemNot itemised: 0 or your estimateRefunds; disputes as chargebacksYes
Payments APIThe fee you sendPayments sent with kind: "refund" or "chargeback"Optional

Plan limits

PlanBilling connections per site
Free1
Starter1
GrowthUnlimited
ScaleUnlimited

The Payments API needs an API key, which is part of the Scale plan. See plans and limits.

What happens when you connect

  1. In your site, open Settings → Billing connections, choose the provider, fill in the fields and click Connect and import history.
  2. ProductLense makes one cheap authenticated read call to check the credentials. A wrong key fails here and nothing is saved.
  3. ProductLense imports the last 12 months: customers, subscriptions, payments and refunds. Progress shows on the connection card.
  4. The connection card shows the webhook URL for this connection. Add it in your provider so new payments arrive within seconds.
  5. Until webhooks arrive, ProductLense checks the provider for new payments and refunds every 2 minutes (see webhook status).
  6. 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.
  7. 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:

Text
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 showsMeaningNew payments arrive
Payments arrive instantly · last webhook 3 minutes agoA verified webhook arrived in the last 7 daysWithin seconds
No webhooks have arrived yetThe webhook URL is not set in the provider, or nothing has happened sinceWithin 2 minutes
Webhooks are being rejectedThe 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 storedWithin 2 minutes
No webhook for over 7 daysWebhooks worked before; check the URL is still setWithin 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.

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.

    ↑ ↓ to move, Enter to open