Setup steps

  1. In ProductLense, open Settings → API keys and create a key with the payments scope.
  2. From your server, POST each payment to https://api.productlense.app/api/v1/payments with the key as a Bearer token.
  3. Send refunds as their own payment with kind "refund".
  4. Re-sending the same payment_id updates the existing row, so retries are safe.

Credentials and permissions

Credentials ProductLense asks for
FieldSecretWhere to find it
API keyYes, encrypted at restAn mk_live_... key with the payments scope, created in Settings → API keys (Scale plan).

Authentication

Bearer API key with the payments scope; keys are stored as SHA-256 hashes.

What ProductLense reads

Customers
The customer object you send: id, email, user_id, name.
Subscriptions
An optional subscription object: id, plan, interval, status.
Payments
Each payment you POST to /api/v1/payments.
Refunds
Payments you send with kind "refund".
Fees
The fee you supply on each payment.

What ProductLense never touches

  • Never creates, changes, refunds or cancels anything: read-only API calls and incoming webhooks only.
  • Never moves money, issues payouts, or reads bank account details.
  • Never sees full card numbers; providers do not expose them.
  • Never sends your customer data to the AI model: Ask and the daily insight see aggregates only.

Match payments to your users

Use this for invoices paid by bank transfer, app store revenue exported by a script, or any provider not listed here.

server: send a payment
curl -X POST https://api.productlense.app/api/v1/payments \
  -H "Authorization: Bearer mk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"payment_id":"inv_1","customer":{"id":"cus_1","email":"a@b.com","user_id":"user_123"},"amount":29.00,"currency":"USD","fee":1.15,"kind":"charge","paid_at":"2026-10-11T10:00:00Z"}'

Payment API and ProductLense: questions

Does ProductLense work with Payment API?
Yes. ProductLense connects to Payment API with aPI key, backfills 12 months of history, and stays current through your API calls plus a nightly reconcile. One connection is included on Starter; Growth and Scale allow every provider at once on the same site.
What data does ProductLense read from Payment API?
Customers, subscriptions, payments, refunds and fees, read-only. Payments: each payment you POST to /api/v1/payments. Refunds: payments you send with kind "refund". Fees: the fee you supply on each payment.
Can ProductLense change anything in my Payment API account?
No. ProductLense only makes read calls and receives webhooks. It never creates, changes, refunds or cancels anything, never moves money, and never sees card numbers. Credentials are encrypted at rest, and the AI features only ever see aggregated numbers, never your customers’ data.
How does ProductLense match Payment API payments to visitors?
Use this for invoices paid by bank transfer, app store revenue exported by a script, or any provider not listed here. Your site calls identify with the same user id after signup, and ProductLense follows the payment to that visitor’s first touch: source, medium, campaign and landing page.
Are Payment API fees subtracted from revenue?
The fee you supply on each payment. Net revenue is the charge minus the fee; refunds subtract the refunded amount and its fee. Profit per channel then subtracts ad spend.

Connect Payment API and see revenue by channel today.

Add the script, connect Stripe or any of 14 other billing providers, and see revenue by channel the same day.