MenuDuplicate payments

Troubleshooting

Duplicate payments

Why a payment can appear twice in ProductLense, how to find which connections reported it, and how to stop it happening again.

ProductLense stores each payment once per billing connection: a payment is identified by the connection it came from and the provider's payment id. Webhook retries, re-running a backfill and re-sending the same payment through the Payment API all update the existing row instead of adding another. A payment can only appear twice when two different connections report it.

Common causes

CauseWhat you seeFix
The same billing account is connected twice, for example two Stripe connections with different keys for one accountEvery payment from that account appears twiceKeep one connection and remove the other in Settings → Billing connections
A connector and the Payment API both report the same paymentPayments from that provider appear twice, one under the Payment API connectionSend through the Payment API only payments that no connector imports
Two providers see the same sale, for example a Shopify order paid through Shopify Payments, plus a Stripe connection on the account Shopify charges throughSome orders appear under both providersConnect the store you sell from, not the processor behind it
The same account is connected on two ProductLense sitesRevenue appears on both sitesExpected: each site reports the payments of its connections. Connect an account to the site whose visitors buy

Refunds and chargebacks are not duplicates: they are separate rows with their own kind, and they subtract from revenue. See Refunds, fees and currencies.

Find which connections reported it

  1. Open Settings → Billing connections. Each connection shows its provider, label and how many customers, subscriptions and payments it has imported.
  2. Look for two connections to the same provider account, or for a Payment API connection next to a connector, whose payment counts move together.
  3. To confirm, export the site (Settings → Export) and open payments.csv: duplicates share the same paid_at, amount and currency.

Clean up

  1. Open Settings → Billing connections and click Disconnect on the extra connection.
  2. The dialog shows how many payments that connection imported. Tick Also delete the N payments imported by this connection and confirm.

The connection and everything it imported (payments, subscriptions and customers) are deleted, so revenue for past dates is no longer doubled. Goal revenue in the dashboard is rebuilt for the affected days of the last 90 days; older goal revenue keeps the deleted payments, because the events needed to rebuild it have expired. Only owners and admins can do this, and it cannot be undone.

Without the tick, disconnecting keeps the imported payments and only stops new ones.

    ↑ ↓ to move, Enter to open