All docs

Revenue attribution

Each site connects its payment provider under Setup → Payments. The work is the same everywhere:

  1. Paste one API key. DataPenny creates the webhook at your provider and stores only its signing secret, encrypted. The key itself is never stored. Razorpay has no API for this, so it’s connected by hand.
  2. Make sure checkouts carry the visitor id. Payment links mostly do this by themselves.
  3. Import past sales, where your provider supports it.

Prefer to do it yourself? Each provider also has a Connect by hand option: add the webhook in your provider’s dashboard and paste its signing secret.

Providers

Provider Connect Payment links tagged Past-sales import
Stripe API key Yes Last 12 months
Dodo Payments API key Yes Last 12 months
Razorpay By hand Use order notes Last 12 months
Lemon Squeezy API key Yes Last 12 months
Polar API key Yes Last 12 months
Paddle API key Through Paddle.js No
Creem API key Yes No

Anything else can use the Payments API.

Server-created checkouts

When your server creates the checkout, it has to pass the visitor along. Read the id in the browser with datapenny.visitorId(), send it to your server, and put it in the checkout’s metadata as datapenny_visitor_id. datafast_visitor_id works too.

Your thank-you page

Send buyers back from checkout to a page that loads the script. DataPenny reads the id your provider puts in the URL, which links the sale even if metadata went missing. Keep those query parameters on the URL.

One payment account, several sites

If one provider account feeds several sites, each site can keep to its own sales:

  • For Dodo Payments, Polar, Lemon Squeezy, Paddle and Creem, list the site’s products under Only count these products.
  • Add datapenny_site_id to the checkout metadata. A site skips payments tagged for another site.
  • A site also skips a payment whose visitor is only known on another site.

Disconnecting

Disconnecting a provider stops accepting its webhooks and keeps the payments already recorded. Remove the webhook at your provider too.

Reporting currency

Revenue is net of tax and shown in one currency per site, converted with the daily ECB rate for the day of the sale. Change it under Setup → Reporting, and past sales are converted again.