{"_id":"@blackswampai/n8n-nodes-lago","_rev":"4-f1977b10ea723203e55cb88d989ca49d","name":"@blackswampai/n8n-nodes-lago","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@blackswampai/n8n-nodes-lago","version":"0.1.0","keywords":["n8n-community-node-package","n8n","lago","billing","usage-based-billing","metering","subscriptions","invoicing"],"author":{"name":"Christopher J. Nelson","email":"christopherjnelson@proton.me"},"license":"MIT","_id":"@blackswampai/n8n-nodes-lago@0.1.0","maintainers":[{"name":"christopherjnelson","email":"root@chris.guru"}],"homepage":"https://github.com/BlackSwampAI/n8n-nodes-lago#readme","bugs":{"url":"https://github.com/BlackSwampAI/n8n-nodes-lago/issues"},"n8n":{"nodes":["dist/nodes/Lago/Lago.node.js","dist/nodes/Lago/LagoTrigger.node.js"],"strict":true,"credentials":["dist/credentials/LagoApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"047a4a044a3f3d62cc3c3c027d06f9d0e379d606","tarball":"https://registry.npmjs.org/@blackswampai/n8n-nodes-lago/-/n8n-nodes-lago-0.1.0.tgz","fileCount":209,"integrity":"sha512-DrrpTVx5Un25YdbaSRzphuB/3Bhbzs/SIiQvgdNwUQFavQ5atGSkZEpUvh1BsiwWPA0WJex6Jl6C5vW8X/YjKA==","signatures":[{"sig":"MEYCIQDGkiHcmZj7difvxc6f3fdFG7PQa+g/mJgFWJFB3LXu0QIhAL7SzVI+eCLp1V4sS42d3O1gog3zQiFFetiCmRjiEZC6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackswampai%2fn8n-nodes-lago@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":408147},"engines":{"node":">=22.22.0"},"gitHead":"8336ee1003a05ec4deb57e13384dd1cd8174dd31","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","test":"vitest run","build":"n8n-node build","lago:up":"node scripts/lago-dev.mjs up","release":"n8n-node release","lint:fix":"n8n-node lint --fix","lago:down":"node scripts/lago-dev.mjs down","test:unit":"vitest run test/unit","typecheck":"tsc --noEmit -p tsconfig.test.json","test:watch":"vitest","build:watch":"tsc --watch","release:check":"node scripts/release-check.mjs","prepublishOnly":"n8n-node prerelease","test:integration":"vitest run test/integration","generate:webhook-events":"node scripts/generate-webhook-events.mjs"},"_npmUser":{"name":"christopherjnelson","email":"root@chris.guru"},"repository":{"url":"git+https://github.com/BlackSwampAI/n8n-nodes-lago.git","type":"git"},"_npmVersion":"11.17.0","description":"n8n community node for Lago: subscription billing, usage metering, invoicing, prepaid credits, and billing lifecycle events","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.32.0","vitest":"^3.2.7","prettier":"3.6.2","release-it":"20.2.0","typescript":"5.9.2","@n8n/node-cli":"0.42.2"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lago_0.1.0_1787308872537_0.995097471708803","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@blackswampai/n8n-nodes-lago","version":"0.1.1","keywords":["n8n-community-node-package","n8n","lago","billing","usage-based-billing","metering","subscriptions","invoicing"],"author":{"name":"Christopher J. Nelson","email":"christopherjnelson@proton.me"},"license":"MIT","_id":"@blackswampai/n8n-nodes-lago@0.1.1","maintainers":[{"name":"christopherjnelson","email":"root@chris.guru"}],"homepage":"https://blackswampai.com/n8n-nodes/lago/","bugs":{"url":"https://github.com/BlackSwampAI/n8n-nodes-lago/issues"},"n8n":{"nodes":["dist/nodes/Lago/Lago.node.js","dist/nodes/Lago/LagoTrigger.node.js"],"strict":true,"credentials":["dist/credentials/LagoApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"70c755ad8b2b445df83ff4cd9a48039f56602496","tarball":"https://registry.npmjs.org/@blackswampai/n8n-nodes-lago/-/n8n-nodes-lago-0.1.1.tgz","fileCount":209,"integrity":"sha512-Ln//7BD99TFdEA5LG5jIf+cvLF0i7EoIi14q8Sn1S4tohTBTElbZIaQTURa/mvFSqRTK6ID5Zg5Zf52ji3zXQw==","signatures":[{"sig":"MEUCIQDo2MIQTgKZf+EQQ3yHuredL1z1vDnKY7gzA5JJTDpwpQIgGS2rRywq7S/zWZvjCfr9KC2avNpl+VPzH+xZLQAVnoE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackswampai%2fn8n-nodes-lago@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":408839},"engines":{"node":">=22.22.0"},"gitHead":"89b0e873ff236808244d40f3f4049b3df4af23c6","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","test":"vitest run","build":"n8n-node build","lago:up":"node scripts/lago-dev.mjs up","release":"n8n-node release","lint:fix":"n8n-node lint --fix","lago:down":"node scripts/lago-dev.mjs down","test:unit":"vitest run test/unit","typecheck":"tsc --noEmit -p tsconfig.test.json","test:watch":"vitest","build:watch":"tsc --watch","release:check":"node scripts/release-check.mjs","prepublishOnly":"n8n-node prerelease","test:integration":"vitest run test/integration","generate:webhook-events":"node scripts/generate-webhook-events.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4089301c-ccea-40e3-84e2-f0acb36f187f"}},"repository":{"url":"git+https://github.com/BlackSwampAI/n8n-nodes-lago.git","type":"git"},"_npmVersion":"11.17.0","description":"n8n community node for Lago: subscription billing, usage metering, invoicing, prepaid credits, and billing lifecycle events","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"9.32.0","vitest":"^3.2.7","prettier":"3.6.2","release-it":"20.2.0","typescript":"5.9.2","@n8n/node-cli":"0.42.2"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lago_0.1.1_1787368807667_0.46577638319550996","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@blackswampai/n8n-nodes-lago","version":"0.1.2","keywords":["n8n-community-node-package","n8n","lago","billing","usage-based-billing","metering","subscriptions","invoicing"],"author":{"name":"Christopher J. Nelson","email":"christopherjnelson@proton.me"},"license":"MIT","_id":"@blackswampai/n8n-nodes-lago@0.1.2","maintainers":[{"name":"christopherjnelson","email":"root@chris.guru"}],"homepage":"https://blackswampai.com/n8n-nodes/lago/","bugs":{"url":"https://github.com/BlackSwampAI/n8n-nodes-lago/issues"},"n8n":{"nodes":["dist/nodes/Lago/Lago.node.js","dist/nodes/Lago/LagoTrigger.node.js"],"strict":true,"credentials":["dist/credentials/LagoApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"c8627eab26b3d8262853b59cc55646fc97131f89","tarball":"https://registry.npmjs.org/@blackswampai/n8n-nodes-lago/-/n8n-nodes-lago-0.1.2.tgz","fileCount":209,"integrity":"sha512-UZ32QL5B4JKQXVGxhb+gX7jSWRQnY1DhVe9tyeMf4L4aYVH8FmASvl6mi3ku6vBVx9k3VE4qyXg72tEgckE3mA==","signatures":[{"sig":"MEUCIEhRcDeB9sU5nRLO1XmNodey1O1MAA+rQT+SaV6Nt2C9AiEAtW/RY0LHD/eNOpbzEVvyEGnINs5lrpv7D9sbLl2x2Qg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCbAoUxMPoh1VgP1km/E7244u+uoiNQBZCvg58veTKwUAIgTnP5voIUm1CyKYSK3cVmq663AAI+qbTAz8Y+eaofg18=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackswampai%2fn8n-nodes-lago@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":410535},"engines":{"node":">=22.22.0"},"gitHead":"8fa5a08616c3aa99ab30d9e5b2a5b25a8e334bab","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","test":"vitest run","build":"n8n-node build","format":"prettier --write .","lago:up":"node scripts/lago-dev.mjs up","release":"n8n-node release","lint:fix":"n8n-node lint --fix","lago:down":"node scripts/lago-dev.mjs down","test:unit":"vitest run test/unit","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","smoke:load":"node scripts/node-load-smoke.mjs","test:watch":"vitest","build:watch":"tsc --watch","scan:source":"node scripts/scan-source.mjs","format:check":"prettier --check .","package:check":"node scripts/package-check.mjs","release:check":"node scripts/release-check.mjs","smoke:install":"node scripts/package-install-smoke.mjs","prepublishOnly":"n8n-node prerelease","scan:published":"node scripts/scan-published.mjs","test:integration":"vitest run test/integration","generate:webhook-events":"node scripts/generate-webhook-events.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4089301c-ccea-40e3-84e2-f0acb36f187f"}},"repository":{"url":"git+https://github.com/BlackSwampAI/n8n-nodes-lago.git","type":"git"},"_npmVersion":"11.19.0","description":"n8n community node for Lago: subscription billing, usage metering, invoicing, prepaid credits, and billing lifecycle events","directories":{},"_nodeVersion":"24.20.0","allowScripts":{"eslint-plugin-n8n-nodes-base":false},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@11.19.0","devDependencies":{"eslint":"9.32.0","vitest":"4.1.11","prettier":"3.6.2","release-it":"20.2.0","typescript":"5.9.2","@n8n/node-cli":"0.46.4","@n8n/scan-community-package":"0.34.0"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-lago_0.1.2_1788688909653_0.7855049545099904","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@blackswampai/n8n-nodes-lago@0.1.3","n8n":{"nodes":["dist/nodes/Lago/Lago.node.js","dist/nodes/Lago/LagoTrigger.node.js"],"strict":true,"credentials":["dist/credentials/LagoApi.credentials.js"],"n8nNodesApiVersion":1},"bugs":{"url":"https://github.com/BlackSwampAI/n8n-nodes-lago/issues"},"dist":{"shasum":"980352d9b6c81728696fea02a8c0fb4961be8426","tarball":"https://registry.npmjs.org/@blackswampai/n8n-nodes-lago/-/n8n-nodes-lago-0.1.3.tgz","fileCount":209,"integrity":"sha512-oKTUo2xT7dzk6L5X+s1Askd82LOaqRsH9bOYdJV23RO3c3DYTtUw+e65uYqaF9ceRiGAj+VhIZd+eqdscmpItw==","signatures":[{"sig":"MEYCIQDCvXkkXeHoLNacG5ZCjuEsbvYL+93kJFF12T4ossJHKgIhAKbT7TuqZoJiifVlb5zUN/0OsWkSW1RXqIYr3xuQLQ1y","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB6q4VtenIInLECAOusHROKL+BsciFheQMX86/vc+y3zAiAi6mZDB09+ZEaIA+jJ5vHisLWCmqrs1zphkASOQXb9yg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackswampai%2fn8n-nodes-lago@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":410092},"name":"@blackswampai/n8n-nodes-lago","author":{"name":"Christopher J. Nelson","email":"christopherjnelson@proton.me"},"engines":{"node":">=22.22.0"},"gitHead":"7f21e16aea90fa6834c561016cedca83c940034f","license":"MIT","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","test":"vitest run","build":"n8n-node build","format":"prettier --write .","lago:up":"node scripts/lago-dev.mjs up","release":"n8n-node release","lint:fix":"n8n-node lint --fix","lago:down":"node scripts/lago-dev.mjs down","test:unit":"vitest run test/unit","typecheck":"tsc --noEmit && tsc --noEmit -p tsconfig.test.json","smoke:load":"node scripts/node-load-smoke.mjs","test:watch":"vitest","build:watch":"tsc --watch","scan:source":"node scripts/scan-source.mjs","format:check":"prettier --check .","package:check":"node scripts/package-check.mjs","release:check":"node scripts/release-check.mjs","smoke:install":"node scripts/package-install-smoke.mjs","prepublishOnly":"n8n-node prerelease","scan:published":"node scripts/scan-published.mjs","test:integration":"vitest run test/integration","generate:webhook-events":"node scripts/generate-webhook-events.mjs"},"version":"0.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4089301c-ccea-40e3-84e2-f0acb36f187f"}},"homepage":"https://blackswampai.com/n8n-nodes/lago/","keywords":["n8n-community-node-package","n8n","lago","billing","usage-based-billing","metering","subscriptions","invoicing"],"repository":{"url":"git+https://github.com/BlackSwampAI/n8n-nodes-lago.git","type":"git"},"_npmVersion":"11.19.0","description":"n8n community node for Lago: subscription billing, usage metering, invoicing, prepaid credits, and billing lifecycle events","directories":{},"maintainers":[{"name":"christopherjnelson","email":"root@chris.guru"}],"_nodeVersion":"24.20.0","allowScripts":{"eslint-plugin-n8n-nodes-base":false},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@11.19.0","devDependencies":{"eslint":"9.39.4","vitest":"4.1.11","prettier":"3.8.3","release-it":"20.2.0","typescript":"5.9.3","@n8n/node-cli":"0.46.4","@n8n/scan-community-package":"0.34.0"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-lago_0.1.3_1788895536385_0.32880791328453096"}}},"time":{"created":"2026-08-21T10:41:12.302Z","modified":"2026-09-08T19:25:36.840Z","0.1.0":"2026-08-21T10:41:12.708Z","0.1.1":"2026-08-22T03:20:07.864Z","0.1.2":"2026-09-06T10:01:49.754Z","0.1.3":"2026-09-08T19:25:36.493Z"},"bugs":{"url":"https://github.com/BlackSwampAI/n8n-nodes-lago/issues"},"author":{"name":"Christopher J. Nelson","email":"christopherjnelson@proton.me"},"license":"MIT","homepage":"https://blackswampai.com/n8n-nodes/lago/","keywords":["n8n-community-node-package","n8n","lago","billing","usage-based-billing","metering","subscriptions","invoicing"],"repository":{"url":"git+https://github.com/BlackSwampAI/n8n-nodes-lago.git","type":"git"},"description":"n8n community node for Lago: subscription billing, usage metering, invoicing, prepaid credits, and billing lifecycle events","maintainers":[{"name":"christopherjnelson","email":"root@chris.guru"}],"readme":"# @blackswampai/n8n-nodes-lago\n\n[![npm version](https://img.shields.io/npm/v/%40blackswampai%2Fn8n-nodes-lago)](https://www.npmjs.com/package/@blackswampai/n8n-nodes-lago)\n[![CI](https://github.com/BlackSwampAI/n8n-nodes-lago/actions/workflows/ci.yml/badge.svg)](https://github.com/BlackSwampAI/n8n-nodes-lago/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE.md)\n\n[Installation](#installation) · [Operations](#operations) · [Credentials](#credentials) · [Compatibility](#compatibility) · [Usage](#usage) · [Troubleshooting](#troubleshooting) · [Resources](#resources) · [Black Swamp AI](https://blackswampai.com/n8n-nodes/lago/)\n\nThis is an n8n community node. It lets you use [Lago](https://www.getlago.com/) in your n8n workflows.\n\nLago is an open-source billing and metering platform for subscription, usage-based, and hybrid pricing. It turns raw usage events into invoices, and covers plans, prepaid credit wallets, coupons, credit notes, and the billing lifecycle around them.\n\n> This is an independent community integration and is not affiliated with, endorsed by,\n> sponsored by, or maintained by Lago. The Lago name and logo belong to their respective owners\n> and are used only to identify compatibility.\n\n[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.\n\n## Installation\n\nLago is a community package that is not currently available through verified-node discovery. On a\nself-hosted n8n instance, open **Settings → Community Nodes**, select **Install**, and enter this exact\npackage name:\n\n```\n@blackswampai/n8n-nodes-lago\n```\n\nSee n8n's\n[GUI installation guide](https://docs.n8n.io/integrations/community-nodes/installation-and-management/gui-installation/)\nfor the current self-hosted community-node requirements. As an advanced self-hosted\nadministrator fallback, install the package in the n8n environment:\n\n```sh\nnpm install @blackswampai/n8n-nodes-lago\n```\n\nPublished from GitHub Actions with an [SLSA provenance attestation](https://slsa.dev/provenance/v1),\nso the package can be traced to the repository and commit it was built from:\n\n```sh\nnpm view @blackswampai/n8n-nodes-lago dist.attestations\n```\n\n## Operations\n\nThe **Lago** node currently supports:\n\n| Resource           | Operations                                                                                       |\n| ------------------ | ------------------------------------------------------------------------------------------------ |\n| Billable Metric    | Create, Get, Get Many, Update, Delete, Evaluate Expression                                       |\n| Coupon             | Create, Get, Get Many, Update, Delete, Apply to Customer, Get Many Applied, Remove from Customer |\n| Credit Note        | Create, Estimate, Get, Get Many, Download, Void                                                  |\n| Customer           | Create or Update, Get, Get Many, Delete                                                          |\n| Event              | Send, Send Batch, Get, Get Many, Estimate Fees                                                   |\n| Invoice            | Create One-Off, Get, Get Many, Update, Finalize, Void, Download, Retry Payment                   |\n| Plan               | Create, Get, Get Many, Update, Delete                                                            |\n| Plan Charge        | Create, Get, Get Many, Update, Delete                                                            |\n| Subscription       | Create, Get, Get Many, Update, Terminate                                                         |\n| Wallet             | Create, Get, Get Many, Update, Terminate                                                         |\n| Wallet Transaction | Create, Get Many                                                                                 |\n| Webhook Endpoint   | Create, Get, Get Many, Update, Delete                                                            |\n\nThe **Lago Trigger** node starts a workflow when Lago sends a billing event. It registers a\nwebhook endpoint in Lago when the workflow is activated, reusing an existing one for the same URL\nrather than adding another, and removes it on deactivation. Every delivery is verified before the\nworkflow runs — with JWT by default, whose key is fetched automatically, or HMAC using the key\nset on the credential. Lago retries a delivery up to three times, so repeats are recognised by\ntheir delivery key and skipped.\n\nWebhook endpoints register where Lago sends events. Event names are **dotted**\n(`invoice.created`), not underscored as the OpenAPI specification shows them, and the node\noffers the catalogue from the Lago version it targets so a selection cannot be rejected. An\norganization may have at most ten endpoints.\n\nPrepaid credit wallets distinguish **paid** credits from **granted** credits: granted credits\nsettle immediately, while paid credits are recorded as a pending transaction until the top-up\ninvoice is paid, so they do not appear in the balance straight away. One top-up request can\ntherefore return more than one transaction. Wallets are **terminated, not deleted**.\n\nAutomatic recurring and threshold top-ups are **not exposed**: Lago answers HTTP 500 on the free\nedition rather than refusing cleanly, so offering the field would make the node look broken.\n\nCredit note **Create** and **Estimate** require a Lago premium licence and are marked as such;\nreading, downloading and voiding credit notes works on the free edition. Lago answers 403 for a\npremium gate as well as for a rejected key, so the node distinguishes them and reports a licence\nproblem rather than sending you to check a working credential.\n\nInvoices do not follow ordinary CRUD. A one-off invoice is issued **already finalized**, so\nthere is no draft to finalize afterwards; finalizing an invoice that is already finalized is\nreported by Lago as _not found_. Voiding keeps the record with a `voided` status. Download\nrenders the PDF asynchronously, so `file_url` may still be empty on the first call. Invoice\nrefresh and draft invoices both require a Lago premium licence.\n\nUsage events are the metering half of the integration. The **Billable Metric Code** is chosen\nfrom the metrics defined in Lago rather than typed, because Lago accepts an event whose code\nmatches no active metric, stores it, and then never bills it — there is no error to notice.\nEvents are also aggregated asynchronously, so usage does not reflect a send immediately, and\nLago deduplicates on the transaction ID, which the node derives from the execution so an n8n\nretry cannot double-bill.\n\nSubscriptions are **terminated, not deleted** — the record is kept with a `terminated` status.\nNote that Get Many returns only `active` subscriptions unless a status filter is set, and that a\nterminated subscription reports as not found by Get while still appearing in Get Many. Sending\nCreate again with the same external ID and a different plan performs an **upgrade or downgrade**:\nan upgrade replaces the subscription immediately, while a downgrade is queued as `pending` until\nthe period ends.\n\nPlan charges price a billable metric on a plan, and every charge model — standard, package,\npercentage, graduated, volume and dynamic — is offered as real fields rather than raw JSON.\nCharge amounts are **decimal strings** (`\"0.01\"`), unlike plan amounts; Lago rejects a plain\nnumber. Graduated Percentage requires a Lago premium licence.\n\nPlan amounts are in the currency's **smallest unit** — `10000` is 100.00, not 10000.00. Plan\ndeletion is processed asynchronously, so a deleted plan stays readable for a moment afterwards.\n\nBillable metric **expressions** address event properties as `event.properties.<key>` and the\nevent time as `event.timestamp`. The **Evaluate Expression** operation checks one against a\nsample event, so a metering expression can be validated before any usage depends on it.\n\nCustomer has no update endpoint in the Lago API — `POST /customers` upserts on the external ID — so the node exposes a single **Create or Update** operation rather than implying semantics the API does not have.\n\nThe **Lago Trigger** node covers the full event catalogue — customers, subscriptions, invoices, payments, wallets, plans, billable metrics, credit notes, fees and alerts.\n\n## Credentials\n\nYou need a Lago API key. Either:\n\n- **Lago Cloud** — sign up at [getlago.com](https://www.getlago.com/) and copy the API key from your account settings, or\n- **Self-hosted** — [deploy Lago](https://docs.getlago.com/guide/lago-self-hosted/overview) with Docker Compose or the official Helm charts, then take the API key from your instance.\n\nThe credential takes a **Base URL** and an **API Key**. Self-hosted instances are a first-class target: set the Base URL to your own instance instead of the default.\n\n| Deployment      | Base URL                     |\n| --------------- | ---------------------------- |\n| Lago Cloud (US) | `https://api.getlago.com`    |\n| Lago Cloud (EU) | `https://api.eu.getlago.com` |\n| Self-hosted     | your instance URL            |\n\nLago authenticates with a bearer token, and the credential test verifies that the Base URL is reachable and the API key is accepted.\n\n### Webhook signatures\n\nThe Lago Trigger verifies every delivery before it starts a workflow. Lago signs webhooks with either **JWT** (RS256) or **HMAC** (SHA-256), chosen per webhook endpoint.\n\nJWT is the default and needs no extra configuration: the node fetches Lago's public key using the API key it already has. HMAC uses an organization-level key that the REST API does not expose, so you must copy it from the Lago dashboard into the credential yourself.\n\n## Compatibility\n\nRequires n8n 1.x and Node.js 22.22.0 or later. Tested against the free self-hosted edition of Lago and Lago Cloud.\n\nSome Lago functionality is premium-only, including per-subscription charge and fixed-charge overrides. The node does not require a premium license, and operations that depend on one are marked in the node UI.\n\n## Usage\n\nLago's core loop is: define a **billable metric**, attach it to a **plan** as a charge, subscribe a **customer** to that plan, then send **usage events** as your product is consumed. Lago aggregates the events and generates invoices.\n\nA typical usage-metering workflow sends one event per unit of consumption:\n\n```\nYour app  ->  n8n  ->  Lago: Event: Send\n                        external_subscription_id: acme-prod\n                        code: ai_tokens\n                        properties: { tokens: 143217, model: example-model }\n```\n\nEvent sending is idempotent on the transaction ID, and Lago deduplicates on it, so retries never double-bill. The node defaults the transaction ID from the n8n execution, which makes ordinary n8n retries safe without any configuration.\n\n## Resources\n\n- [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)\n- [Lago documentation](https://docs.getlago.com/)\n- [Lago API reference](https://docs.getlago.com/api-reference/intro)\n- [Lago webhook reference](https://docs.getlago.com/api-reference/webhooks/format---signature)\n- [Changelog](CHANGELOG.md)\n- [Black Swamp AI package page](https://blackswampai.com/n8n-nodes/lago/)\n\n## Troubleshooting\n\n- If installation fails, confirm the instance is self-hosted, community nodes are enabled, and the\n  exact scoped package name was entered.\n- If credentials fail, verify the Lago API base URL and API key for the same Lago environment.\n- Lago processes some billing actions asynchronously; a successful request may precede an updated\n  balance, generated PDF, or completed deletion.\n- Never include API keys, webhook signing material, or complete payloads in an issue.\n\n## Release provenance\n\nReleases are published from the tag-only GitHub Actions workflow with npm provenance. The\nrepository tag, package version, packed contents, and official n8n source scan are checked before\npublication; the published package is scanned again after registry propagation.\n\n## License\n\n[MIT](LICENSE.md)\n","readmeFilename":"README.md"}