Revenue from Easytools
View as MarkdownCount sales made with Easytools (Easytool) checkouts in Reveata and credit them to visits by email.
On this page
Easytools (opens in a new tab) (often called Easytool) sells digital products and subscriptions through hosted checkout pages, and charges through the Stripe account you connected to it. Reveata has no Easytools integration, and an Easytools checkout can’t carry the Reveata visitor id. Sales still reach Reveata, and are credited to visits by the buyer’s email. This page shows how to get them in, and how to link them to visits.
Before you start
Install the Reveata snippet on the site that sends people to your checkouts (your website or landing pages), so their visits are counted. The install guides cover each platform. Easytools’ checkout pages are hosted by Easytools and don’t run the Reveata snippet.
Route 1: connect the Stripe account behind Easytools
Easytools charges through your own Stripe account (in Easytools, Store settings shows which one is connected). Connect the same account in Reveata: open your website’s Settings → Payments, choose Stripe, and use a restricted key or Connect with Stripe.
Reveata imports the last 12 months, then new payments within seconds. Subscription renewals count as renewals, and refunds are subtracted. Everything else that Stripe account takes is imported too, so this works best when it is only used for Easytools.
Route 2: send each sale with the Payments API
If you’d rather not connect Stripe, forward Easytools’ webhooks to the Payments API. In Easytools, open Store settings → API & Webhooks and add the address of a server function you control, for the events single_product_bought, subscription_created and subscription_renewed.
A minimal handler (Node.js 18 or later, any framework):
// Receives an Easytools webhook (JSON) and records the sale in Reveata.
export async function handleEasytoolsWebhook(event) {
const kinds = { single_product_bought: 'new', subscription_created: 'new', subscription_renewed: 'renewal' };
const type = kinds[event.event];
if (!type) return; // other events are not payments
const d = event; // Easytools sends the fields at the top level
await fetch('https://reveata.com/api/v1/payments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.REVEATA_SITE_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
transactionId: `easytools_${d.order_id}`, // unique per sale: retries are then safe
amount: Number(d.amount_paid), // the amount collected, in major units, e.g. 49
currency: String(d.currency).toUpperCase(), // Easytools sends lower case, e.g. "usd"
email: d.customer_email,
type,
}),
});
}Create the website API key (dt_site_…) in Reveata under Settings → Developer, and keep it on the server. The field names come from Easytools’ list of webhook events (opens in a new tab): each event is a flat JSON object with event, order_id, amount_paid, currency and customer_email. amount_paid is what the buyer paid; Reveata expects amounts without tax, so if you charge VAT on top, send the amount before tax. Compare one test delivery with the order in Easytools before you go live. Verify the webhook signature with the signing key Easytools gives you, so nobody else can post sales to your function.
Pick one route. If you connect Stripe and also send the same sales through the API, they are two different payments to Reveata and are counted twice.
Credit sales to visits
Both routes give Reveata the buyer’s email. A sale is credited to a visit when that email belongs to a visitor you identified on your site, typically when they join your list or start a trial:
<script>
document.addEventListener('submit', function (e) {
var input = e.target.querySelector('input[type="email"]');
var email = input && input.value.trim().toLowerCase();
if (email && window.reveata) window.reveata('identify', { userId: email, email: email });
});
</script>- The sale is credited to that visitor’s visits under your attribution model, including the visit that first brought them.
- A sale that arrives before the person is identified is retried every hour for 90 days.
- This uses Match payments using browser identify calls in Settings → Payments, on by default.
If buyers land on a thank-you page on your own site after checkout, call reveata('payment', { email }) there when the page knows the email: see Thank-you page payments. Only identify people when your privacy policy covers it: see Identify visitors.
Check it works
- Open your site in a private window from a link ending in
?ref=test, and submit your signup form. - Buy a cheap product through your Easytools checkout with the same email, and refund it afterwards if you like.
- The sale appears in Reveata under Revenue. Once it is matched (within the hour), its source is
test.
Common pitfalls
- A different email at checkout. If the buyer pays with another email than the one they gave on your site, the sale counts as revenue but stays unattributed.
- Counting sales twice. Use the Stripe account or webhooks, not both.
- Test mode. Payments made in Stripe’s test mode are not imported from a live connection.
- Tax included. If your prices add VAT, revenue in Reveata is higher than your net sales until the handler sends amounts before tax.