Revenue
Connect payment data and attribute revenue to sessions, sources, pages, and keywords.
Revenue is the main Talivia difference. The goal is not only to count visits, but to show which sessions, sources, pages, campaigns, and search queries produced money.
Revenue sources
Talivia can receive revenue from:
- Stripe provider sync.
- Stripe checkout return URL detection.
- Manual Payment API.
- Payment metadata passed from your backend.
Stripe
Open Settings -> Payments, create a restricted Stripe API key from the provided link, and paste it into Talivia. Talivia imports payment data and configures the webhook.
For best attribution, pass Talivia session context when creating Checkout:
const talivia = window.talivia?.getSession?.();
await fetch('/api/create-checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ talivia }),
});On your server, attach the values to Checkout metadata:
await stripe.checkout.sessions.create({
mode: 'payment',
success_url: 'https://your-site.com/thanks?session_id={CHECKOUT_SESSION_ID}',
metadata: {
talivia_visitor_key: talivia?.visitorKey,
talivia_session_key: talivia?.sessionKey,
talivia_session_id: talivia?.sessionId,
},
client_reference_id: talivia?.visitorKey,
});Manual Payment API
Use the Manual Payment API when you process payments outside a connected provider.
await fetch('https://talivia.com/api/payments/manual', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-talivia-api-key': process.env.TALIVIA_API_KEY,
},
body: JSON.stringify({
websiteId: 'YOUR_WEBSITE_ID',
transactionId: 'order_123',
amount: 49,
currency: 'USD',
visitorKey: talivia?.visitorKey,
sessionKey: talivia?.sessionKey,
sessionId: talivia?.sessionId,
}),
});Refunds
Refunds are shown as reversed revenue in charts. Talivia keeps the original paid context visible so you can see the money that would have counted and the amount refunded.