Data

Custom reports, data warehouse sync, and external data import on VINR.

View as MarkdownInstall skills

VINR data tools give your analytics and finance teams access to the raw transaction data behind the prebuilt reports. Write custom SQL queries, sync to your data warehouse, or import external data to create a unified view of your business.

Custom reportsAsk

Write SQL queries directly against your VINR data to build reports tailored to your business. Custom reports use standard ANSI SQL and run against the same schema that powers the VINR Dashboard.

-- Monthly recurring revenue by plan
SELECT
  p.name                         AS plan,
  DATE_TRUNC('month', s.created) AS month,
  SUM(i.amount_paid) / 100.0    AS mrr_eur
FROM subscriptions s
JOIN invoices  i  ON i.subscription_id = s.id
JOIN prices    pr ON pr.id = s.price_id
JOIN products  p  ON p.id  = pr.product_id
WHERE i.status = 'paid'
  AND i.created >= '2026-01-01'
GROUP BY 1, 2
ORDER BY 2 DESC, 3 DESC;

Queries return results in the Dashboard or can be exported as CSV. Save frequently-used queries and share them with your team.

Schema reference

The VINR data schema mirrors the API object model. Key tables:

TableDescription
paymentsAll payment intents and outcomes.
subscriptionsActive and cancelled subscriptions.
invoicesFinalized invoices with line items.
customersCustomer records and metadata.
payoutsPayout batches and settlement details.
refundsRefund records linked to payments.
disputesChargebacks and resolution outcomes.
revenue_recognitionRecognized and deferred amounts per line item.

Data warehouse syncAsk

Export your complete VINR dataset to your data warehouse on a continuous or scheduled basis. VINR supports direct connectors to:

DestinationSync mode
SnowflakeContinuous (near real-time) or daily batch
Amazon RedshiftDaily batch
Google BigQueryContinuous or daily batch
DatabricksDaily batch
import { Vinr } from '@vinr/sdk';
const vinr = new Vinr({ secretKey: process.env.VINR_SECRET_KEY });

await vinr.dataPipeline.sync.configure({
  destination: {
    type: 'snowflake',
    connectionString: process.env.SNOWFLAKE_CONNECTION_STRING,
    schema: 'vinr_prod',
  },
  tables: ['payments', 'subscriptions', 'invoices', 'customers'],
  frequency: 'continuous',
});

Data warehouse sync includes a full historical backfill for all data in your VINR account, not just activity from the sync start date.

Cloud storage export

For teams without a data warehouse, export to cloud storage and load from there.

StorageFormats
Amazon S3CSV, JSON, Parquet
Google Cloud StorageCSV, JSON, Parquet
Azure Blob StorageCSV, JSON

Import external dataAsk

Bring data from outside VINR into your reports for a unified view. External imports let you cross-reference VINR transactions with data from other platforms.

Supported connectors

ConnectorWhat it imports
Amazon S3Any CSV or JSON data you upload to a bucket
Apple App StoreIn-app purchase and subscription events
Google Play StoreIn-app purchase and subscription events
await vinr.dataImport.connectors.create({
  type: 'apple_app_store',
  credentials: {
    vendorId: process.env.APPLE_VENDOR_ID,
    privateKeyId: process.env.APPLE_KEY_ID,
    privateKey: process.env.APPLE_PRIVATE_KEY,
  },
  syncFrequency: 'daily',
});

Once connected, App Store and Play Store subscription events appear alongside VINR billing data in custom reports, so you can analyze total subscription revenue across all channels in a single query.

Next stepsAsk

Was this page helpful?
Edit on GitHub

Last updated on

On this page