Lago
Lago is an open-source metering and usage-based billing platform designed for engineers and product teams that need flexible, event-driven billing infrastructure. Lago ingests real-time consumption events, aggregates usage into billable metrics, manages subscription plans and pricing models (flat-rate, tiered, volume, pay-as-you-go, and hybrid), and automatically generates invoices. It supports prepaid credits, coupons, add-ons, payment orchestration, and revenue analytics—making it a comprehensive alternative to Stripe Billing, Chargebee, or Recurly for companies with complex pricing logic. Lago is available as a self-hosted deployment or as Lago Cloud.

Power end-to-end data operations for your Lago API with Nexla. Our bi-directional Lago connector is purpose-built for Lago, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Lago or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Lago workflows fast, secure, and fully governed.
Features
Type: API
- Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
- Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
- API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
- Request optimization with intelligent batching, retry, and caching to minimize API calls and costs
Prerequisites
Lago uses API key authentication. All API requests must include a Bearer token in the Authorization header. Your API key is scoped with granular permissions that you configure in the Lago dashboard.
Lago Account and API Key Setup
To connect Nexla to Lago, you need a Lago account (either self-hosted or Lago Cloud) and an API key.
For Lago Cloud:
-
Sign in to your Lago Cloud account at app.getlago.com.
-
Navigate to Developers in the left sidebar, then select API keys.
-
Click the Add a key button to create a new API key.
-
Optionally, provide a descriptive name for the key (for example, "Nexla Integration") to identify its purpose later.
-
Configure the permissions for this API key. Lago supports granular per-object permissions:
-
Set each resource (customers, subscriptions, invoices, events, billable metrics, plans, etc.) to Read, Write, or Read & Write as needed for your integration.
-
For a data source integration (reading data into Nexla), granting Read access to the relevant resources is sufficient.
-
For a destination integration (writing data from Nexla to Lago), grant Write or Read & Write access to the resources you intend to update.
-
-
Click Save (or Create) to generate the API key.
Copy and securely store your API key immediately after creation. For security reasons, the full key value is only displayed once. If you lose access to it, you will need to rotate or delete the key and create a new one.
For Lago Self-Hosted:
-
Log in to your self-hosted Lago instance.
-
Navigate to Developers > API keys in the dashboard.
-
Click Add a key, optionally name it, configure permissions, and click Save.
-
Copy the generated API key and store it securely.
To rotate an existing API key, navigate to Developers > API keys and click the Rotate API key button. The previous key is immediately deactivated when a new key is generated. For additional details on API key management, see the Lago API Keys documentation.
Base URL
The API base URL depends on your deployment:
- US Cluster (Lago Cloud):
https://api.getlago.com/api/v1 - EU Cluster (Lago Cloud):
https://api.eu.getlago.com/api/v1 - Self-Hosted: Your own instance URL, typically
https://<your-domain>/api/v1
You will need this base URL when configuring data source and destination endpoints in Nexla.
Authenticate
Create a credential in Nexla
-
After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.
-
Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.
-
Enter your Lago API key in the API Key field. This key authenticates all requests Nexla makes to the Lago API and should be kept secure. Nexla will include it as a Bearer token in the
Authorizationheader of every API call.Your Lago API key is a sensitive credential. Do not share it publicly or include it in source code. Use Nexla's credential management to keep it secure.
-
Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.
Use as a data source
To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Lago connector tile, then select the credential that will be used to connect to the Lago instance, and click Next; or, create a new Lago credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Lago API endpoints. Each template is designed specifically for the corresponding Lago resource, making data source setup easy and efficient. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.
Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.
Manual configuration
Lago data sources can also be manually configured to ingest data from any valid Lago API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.
Append the resource path to the Lago base URL (see Prerequisites) — for example, /customers to list customers or /invoices to list invoices. Ensure your Lago API key has Read permission for the resource you are accessing.
Lago API responses wrap resource lists in a named array alongside pagination metadata, so specifying the path to data is essential — for example, $.customers[*] for List Customers, $.invoices[*] for List Invoices, $.subscriptions[*] for List Subscriptions, $.billable_metrics[*] for List Billable Metrics, $.plans[*] for List Plans, and $.events[*] for List Events. Use $.meta as the path to metadata to capture Lago's pagination details (total count, current page, next/previous page).
You do not need to include the Authorization header here — it is automatically applied from your Lago credential.
Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new Lago data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.
Use as a destination
Click the + icon on the Nexset that will be sent to the Lago destination, and select the Send to Destination option from the menu. Select the Lago connector from the list of available destination connectors, then select the credential that will be used to connect to the Lago organization, and click Next; or, create a new Lago credential for use in this flow.
Endpoint templates
Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Lago API endpoints. Each template is designed specifically for the corresponding Lago write operation, making destination setup easy and efficient. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.
Manual configuration
Lago destinations can also be manually configured to send data to any valid Lago API endpoint. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, attribute exclusions, record batching, and response webhooks.
Common methods for Lago destinations include POST (creating customers and subscriptions, or ingesting events), PUT (updating existing customers or subscriptions), and DELETE (terminating subscriptions or removing resources). The Lago API exclusively uses JSON for request bodies.
Append the resource path to the Lago base URL (see Prerequisites) — for example, /events to ingest usage events or /customers to create or update customers. For update/upsert operations, include the resource's external ID at the end of the URL (e.g., /customers/{'{external_customer_id}'}).
You do not need to include the Authorization or Content-Type headers — these are applied automatically. If batching records for Lago's batch events endpoint (POST /events/batch), use the Property Inside JSON Object grouping algorithm with a Property Name of events; a batch size of up to 100 events per call is recommended.
Save & activate
Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to the configured Lago endpoint, open the destination resource menu, and select Activate.
The Nexset data will not be sent to Lago until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.