Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.
PREMIUM ADD-ON ✨This integration is available upon request only. Please contact us to get access to this premium integration.
Lago handles usage-based billing: it meters usage, applies plans and coupons, and produces invoices. NetSuite is where your finance team does accounting. This integration keeps the two in sync automatically, so invoices, credit notes, and payments created in Lago appear in NetSuite as real, tax-accurate transactions with no manual re-entry.It runs as a Lago bundle you install into your NetSuite account. A bundle (or SuiteBundle) is a packaged set of customizations you install in one step. You then configure everything from a single Lago Configuration record inside NetSuite. There is no script to paste and no mapping to maintain in Lago.
Lago maintains this integration internally using SuiteCloud Development Framework (SDF). You don’t interact with SDF: everything you need ships in the bundle.
Data flows from Lago into NetSuite along three paths:
Documents. When Lago finalizes an invoice or issues a credit note, it calls the bundle’s RESTlet (a server-side script that exposes a secure URL) to create a NetSuite Invoice or Credit Memo in real time.
Payments. When a payment is recorded in Lago, it’s pushed to the RESTlet and created as a NetSuite Customer Payment, applied to the matching invoice so it shows as paid.
Catalog. One click on the configuration record pulls your Lago catalog (plans, taxes, coupons, add-ons, billable metrics, billing entities) into NetSuite as reference objects, so you build mappings from dropdowns instead of copying IDs.
Authentication. NetSuite calls Lago using an API key stored as a NetSuite secret, so the key never appears in scripts, logs, or records. Lago calls the RESTlet using NetSuite’s standard token-based authentication, scoped to the restricted Lago Integration Role the bundle installs.
Go to Customization > SuiteBundler > Search & Install Bundles, locate the Lago bundle, and install it. The install adds:
Lago | Service RESTlet (customscript_lago_service / deployment customdeploy_lago_service): the endpoint Lago calls to create and update records. Its deployment generates the custom RESTlet endpoint URL;
Lago | Fetch Objects MapReduce (customscript_lago_fetch_objects) and Lago | Trigger Fetch Suitelet (customscript_lago_trigger_fetch): pull your Lago catalog into NetSuite;
Lago | Configuration user event script (customscript_lago_configuration_ue): adds the configuration buttons and seeds standard field mappings;
An async processing queue (MapReduce + processing records): applies credit memos and retries work when webhooks arrive out of order;
The Lago Configuration record, the mapping records (item, tax, subsidiary, currency, invoice header/line, charge-grouping rules), and the synced Lago Object record;
A web-services-only Lago Integration Role with the permissions the integration uses; and
Custom fields that link records back to Lago: Lago ID on customers and transactions, Lago Line ID on transaction lines, and the service-period columns described in revenue recognition.
1
Step 1: Enable the required SuiteCloud features
Go to Setup > Company > Enable Features > SuiteCloud and enable Server SuiteScript, Custom Records, REST Web Services, and Token-Based Authentication. Your account also needs the standard Accounting and Subsidiaries features, which most accounts already have.
2
Step 2: Install the bundle
From Customization > SuiteBundler > Search & Install Bundles, install the Lago bundle. This adds the scripts, records, role, and custom fields listed above.
Installing the bundle creates the Lago Integration Role, but not the credentials that use it. Lago signs every call to the RESTlet with NetSuite’s token-based authentication (TBA), which needs four values: a Client ID and Client Secret from an integration record, and a Token ID and Token Secret from an access token issued for that integration, a user, and the role.Create all four in NetSuite, then enter them in Lago.
1
Step 1: Assign the Lago Integration Role to an integration user
Go to Lists > Employees > Employees, open the employee that will own the connection, and click Edit. On the Access subtab, add Lago Integration Role to the Roles sublist, then save.Use a dedicated integration employee rather than a person’s own login. The role is web-services-only, so it can’t sign in to the NetSuite UI, and the connection keeps working when people change teams or leave.
2
Step 2: Create the integration record
Go to Setup > Integration > Manage Integrations > New, give the record a name (for example, Lago Integration), and leave State as Enabled.Under Authentication, tick Token-Based Authentication and clear every other box: TBA: Issuetoken Endpoint, TBA: Authorization Flow, Authorization Code Grant, Client Credentials (Machine to Machine) Grant, and the OAuth 2.0 Scope boxes (Restlets, REST Web Services, SuiteAnalytics Connect). Save.
NetSuite displays the Client ID and Client Secret only once, on the confirmation page immediately after you save. Copy both before you navigate away. They can’t be retrieved later, and replacing a lost pair means creating a new integration record.
Integration record with token-based authentication as the only enabled method
3
Step 3: Create an access token
Go to Setup > Users/Roles > Access Tokens > New, or click Manage Access Tokens in the Settings portlet of your NetSuite home page. Set:
Application Name: the integration record from step 2;
User: the integration user from step 1; and
Role: Lago Integration Role.
NetSuite fills in the Token Name for you. Save, then copy the Token ID and Token Secret. These are also shown only once.
Manage Access Tokens on the NetSuite home page
4
Step 4: Enter the credentials in Lago
Open the NetSuite connection in Lago and enter:
your NetSuite account ID;
the Client ID and Client Secret from step 2;
the Token ID and Token Secret from step 3; and
the custom RESTlet endpoint URL, shown on the Lago Service deployment (customdeploy_lago_service) under Customization > Scripting > Script Deployments. Confirm the deployment status is Released while you’re there.
An access token is tied to one integration, one user, and one role. If you later change the role on the user, or disable the integration record, the token stops working and you need to issue a new one.
The Lago Configuration record is the hub for the whole integration. Create one active record and fill in the connection details:
Active: mark this record as the active configuration;
Lago Endpoint Url: your Lago API base URL (defaults to https://api.getlago.com/api/v1; use your region or self-hosted URL if applicable);
Lago Region and Organization ID: select your region and enter your Lago organization ID.
The record also holds default objects that act as a safety net when no specific mapping matches: Default Item, Default Tax Nexus / Type / Code, Default Coupon, Default Credit Note, Default Subscription Fee, Default Plans Minimum Commitment, and Default Prepaid Credits. Nothing fails just because a mapping is missing. The invoice is created using the defaults.
When you create the record, the bundle seeds the standard invoice field mappings (header and line) automatically. You can re-run this at any time with the Populate Standard Fields button on the record.
Before you can map anything, pull your Lago catalog into NetSuite. On the Lago Configuration record, click Fetch Objects from Lago. The bundle calls the Lago API and stores each object as a Lago Object record (customrecord_lago_object) you can select in the mapping tabs.It fetches plans, coupons, taxes, add-ons, billable metrics, and billing entities. Re-run the fetch whenever you add objects in Lago so the new ones are available to map.
Mappings live on the subtabs of the Lago Configuration record. Each can be scoped to a Billing Entity so different Lago billing entities map differently, or left generic to apply across all of them.
Item Mapping: map each Lago object (plan, add-on, billable metric, and so on) to a NetSuite Item;
Tax Mapping: map each Lago tax to a NetSuite Tax Nexus, Tax Type, and Tax Code. This is how Lago’s tax amounts are applied to NetSuite transactions;
Subsidiary Mapping: map each Lago Billing Entity to a NetSuite Subsidiary;
Currency Mapping: map each Lago Currency to a NetSuite Currency; and
Invoice Mapping: the header and line field mappings the bundle seeds for you. Most accounts leave these as-is; adjust them only for advanced field-level customization.
Tax resolution order. For each invoice, the integration matches a tax mapping by Lago tax and billing entity first, then by Lago tax alone, then by billing entity alone, and finally falls back to the configuration defaults. Item resolution is similar: a billing-entity-specific item mapping wins over a generic one, then a type-based default (subscription fee, minimum commitment, and so on), then the Default Item.
When creating or updating a Lago customer, you can link it to a NetSuite customer. Lago stores the link on the customer’s Lago ID field (custentity_lago_id), and the RESTlet uses that ID to avoid creating duplicates.You have two options:
Auto-create from Lago. Lago creates a matching customer in NetSuite the first time it syncs. The Lago customer view then shows a direct link to the NetSuite customer; or
Import an existing NetSuite customer. Provide the NetSuite customer ID on the Lago customer so the two are linked without creating a new record.
Customer creation from Lago to NetSuite happens in real time with only a few seconds of delay.
When Lago finalizes an invoice for a linked customer, it syncs to a NetSuite Invoice in real time. The NetSuite invoice gets:
One line per Lago fee, on the mapped item, with the Lago fee units as quantity and precise_unit_amount as rate;
Coupons, credit notes, and prepaid (wallet) credits as negative lines, so the NetSuite total matches what the customer owes;
Taxes from your Tax Mapping, reconciled against Lago’s totals to the cent (NetSuite does not support tax details at the line item level, so the integration adjusts rounding so the totals never drift); and
Links back to Lago: the Lago invoice view shows a direct link to the NetSuite invoice, and the NetSuite invoice stores its Lago ID and a URL back to Lago.
Invoice creation from Lago to NetSuite happens in real time with only a few seconds of delay.
If your invoices carry many small usage lines (for example, one per metric or model), you can enable charge grouping to combine all usage-charge lines into a single invoice line on an item you choose, with a description listing what was included. Grouping rules let you restrict when this happens, for example only for certain customers or invoice types.
When a credit note is issued in Lago for a linked customer, it syncs to a NetSuite Credit Memo in real time, following the same line and tax logic as invoices. When the credit note offsets an existing invoice, the credit memo is automatically applied to the original invoice.The Lago credit note view shows a direct link to the corresponding NetSuite Credit Memo once it’s created.
When a payment is recorded in Lago for a linked invoice, it’s pushed to NetSuite as a Customer Payment and applied to the matching invoice, so the invoice shows as paid (full or partial) on both sides.
Reporting NetSuite-side payments back to Lago (the NetSuite → Lago direction) is in development and not yet a supported flow. A Sync Payments toggle for it exists on the configuration record.
No duplicates. Every record carries its Lago ID. If the same invoice, credit note, or customer is sent twice, the integration detects it and refuses to create a second copy.
Totals match. Tax amounts are reconciled against Lago’s totals, including rounding, so the NetSuite invoice never drifts by a penny.
Out-of-order events sort themselves out. If a credit note arrives before the invoice it applies to (or vice versa), the integration queues the work and retries until both sides exist, with no manual fixing.
Audit trail. The original Lago data for each invoice is stored in the NetSuite File Cabinet, so you can always see exactly what was received.
Whenever an issue occurs in NetSuite, Lago notifies you through a webhook message called customer.accounting_provider_error.
You can also view the bundle’s script execution logs inside NetSuite for troubleshooting and auditing.
Building revenue recognition rules in NetSuite from Lago line items
Revenue recognition is the accounting practice of recording revenue as it’s earned, not when it’s billed. NetSuite handles this with its Advanced Revenue Management module: an item-level revenue recognition rule defines how revenue is recognized, and NetSuite generates a revenue arrangement and a recognition schedule from each transaction line.Lago feeds that engine directly. You don’t build manual schedules. You let NetSuite derive them from the line items Lago syncs.
Every Lago fee syncs as one NetSuite invoice line item, and the fee’s service period reaches that line through the invoice line mapping on the Lago Configuration. A line mapping connects a source field on the Lago fee (the from value) to a column on the NetSuite invoice line (the to value), so you decide which Lago dates land in which NetSuite columns.For revenue recognition, you map the fee’s service-period start and end dates onto two date columns on the invoice line, for example:
a start-date column (for example custcol_service_period_date_from); and
an end-date column (for example custcol_service_period_date_to).
These columns are not shipped by the bundle, and the names above are only examples. You create the date columns in your own NetSuite account (or reuse columns you already have), then map the Lago service-period dates onto them in the Invoice Mapping (line) subtab. These mappings are also not part of the seeded standard line mappings, so add them yourself if your invoices need a service period. The only line custom field the bundle installs is Lago Line ID (custcol_lago_line_id).
Whichever columns you use, they are the input NetSuite needs to spread revenue over time. On the NetSuite item, set the revenue recognition rule’s Rev Rec Start Date Source to your service-period start column and its Rev Rec End Date Source to your service-period end column. NetSuite then schedules recognition across exactly the period Lago billed, with no manual entry.
Not every fee should be recognized the same way. The rule lives on the NetSuite item, so map each Lago object to an item that carries the right rule:
Ratable (over time). Subscription fees and minimum commitments carry a real service period (for example, a monthly or annual term). Map them to items with a ratable, straight-line rule so revenue spreads evenly from the line’s service-period start to its end.
Point-in-time. One-off charges (add-ons) and usage-based fees are earned when billed. Their service period is effectively a single instant. Map them to items with a point-in-time rule so revenue is recognized in full on the invoice date.
The recognition behavior is determined by the rule on the mapped NetSuite item, not by Lago. Use the Item Mapping to send each Lago object to an item that carries the correct rev rec rule.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lago","description":"Developer documentation for Lago, the open-source billing platform for usage metering, subscriptions, invoicing, payments, and revenue operations.","colors":{"primary":"#006CFA","light":"#006CFA","dark":"#006CFA"},"logo":{"light":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/light.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=b4af3001527c985b81858b9a0928534c","dark":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/dark.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=1eb7aacac796b0cc6bf05be790a792b1"},"favicon":"https://mintcdn.com/lago-docs/8N-yOElNGe9jRGG5/favicon.svg?fit=max\u0026auto=format\u0026n=8N-yOElNGe9jRGG5\u0026q=85\u0026s=5c319e58dd9b5c5b8a31cf2ad8009a1c","api":{"openapi":"https://swagger.getlago.com/openapi.yaml","mdx":{"server":"https://api.getlago.com/api/v1"}},"background":{"color":{"light":"#F5F5EF","dark":"#131923"}},"navbar":{"links":[{"href":"https://getlago.com/book-a-demo","label":"Book a Demo"}],"primary":{"type":"button","label":"Get Started","href":"https://getlago.com/book-a-demo"}},"footer":{"socials":{"github":"https://github.com/getlago/lago","slack":"https://getlago.com/slack","x":"https://x.com/getlago","linkedin":"https://www.linkedin.com/company/getlago","youtube":"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"},"links":[{"header":"Documentation","items":[{"label":"Get started","href":"https://getlago.com/docs/guide/introduction/welcome-to-lago"},{"label":"API reference","href":"https://getlago.com/docs/api-reference/intro"},{"label":"Integrations","href":"https://getlago.com/docs/integrations/introduction"},{"label":"Templates","href":"https://getlago.com/docs/templates/introduction"},{"label":"Changelog","href":"https://getlago.com/docs/changelog/product"},{"label":"FAQ","href":"https://getlago.com/docs/faq/about-lago"}]},{"header":"Developers","items":[{"label":"Developer hub","href":"https://getlago.com/docs/developers"},{"label":"Authentication","href":"https://getlago.com/docs/auth"},{"label":"Webhooks","href":"https://getlago.com/docs/guide/webhooks"},{"label":"SDKs","href":"https://getlago.com/docs/developers"},{"label":"OpenAPI spec","href":"https://swagger.getlago.com/"},{"label":"MCP server","href":"https://getlago.com/docs/guide/ai-agents/mcp-server"},{"label":"Self-hosted","href":"https://getlago.com/docs/guide/lago-self-hosted/overview"},{"label":"llms.txt","href":"https://getlago.com/docs/llms.txt"}]},{"header":"Platform","items":[{"label":"Usage metering","href":"https://getlago.com/platform/usage-metering"},{"label":"Billing \u0026 invoicing","href":"https://getlago.com/platform/billing-invoicing"},{"label":"Cash collection","href":"https://getlago.com/platform/cash-collection"},{"label":"Revenue analytics","href":"https://getlago.com/platform/revenue-analytics"},{"label":"Entitlements","href":"https://getlago.com/platform/entitlements"},{"label":"Lago AI","href":"https://getlago.com/platform/ai"},{"label":"Pricing","href":"https://getlago.com/pricing"}]},{"header":"Company","items":[{"label":"About Lago","href":"https://getlago.com/docs/about"},{"label":"Customers","href":"https://getlago.com/customers"},{"label":"Blog","href":"https://getlago.com/blog"},{"label":"Contact","href":"https://getlago.com/docs/contact"},{"label":"Trust center","href":"https://security.getlago.com"},{"label":"Status","href":"https://status.getlago.com"}]}]},"seo":{"metatags":{"canonical":"https://getlago.com/docs","description":"Developer documentation for Lago's API-first billing platform, including OpenAPI, SDKs, webhooks, MCP, authentication, and implementation guides.","keywords":"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP"},"organization":{"id":"https://getlago.com/#organization","name":"Lago","legalName":"Get Lago Corp.","url":"https://getlago.com","logo":"https://getlago.com/docs/logo/light.svg","sameAs":["https://github.com/getlago","https://www.linkedin.com/company/getlago","https://x.com/GetLago","https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"]},"indexing":"all"},"fonts":{"heading":{"family":"GT America","weight":700,"source":"fonts/GT-America-Standard-Medium.woff2","format":"woff2"},"body":{"family":"GT America","source":"fonts/GT-America-Standard-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-743BQ9THCG"},"cookies":{"key":"lago_docs_analytics","value":"granted"}},"errors":{"404":{"redirect":false,"title":"Documentation page not found","description":"No Lago documentation exists at this URL. Start at [Lago Developer Documentation](/welcome), browse [Developer Resources](/developers), inspect the [documentation index](/llms.txt) or [sitemap](/sitemap.xml), or search the [API reference](/api-reference/intro)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lago-docs","hasAudioNarration":false,"actualSubdomain":"lago-docs","customDomains":["getlago.com"],"gitSource":{"type":"github","owner":"getlago","repo":"lago-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3588f57f36b6fdeef499d","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API References","count":243},{"language":"default","tag":"API Reference","count":243},{"language":"default","tag":"Guide","count":206},{"language":"default","tag":"Integrations","count":54},{"language":"default","tag":"Plans","count":46},{"language":"default","tag":"Resources","count":46},{"language":"default","tag":"Charges","count":39},{"language":"default","tag":"Pricing \u0026 Subscriptions","count":35},{"language":"default","tag":"Subscriptions","count":31},{"language":"default","tag":"Invoices","count":27}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html{visibility:hidden;background-color:#F5F5EF}@media (prefers-color-scheme: dark){html{background-color:#131923}}html.ready{visibility:visible}.dark .welcome-card{background-color:#1c2535!important;border-color:rgba(255, 255, 255, 0.1)!important;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3)!important;color:#e5e7eb}.dark .welcome-card:hover{background-color:#243044!important}.dark .welcome-card h3{color:#ffffff}.dark .welcome-card p{color:#9ca3af!important}#changelog-month-nav{padding-left:2.5rem;width:19rem;box-sizing:border-box;margin-bottom:1.75rem;max-height:45vh;overflow-y:auto}#changelog-month-nav .changelog-month-nav__year{margin:0 0 0.5rem;font-size:0.875rem;line-height:1.5rem;font-weight:500;color:#364152}#changelog-month-nav .changelog-month-nav__list{list-style:none;margin:0;padding:0;border-left:1px solid rgba(0, 0, 0, 0.08)}#changelog-month-nav .changelog-month-nav__list a{display:block;padding:0.25rem 0 0.25rem 0.75rem;margin-left:-1px;border-left:1px solid transparent;font-size:0.875rem;line-height:1.5rem;color:#697586;text-decoration:none;transition:color 0.15s ease, border-color 0.15s ease}#changelog-month-nav .changelog-month-nav__list a:hover{color:#121926}#changelog-month-nav .changelog-month-nav__list a.is-active{color:#006CFA;border-left-color:#006CFA;font-weight:500}.dark #changelog-month-nav .changelog-month-nav__year{color:#cdd5df}.dark #changelog-month-nav .changelog-month-nav__list{border-left-color:rgba(255, 255, 255, 0.12)}.dark #changelog-month-nav .changelog-month-nav__list a{color:#9aa4b2}.dark #changelog-month-nav .changelog-month-nav__list a:hover{color:#ffffff}.dark #changelog-month-nav .changelog-month-nav__list a.is-active{color:#4d9bff;border-left-color:#4d9bff}.update-container>div:first-child{display:none}.update-container>div:nth-child(2){flex:1 1 100%;max-width:100%;width:100%}.update-container{gap:0}#footer a[href*=\"utm_campaign=poweredBy\"]{display:none}"}],"page":{"pagePath":"integrations/accounting/netsuite","slug":"/integrations/accounting/netsuite","pageMetadata":{"title":"NetSuite","description":"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.","href":"/integrations/accounting/netsuite"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Info,Mermaid,OptimizedImage,Step,Steps,Warning}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Info,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PREMIUM ADD-ON`}),` ✨`]}),_jsxs(_components.p,{children:[`This integration is available upon request only. Please `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`mailto:hello@getlago.com`,children:`contact us`})}),` to get access to this premium integration.`]})]}),`\n`,_jsx(_components.p,{children:`Lago handles usage-based billing: it meters usage, applies plans and coupons, and produces invoices. NetSuite is where your finance team does accounting. This integration keeps the two in sync automatically, so invoices, credit notes, and payments created in Lago appear in NetSuite as real, tax-accurate transactions with no manual re-entry.`}),`\n`,_jsxs(_components.p,{children:[`It runs as a `,_jsx(_components.strong,{children:`Lago bundle`}),` you install into your NetSuite account. A bundle (or SuiteBundle) is a packaged set of customizations you install in one step. You then configure everything from a single `,_jsx(_components.strong,{children:`Lago Configuration`}),` record inside NetSuite. There is no script to paste and no mapping to maintain in Lago.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Lago maintains this integration internally using SuiteCloud Development Framework (SDF). You don’t interact with SDF: everything you need ships in the bundle.`})}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsx(Mermaid,{chart:`flowchart LR\n LAGO[\"Lago\u003cbr/>(billing)\"]\n NS[\"NetSuite\u003cbr/>(accounting)\"]\n\n LAGO -->|\"Invoices, credit notes,\u003cbr/>customers, payments\"| NS\n LAGO -->|\"Catalog: plans, taxes, coupons,\u003cbr/>add-ons, metrics, billing entities\"| NS`}),`\n`,_jsx(_components.p,{children:`Data flows from Lago into NetSuite along three paths:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Documents.`}),` When Lago finalizes an invoice or issues a credit note, it calls the bundle’s `,_jsx(_components.a,{href:`https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4618456517.html`,children:`RESTlet`}),` (a server-side script that exposes a secure URL) to create a NetSuite Invoice or Credit Memo in real time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Payments.`}),` When a payment is recorded in Lago, it’s pushed to the RESTlet and created as a NetSuite Customer Payment, applied to the matching invoice so it shows as paid.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Catalog.`}),` One click on the configuration record pulls your Lago catalog (plans, taxes, coupons, add-ons, billable metrics, billing entities) into NetSuite as reference objects, so you build mappings from dropdowns instead of copying IDs.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Authentication.`}),` NetSuite calls Lago using an API key stored as a NetSuite secret, so the key never appears in scripts, logs, or records. Lago calls the RESTlet using NetSuite’s standard `,_jsx(_components.a,{href:`#set-up-token-based-authentication`,children:`token-based authentication`}),`, scoped to the restricted `,_jsx(_components.strong,{children:`Lago Integration Role`}),` the bundle installs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`setup`,children:`Setup`}),`\n`,_jsx(_components.p,{children:`Complete every step in this section before syncing any data.`}),`\n`,_jsx(Heading,{level:`3`,id:`install-the-lago-bundle`,children:`Install the Lago bundle`}),`\n`,_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Customization > SuiteBundler > Search \u0026 Install Bundles`}),`, locate the Lago bundle, and install it. The install adds:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lago | Service`}),` RESTlet (`,_jsx(_components.code,{children:`customscript_lago_service`}),` / deployment `,_jsx(_components.code,{children:`customdeploy_lago_service`}),`): the endpoint Lago calls to create and update records. Its deployment generates the `,_jsx(_components.strong,{children:`custom RESTlet endpoint URL`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lago | Fetch Objects`}),` MapReduce (`,_jsx(_components.code,{children:`customscript_lago_fetch_objects`}),`) and `,_jsx(_components.strong,{children:`Lago | Trigger Fetch`}),` Suitelet (`,_jsx(_components.code,{children:`customscript_lago_trigger_fetch`}),`): pull your Lago catalog into NetSuite;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lago | Configuration`}),` user event script (`,_jsx(_components.code,{children:`customscript_lago_configuration_ue`}),`): adds the configuration buttons and seeds standard field mappings;`]}),`\n`,_jsxs(_components.li,{children:[`An `,_jsx(_components.strong,{children:`async processing queue`}),` (MapReduce + processing records): applies credit memos and retries work when webhooks arrive out of order;`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.strong,{children:`Lago Configuration`}),` record, the mapping records (item, tax, subsidiary, currency, invoice header/line, charge-grouping rules), and the synced `,_jsx(_components.strong,{children:`Lago Object`}),` record;`]}),`\n`,_jsxs(_components.li,{children:[`A web-services-only `,_jsx(_components.strong,{children:`Lago Integration Role`}),` with the permissions the integration uses; and`]}),`\n`,_jsxs(_components.li,{children:[`Custom fields that link records back to Lago: `,_jsx(_components.strong,{children:`Lago ID`}),` on customers and transactions, `,_jsx(_components.strong,{children:`Lago Line ID`}),` on transaction lines, and the service-period columns described in `,_jsx(_components.a,{href:`#building-revenue-recognition-rules-in-netsuite-from-lago-line-items`,children:`revenue recognition`}),`.`]}),`\n`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Step 1: Enable the required SuiteCloud features`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Setup > Company > Enable Features > SuiteCloud`}),` and enable `,_jsx(_components.strong,{children:`Server SuiteScript`}),`, `,_jsx(_components.strong,{children:`Custom Records`}),`, `,_jsx(_components.strong,{children:`REST Web Services`}),`, and `,_jsx(_components.strong,{children:`Token-Based Authentication`}),`. Your account also needs the standard `,_jsx(_components.strong,{children:`Accounting`}),` and `,_jsx(_components.strong,{children:`Subsidiaries`}),` features, which most accounts already have.`]})}),_jsx(Step,{title:`Step 2: Install the bundle`,children:_jsxs(_components.p,{children:[`From `,_jsx(_components.strong,{children:`Customization > SuiteBundler > Search \u0026 Install Bundles`}),`, install the Lago bundle. This adds the scripts, records, role, and custom fields listed above.`]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`set-up-token-based-authentication`,children:`Set up token-based authentication`}),`\n`,_jsxs(_components.p,{children:[`Installing the bundle creates the `,_jsx(_components.strong,{children:`Lago Integration Role`}),`, but not the credentials that use it. Lago signs every call to the RESTlet with NetSuite’s token-based authentication (TBA), which needs four values: a `,_jsx(_components.strong,{children:`Client ID`}),` and `,_jsx(_components.strong,{children:`Client Secret`}),` from an integration record, and a `,_jsx(_components.strong,{children:`Token ID`}),` and `,_jsx(_components.strong,{children:`Token Secret`}),` from an access token issued for that integration, a user, and the role.`]}),`\n`,_jsx(_components.p,{children:`Create all four in NetSuite, then enter them in Lago.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Step 1: Assign the Lago Integration Role to an integration user`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Lists > Employees > Employees`}),`, open the employee that will own the connection, and click `,_jsx(_components.strong,{children:`Edit`}),`. On the `,_jsx(_components.strong,{children:`Access`}),` subtab, add `,_jsx(_components.strong,{children:`Lago Integration Role`}),` to the `,_jsx(_components.strong,{children:`Roles`}),` sublist, then save.`]}),_jsx(_components.p,{children:`Use a dedicated integration employee rather than a person’s own login. The role is web-services-only, so it can’t sign in to the NetSuite UI, and the connection keeps working when people change teams or leave.`})]}),_jsxs(Step,{title:`Step 2: Create the integration record`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Setup > Integration > Manage Integrations > New`}),`, give the record a name (for example, `,_jsx(_components.code,{children:`Lago Integration`}),`), and leave `,_jsx(_components.strong,{children:`State`}),` as `,_jsx(_components.code,{children:`Enabled`}),`.`]}),_jsxs(_components.p,{children:[`Under `,_jsx(_components.strong,{children:`Authentication`}),`, tick `,_jsx(_components.strong,{children:`Token-Based Authentication`}),` and clear every other box: `,_jsx(_components.strong,{children:`TBA: Issuetoken Endpoint`}),`, `,_jsx(_components.strong,{children:`TBA: Authorization Flow`}),`, `,_jsx(_components.strong,{children:`Authorization Code Grant`}),`, `,_jsx(_components.strong,{children:`Client Credentials (Machine to Machine) Grant`}),`, and the OAuth 2.0 `,_jsx(_components.strong,{children:`Scope`}),` boxes (`,_jsx(_components.strong,{children:`Restlets`}),`, `,_jsx(_components.strong,{children:`REST Web Services`}),`, `,_jsx(_components.strong,{children:`SuiteAnalytics Connect`}),`). Save.`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`NetSuite displays the `,_jsx(_components.strong,{children:`Client ID`}),` and `,_jsx(_components.strong,{children:`Client Secret`}),` only once, on the confirmation page immediately after you save. Copy both before you navigate away. They can’t be retrieved later, and replacing a lost pair means creating a new integration record.`]})}),_jsx(Frame,{caption:`Integration record with token-based authentication as the only enabled method`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=a8c34b0dd01da9ec2874b39812faee4e`,alt:`A NetSuite integration record with token-based authentication as the only enabled method.`,\"data-og-width\":`2860`,width:`2860`,\"data-og-height\":`1592`,height:`1592`,\"data-path\":`integrations/images/netstuite-tba-integration.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=280\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=bbb468eb034f0622002442219f14d264 280w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=560\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=93089bdd89ba9fbb2ca6c5b8cf98f515 560w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=840\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=bd9df02554760ec33074b3dc4793128c 840w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=1100\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=cc88e1db00b8b7bbe3f000525693abc7 1100w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=1650\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=e94e557e3881251171f3528a2ef5bf5f 1650w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/netstuite-tba-integration.png?w=2500\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=fc4cb0ce1c2b25691041b02514a8952e 2500w`})})]}),_jsxs(Step,{title:`Step 3: Create an access token`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Setup > Users/Roles > Access Tokens > New`}),`, or click `,_jsx(_components.strong,{children:`Manage Access Tokens`}),` in the `,_jsx(_components.strong,{children:`Settings`}),` portlet of your NetSuite home page. Set:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Application Name`}),`: the integration record from step 2;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`User`}),`: the integration user from step 1; and`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Role`}),`: `,_jsx(_components.strong,{children:`Lago Integration Role`}),`.`]}),`\n`]}),_jsxs(_components.p,{children:[`NetSuite fills in the `,_jsx(_components.strong,{children:`Token Name`}),` for you. Save, then copy the `,_jsx(_components.strong,{children:`Token ID`}),` and `,_jsx(_components.strong,{children:`Token Secret`}),`. `,_jsx(_components.strong,{children:`These are also shown only once.`})]}),_jsx(Frame,{caption:`Manage Access Tokens on the NetSuite home page`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=63d76160ad91e24ec83ffbbf75fb5116`,alt:`The Manage Access Tokens link in the Settings portlet of the NetSuite home page.`,\"data-og-width\":`2892`,width:`2892`,\"data-og-height\":`1344`,height:`1344`,\"data-path\":`integrations/images/create-netsuite-token.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=280\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=d9f265287dba3e6b681a798c9761607c 280w, https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=560\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=2f41cd34115038b014994600cbe974a2 560w, https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=840\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=0c79bf7d4b7ed71d11b1754cdc859ad0 840w, https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=1100\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=9a1a1185aabc529ef880e5d7d99480ba 1100w, https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=1650\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=4d8200259d1777cc3bf6aa2900151750 1650w, https://mintcdn.com/lago-docs/xDoze7ebvXBe1su1/integrations/images/create-netsuite-token.png?w=2500\u0026fit=max\u0026auto=format\u0026n=xDoze7ebvXBe1su1\u0026q=85\u0026s=fb926bd48da233bc7be0c1cfbebeba7e 2500w`})})]}),_jsxs(Step,{title:`Step 4: Enter the credentials in Lago`,children:[_jsx(_components.p,{children:`Open the NetSuite connection in Lago and enter:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`your `,_jsx(_components.strong,{children:`NetSuite account ID`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`the `,_jsx(_components.strong,{children:`Client ID`}),` and `,_jsx(_components.strong,{children:`Client Secret`}),` from step 2;`]}),`\n`,_jsxs(_components.li,{children:[`the `,_jsx(_components.strong,{children:`Token ID`}),` and `,_jsx(_components.strong,{children:`Token Secret`}),` from step 3; and`]}),`\n`,_jsxs(_components.li,{children:[`the `,_jsx(_components.strong,{children:`custom RESTlet endpoint URL`}),`, shown on the `,_jsx(_components.code,{children:`Lago Service`}),` deployment (`,_jsx(_components.code,{children:`customdeploy_lago_service`}),`) under `,_jsx(_components.strong,{children:`Customization > Scripting > Script Deployments`}),`. Confirm the deployment status is `,_jsx(_components.code,{children:`Released`}),` while you’re there.`]}),`\n`]})]})]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`An access token is tied to one integration, one user, and one role. If you later change the role on the user, or disable the integration record, the token stops working and you need to issue a new one.`})}),`\n`,_jsx(Heading,{level:`3`,id:`add-your-lago-api-key`,children:`Add your Lago API key`}),`\n`,_jsxs(_components.p,{children:[`The bundle scripts call the Lago API using a key stored as a NetSuite `,_jsx(_components.strong,{children:`secret`}),`, so the key is encrypted at rest and never appears in script logs.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In NetSuite, go to your secrets management page (`,_jsx(_components.strong,{children:`Setup > Company > API Secrets`}),`) and create a new secret;`]}),`\n`,_jsx(_components.li,{children:`Paste your Lago API key as the value;`}),`\n`,_jsx(_components.li,{children:`Restrict the secret to your account domain and to the Lago scripts; and`}),`\n`,_jsxs(_components.li,{children:[`Save. The scripts reference it by its ID, `,_jsx(_components.code,{children:`custsecret_lago_api_key`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`create-the-lago-configuration-record`,children:`Create the Lago Configuration record`}),`\n`,_jsx(_components.p,{children:`The Lago Configuration record is the hub for the whole integration. Create one active record and fill in the connection details:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Active`}),`: mark this record as the active configuration;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lago Endpoint Url`}),`: your Lago API base URL (defaults to `,_jsx(_components.code,{children:`https://api.getlago.com/api/v1`}),`; use your region or self-hosted URL if applicable);`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lago Region`}),` and `,_jsx(_components.strong,{children:`Organization ID`}),`: select your region and enter your Lago organization ID.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The record also holds `,_jsx(_components.strong,{children:`default objects`}),` that act as a safety net when no specific mapping matches: Default Item, Default Tax Nexus / Type / Code, Default Coupon, Default Credit Note, Default Subscription Fee, Default Plans Minimum Commitment, and Default Prepaid Credits. Nothing fails just because a mapping is missing. The invoice is created using the defaults.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`When you create the record, the bundle seeds the `,_jsx(_components.strong,{children:`standard invoice field mappings`}),` (header and line) automatically. You can re-run this at any time with the `,_jsx(_components.strong,{children:`Populate Standard Fields`}),` button on the record.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`fetch-your-lago-catalog`,children:`Fetch your Lago catalog`}),`\n`,_jsxs(_components.p,{children:[`Before you can map anything, pull your Lago catalog into NetSuite. On the Lago Configuration record, click `,_jsx(_components.strong,{children:`Fetch Objects from Lago`}),`. The bundle calls the Lago API and stores each object as a `,_jsx(_components.strong,{children:`Lago Object`}),` record (`,_jsx(_components.code,{children:`customrecord_lago_object`}),`) you can select in the mapping tabs.`]}),`\n`,_jsx(_components.p,{children:`It fetches plans, coupons, taxes, add-ons, billable metrics, and billing entities. Re-run the fetch whenever you add objects in Lago so the new ones are available to map.`}),`\n`,_jsx(Heading,{level:`3`,id:`configure-the-mappings`,children:`Configure the mappings`}),`\n`,_jsxs(_components.p,{children:[`Mappings live on the subtabs of the Lago Configuration record. Each can be scoped to a `,_jsx(_components.strong,{children:`Billing Entity`}),` so different Lago billing entities map differently, or left generic to apply across all of them.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Item Mapping`}),`: map each Lago object (plan, add-on, billable metric, and so on) to a `,_jsx(_components.strong,{children:`NetSuite Item`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tax Mapping`}),`: map each Lago tax to a NetSuite `,_jsx(_components.strong,{children:`Tax Nexus`}),`, `,_jsx(_components.strong,{children:`Tax Type`}),`, and `,_jsx(_components.strong,{children:`Tax Code`}),`. This is how Lago’s tax amounts are applied to NetSuite transactions;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Subsidiary Mapping`}),`: map each Lago `,_jsx(_components.strong,{children:`Billing Entity`}),` to a NetSuite `,_jsx(_components.strong,{children:`Subsidiary`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Currency Mapping`}),`: map each Lago `,_jsx(_components.strong,{children:`Currency`}),` to a NetSuite `,_jsx(_components.strong,{children:`Currency`}),`; and`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Invoice Mapping`}),`: the header and line field mappings the bundle seeds for you. Most accounts leave these as-is; adjust them only for advanced field-level customization.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Tax resolution order.`}),` For each invoice, the integration matches a tax mapping by Lago tax `,_jsx(_components.strong,{children:`and`}),` billing entity first, then by Lago tax alone, then by billing entity alone, and finally falls back to the configuration defaults. `,_jsx(_components.strong,{children:`Item resolution`}),` is similar: a billing-entity-specific item mapping wins over a generic one, then a type-based default (subscription fee, minimum commitment, and so on), then the Default Item.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`syncs`,children:`Syncs`}),`\n`,_jsx(Heading,{level:`3`,id:`customers-synchronization`,children:`Customers synchronization`}),`\n`,_jsxs(_components.p,{children:[`When creating or updating a Lago customer, you can link it to a NetSuite customer. Lago stores the link on the customer’s `,_jsx(_components.strong,{children:`Lago ID`}),` field (`,_jsx(_components.code,{children:`custentity_lago_id`}),`), and the RESTlet uses that ID to avoid creating duplicates.`]}),`\n`,_jsx(_components.p,{children:`You have two options:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Auto-create from Lago.`}),` Lago creates a matching customer in NetSuite the first time it syncs. The Lago customer view then shows a direct link to the NetSuite customer; or`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Import an existing NetSuite customer.`}),` Provide the NetSuite customer ID on the Lago customer so the two are linked without creating a new record.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Customer creation from Lago to NetSuite happens in real time with only a few seconds of delay.`})}),`\n`,_jsx(Frame,{caption:`Lago customer integrated with NetSuite`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=fa84f22cdf6785724db0610dc16dd730`,alt:`A Lago customer linked to its NetSuite customer record.`,\"data-og-width\":`1701`,width:`1701`,\"data-og-height\":`799`,height:`799`,\"data-path\":`integrations/images/sync-customers-netsuite.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=280\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=82c0239a56e426cfad7ce3e610dbee1d 280w, https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=560\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=b7bc25377cbb748f46a0bf8069c5273f 560w, https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=840\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=cf3510eca624a8247c91e629a9684b90 840w, https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=1100\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=324d7a7aa76d00384f4c7760d5719767 1100w, https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=1650\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=a2106e03bc5e5a4aa22ef511e981d694 1650w, https://mintcdn.com/lago-docs/L98tGNZj-YiXbIo-/integrations/images/sync-customers-netsuite.png?w=2500\u0026fit=max\u0026auto=format\u0026n=L98tGNZj-YiXbIo-\u0026q=85\u0026s=4beafd2eb65f94a60a80eb26d5f25116 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`invoices-synchronization`,children:`Invoices synchronization`}),`\n`,_jsx(_components.p,{children:`When Lago finalizes an invoice for a linked customer, it syncs to a NetSuite Invoice in real time. The NetSuite invoice gets:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`One line per Lago fee`}),`, on the mapped item, with the Lago fee `,_jsx(_components.code,{children:`units`}),` as `,_jsx(_components.code,{children:`quantity`}),` and `,_jsx(_components.code,{children:`precise_unit_amount`}),` as `,_jsx(_components.code,{children:`rate`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Coupons, credit notes, and prepaid (wallet) credits`}),` as negative lines, so the NetSuite total matches what the customer owes;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Taxes`}),` from your Tax Mapping, reconciled against Lago’s totals to the cent (NetSuite does not support tax details at the line item level, so the integration adjusts rounding so the totals never drift); and`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Links back to Lago`}),`: the Lago invoice view shows a direct link to the NetSuite invoice, and the NetSuite invoice stores its Lago ID and a URL back to Lago.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Invoice creation from Lago to NetSuite happens in real time with only a few seconds of delay.`})}),`\n`,_jsx(Frame,{caption:`Sync Lago invoices to NetSuite`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=138ffe3d14f171fe12c32b929be37e5b`,alt:`A Lago invoice linked to the NetSuite invoice created from it.`,\"data-og-width\":`2832`,width:`2832`,\"data-og-height\":`1890`,height:`1890`,\"data-path\":`integrations/images/sync-invoices-netsuite.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=280\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=ba3171839997f090b736f8791360325c 280w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=560\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=4c88c9a1f427ef3db994faff3ff3a1fe 560w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=840\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=5c9704f9605cbd526dbd7888f11a3552 840w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=1100\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=8ecaaa6f005976320b5b550e8e719dd5 1100w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=1650\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=e5f93f6364d4f30105e6cf6162e17c36 1650w, https://mintcdn.com/lago-docs/aaVDsanqVM_V30mw/integrations/images/sync-invoices-netsuite.png?w=2500\u0026fit=max\u0026auto=format\u0026n=aaVDsanqVM_V30mw\u0026q=85\u0026s=9f7270edc88dae99849d1b98160ccafd 2500w`})}),`\n`,_jsx(Heading,{level:`4`,id:`optional-grouped-charge-lines`,children:`Optional: grouped charge lines`}),`\n`,_jsxs(_components.p,{children:[`If your invoices carry many small usage lines (for example, one per metric or model), you can enable `,_jsx(_components.strong,{children:`charge grouping`}),` to combine all usage-charge lines into a single invoice line on an item you choose, with a description listing what was included. Grouping rules let you restrict when this happens, for example only for certain customers or invoice types.`]}),`\n`,_jsx(Heading,{level:`3`,id:`credit-notes-synchronization`,children:`Credit Notes synchronization`}),`\n`,_jsxs(_components.p,{children:[`When a credit note is issued in Lago for a linked customer, it syncs to a NetSuite Credit Memo in real time, following the same line and tax logic as invoices. When the credit note offsets an existing invoice, the credit memo is `,_jsx(_components.strong,{children:`automatically applied to the original invoice`}),`.`]}),`\n`,_jsx(_components.p,{children:`The Lago credit note view shows a direct link to the corresponding NetSuite Credit Memo once it’s created.`}),`\n`,_jsx(Heading,{level:`3`,id:`payments-synchronization`,children:`Payments synchronization`}),`\n`,_jsxs(_components.p,{children:[`When a payment is recorded in Lago for a linked invoice, it’s pushed to NetSuite as a `,_jsx(_components.strong,{children:`Customer Payment`}),` and applied to the matching invoice, so the invoice shows as paid (full or partial) on both sides.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Reporting NetSuite-side payments back to Lago (the NetSuite → Lago direction) is in development and not yet a supported flow. A `,_jsx(_components.strong,{children:`Sync Payments`}),` toggle for it exists on the configuration record.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`reliability-and-reconciliation`,children:`Reliability and reconciliation`}),`\n`,_jsx(_components.p,{children:`The integration is built to run unattended:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No duplicates.`}),` Every record carries its Lago ID. If the same invoice, credit note, or customer is sent twice, the integration detects it and refuses to create a second copy.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Totals match.`}),` Tax amounts are reconciled against Lago’s totals, including rounding, so the NetSuite invoice never drifts by a penny.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Out-of-order events sort themselves out.`}),` If a credit note arrives before the invoice it applies to (or vice versa), the integration queues the work and retries until both sides exist, with no manual fixing.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Audit trail.`}),` The original Lago data for each invoice is stored in the NetSuite File Cabinet, so you can always see exactly what was received.`]}),`\n`]}),`\n`,_jsx(Mermaid,{chart:`flowchart TD\n A[Invoice created in NetSuite\u003cbr/>references a Lago credit note] --> B{Credit memo\u003cbr/>exists in NetSuite?}\n B -->|Yes| C[Apply credit memo to invoice]\n B -->|No| D[Queue and retry on the next run]\n D --> B`}),`\n`,_jsx(Heading,{level:`3`,id:`integration-logs`,children:`Integration logs`}),`\n`,_jsxs(_components.p,{children:[`Whenever an issue occurs in NetSuite, Lago notifies you through a `,_jsx(_components.a,{href:`/api-reference/webhooks/messages#param-customer-accounting-provider-error`,children:`webhook message`}),` called `,_jsx(_components.code,{children:`customer.accounting_provider_error`}),`.\nYou can also `,_jsx(_components.strong,{children:`view the bundle’s script execution logs inside NetSuite`}),` for troubleshooting and auditing.`]}),`\n`,_jsx(Heading,{level:`2`,id:`building-revenue-recognition-rules-in-netsuite-from-lago-line-items`,children:`Building revenue recognition rules in NetSuite from Lago line items`}),`\n`,_jsxs(_components.p,{children:[`Revenue recognition is the accounting practice of recording revenue as it’s earned, not when it’s billed. NetSuite handles this with its Advanced Revenue Management module: an item-level `,_jsx(_components.strong,{children:`revenue recognition rule`}),` defines `,_jsx(_components.em,{children:`how`}),` revenue is recognized, and NetSuite generates a `,_jsx(_components.strong,{children:`revenue arrangement`}),` and a recognition schedule from each transaction line.`]}),`\n`,_jsx(_components.p,{children:`Lago feeds that engine directly. You don’t build manual schedules. You let NetSuite derive them from the line items Lago syncs.`}),`\n`,_jsx(Heading,{level:`3`,id:`how-lago-line-items-carry-the-service-period`,children:`How Lago line items carry the service period`}),`\n`,_jsxs(_components.p,{children:[`Every Lago fee syncs as one NetSuite invoice line item, and the fee’s service period reaches that line through the `,_jsx(_components.strong,{children:`invoice line mapping`}),` on the Lago Configuration. A line mapping connects a source field on the Lago fee (the `,_jsx(_components.strong,{children:`from`}),` value) to a column on the NetSuite invoice line (the `,_jsx(_components.strong,{children:`to`}),` value), so you decide which Lago dates land in which NetSuite columns.`]}),`\n`,_jsx(_components.p,{children:`For revenue recognition, you map the fee’s service-period start and end dates onto two date columns on the invoice line, for example:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`a start-date column (for example `,_jsx(_components.code,{children:`custcol_service_period_date_from`}),`); and`]}),`\n`,_jsxs(_components.li,{children:[`an end-date column (for example `,_jsx(_components.code,{children:`custcol_service_period_date_to`}),`).`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`These columns are `,_jsx(_components.strong,{children:`not shipped by the bundle`}),`, and the names above are only examples. You create the date columns in your own NetSuite account (or reuse columns you already have), then map the Lago service-period dates onto them in the `,_jsx(_components.a,{href:`#configure-the-mappings`,children:`Invoice Mapping`}),` (line) subtab. These mappings are also not part of the seeded standard line mappings, so add them yourself if your invoices need a service period. The only line custom field the bundle installs is `,_jsx(_components.strong,{children:`Lago Line ID`}),` (`,_jsx(_components.code,{children:`custcol_lago_line_id`}),`).`]})}),`\n`,_jsxs(_components.p,{children:[`Whichever columns you use, they are the input NetSuite needs to spread revenue over time. On the NetSuite item, set the revenue recognition rule’s `,_jsx(_components.strong,{children:`Rev Rec Start Date Source`}),` to your service-period start column and its `,_jsx(_components.strong,{children:`Rev Rec End Date Source`}),` to your service-period end column. NetSuite then schedules recognition across exactly the period Lago billed, with no manual entry.`]}),`\n`,_jsx(Heading,{level:`3`,id:`ratable-vs-point-in-time`,children:`Ratable vs. point-in-time`}),`\n`,_jsx(_components.p,{children:`Not every fee should be recognized the same way. The rule lives on the NetSuite item, so map each Lago object to an item that carries the right rule:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Ratable (over time).`}),` Subscription fees and minimum commitments carry a real service period (for example, a monthly or annual term). Map them to items with a ratable, straight-line rule so revenue spreads evenly from the line’s service-period start to its end.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Point-in-time.`}),` One-off charges (add-ons) and usage-based fees are earned when billed. Their service period is effectively a single instant. Map them to items with a point-in-time rule so revenue is recognized in full on the invoice date.`]}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The recognition behavior is determined by the rule on the mapped NetSuite item, not by Lago. Use the `,_jsx(_components.a,{href:`#configure-the-mappings`,children:`Item Mapping`}),` to send each Lago object to an item that carries the correct rev rec rule.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`conceptual-flow`,children:`Conceptual flow`}),`\n`,_jsx(Mermaid,{chart:`flowchart TD\n A[Lago fee\u003cbr/>service period: start to end] --> B[NetSuite invoice line\u003cbr/>custcol_service_period_date_from\u003cbr/>custcol_service_period_date_to]\n B --> C{Mapped NetSuite item\u003cbr/>rev rec rule}\n C -->|Ratable rule| D[Revenue arrangement\u003cbr/>start and end sourced from the line dates]\n C -->|Point-in-time rule| E[Revenue arrangement\u003cbr/>recognized on invoice date]\n D --> F[Scheduled recognition\u003cbr/>straight-line over the service period]\n E --> G[Full recognition\u003cbr/>at point of sale]`}),`\n`,_jsx(_components.p,{children:`The diagram below shows the same path for a single subscription line recognized over its term.`}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant L as Lago\n participant N as NetSuite invoice line\n participant I as NetSuite item (rev rec rule)\n participant R as Revenue arrangement\n L->>N: Sync fee with service period (Jan 1 to Mar 31)\n N->>I: Line carries from/to dates\n I->>R: Apply ratable rule, source start/end from line\n R-->>R: Schedule Jan, Feb, Mar recognition\n Note over R: Revenue recognized straight-line across the service period`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"NetSuite","description":"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.","href":"/integrations/accounting/netsuite"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Setup","slug":"setup","depth":2,"children":[{"title":"Install the Lago bundle","slug":"install-the-lago-bundle","depth":3,"children":[]},{"title":"Set up token-based authentication","slug":"set-up-token-based-authentication","depth":3,"children":[]},{"title":"Add your Lago API key","slug":"add-your-lago-api-key","depth":3,"children":[]},{"title":"Create the Lago Configuration record","slug":"create-the-lago-configuration-record","depth":3,"children":[]},{"title":"Fetch your Lago catalog","slug":"fetch-your-lago-catalog","depth":3,"children":[]},{"title":"Configure the mappings","slug":"configure-the-mappings","depth":3,"children":[]}]},{"title":"Syncs","slug":"syncs","depth":2,"children":[{"title":"Customers synchronization","slug":"customers-synchronization","depth":3,"children":[]},{"title":"Invoices synchronization","slug":"invoices-synchronization","depth":3,"children":[]},{"title":"Optional: grouped charge lines","slug":"optional-grouped-charge-lines","depth":4,"children":[]},{"title":"Credit Notes synchronization","slug":"credit-notes-synchronization","depth":3,"children":[]},{"title":"Payments synchronization","slug":"payments-synchronization","depth":3,"children":[]},{"title":"Reliability and reconciliation","slug":"reliability-and-reconciliation","depth":3,"children":[]},{"title":"Integration logs","slug":"integration-logs","depth":3,"children":[]}]},{"title":"Building revenue recognition rules in NetSuite from Lago line items","slug":"building-revenue-recognition-rules-in-netsuite-from-lago-line-items","depth":2,"children":[{"title":"How Lago line items carry the service period","slug":"how-lago-line-items-carry-the-service-period","depth":3,"children":[]},{"title":"Ratable vs. point-in-time","slug":"ratable-vs-point-in-time","depth":3,"children":[]},{"title":"Conceptual flow","slug":"conceptual-flow","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/lago-docs/a0e77058367d9146/canonical.js","/docs/_mintlify/custom/lago-docs/fa2446312177e9c6/loader.js","/docs/_mintlify/custom/lago-docs/c55d8403f7fc83ad/changelog-anchor-redirect.js","/docs/_mintlify/custom/lago-docs/8c326c8b67b47933/changelog-month-nav.js","/docs/_mintlify/custom/lago-docs/103c90943d27f62a/webmcp.js","/docs/_mintlify/custom/lago-docs/1219fb859e5c496e/github-outbound.js"],"subdomain":"lago-docs","siteName":"Lago","title":"NetSuite - Lago","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T11:53:55.192Z","originalFileLocation":"integrations/accounting/netsuite.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\">\u003cmeta data-mint-head name=\"keywords\" content=\"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lago\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"NetSuite - Lago\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lago\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://getlago.com/docs/integrations/accounting/netsuite\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Official+integrations\u0026amp;title=NetSuite\u0026amp;description=Sync+your+Lago+billing+data+to+NetSuite+in+real+time%2C+invoices%2C+credit+notes+and+payments+included.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=38fe4d0bbc2426008a8c98c8adea1fcc5dd7201b7a197253577b203de1e5e0c7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"NetSuite - Lago\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Official+integrations\u0026amp;title=NetSuite\u0026amp;description=Sync+your+Lago+billing+data+to+NetSuite+in+real+time%2C+invoices%2C+credit+notes+and+payments+included.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=38fe4d0bbc2426008a8c98c8adea1fcc5dd7201b7a197253577b203de1e5e0c7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lago\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006CFA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://getlago.com/docs/integrations/accounting/netsuite\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/integrations/accounting/netsuite.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://getlago.com/#organization\",\"name\":\"Lago\",\"legalName\":\"Get Lago Corp.\",\"url\":\"https://getlago.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://getlago.com/docs/logo/light.svg\"},\"sameAs\":[\"https://github.com/getlago\",\"https://www.linkedin.com/company/getlago\",\"https://x.com/GetLago\",\"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA\"]},{\"@type\":\"WebSite\",\"@id\":\"https://getlago.com/docs#website\",\"name\":\"Lago\",\"url\":\"https://getlago.com/docs\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://getlago.com/docs/integrations/accounting/netsuite#webpage\",\"url\":\"https://getlago.com/docs/integrations/accounting/netsuite\",\"name\":\"NetSuite\",\"description\":\"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\",\"dateModified\":\"2026-10-26T11:53:55.192Z\",\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://getlago.com/docs/integrations/accounting/netsuite#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://getlago.com/docs/integrations/accounting/netsuite#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://getlago.com/docs/integrations/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Official integrations\",\"item\":\"https://getlago.com/docs/integrations/payments/stripe/payments\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"NetSuite\",\"item\":\"https://getlago.com/docs/integrations/accounting/netsuite\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://getlago.com/docs/integrations/accounting/netsuite#article\",\"headline\":\"NetSuite\",\"name\":\"NetSuite\",\"description\":\"Sync your Lago billing data to NetSuite in real time, invoices, credit notes and payments included.\",\"url\":\"https://getlago.com/docs/integrations/accounting/netsuite\",\"mainEntityOfPage\":{\"@id\":\"https://getlago.com/docs/integrations/accounting/netsuite#webpage\"},\"dateModified\":\"2026-10-26T11:53:55.192Z\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"},\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lago\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lago\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/integrations/accounting/netsuite.md","siteName":"Lago","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/welcome"}]},{"tab":"Guide","pages":[{"title":"Guide","href":"/guide/introduction/welcome-to-lago"}]},{"tab":"API References","pages":[{"title":"API References","href":"/api-reference/intro"}]},{"tab":"Integrations","groups":[{"group":"Integrations","pages":[{"title":"Introduction","href":"/integrations/introduction"},{"group":"Official integrations","pages":[{"group":"Stripe","pages":[{"title":"Payments","href":"/integrations/payments/stripe/payments"},{"title":"Shared Payment Tokens","href":"/integrations/payments/stripe/shared-payment-tokens"}]},{"title":"GoCardless","href":"/integrations/payments/gocardless-integration"},{"title":"Adyen","href":"/integrations/payments/adyen-integration"},{"title":"Segment","href":"/integrations/usage/segment"},{"title":"Hightouch","description":"Sync usage data from Hightouch to Lago to bill on it.","href":"/integrations/usage/hightouch"},{"title":"NetSuite","href":"/integrations/accounting/netsuite"},{"title":"Xero","description":"Sync your Lago billing data to Xero in real time.","href":"/integrations/accounting/xero"},{"title":"Lago EU Taxes","href":"/integrations/taxes/lago-eu-taxes"},{"title":"Lago Data Pipeline","href":"/integrations/data/lago-data-pipeline"},{"title":"Anrok","href":"/integrations/taxes/anrok"},{"title":"Avalara","href":"/integrations/taxes/avalara"},{"title":"Salesforce CRM","href":"/integrations/crm/salesforce-crm"},{"title":"Salesforce CPQ","href":"/integrations/crm/salesforce-cpq"},{"title":"HubSpot","href":"/integrations/crm/hubspot"},{"title":"AWS Marketplace","href":"/integrations/marketplaces/aws-marketplace"},{"title":"Azure Marketplace","href":"/integrations/marketplaces/azure-marketplace"},{"title":"GCP Marketplace","href":"/integrations/marketplaces/gcp-marketplace"},{"title":"Zapier","href":"/integrations/alerting/zapier"},{"title":"n8n","href":"/integrations/alerting/n8n"}]},{"group":"Community integrations","pages":[{"title":"Airbyte (ETL)","href":"/integrations/data/airbyte"},{"title":"Polytomic (ETL)","href":"/integrations/data/polytomic"},{"title":"Cashfree Payments","href":"/integrations/payments/cashfree-integration"},{"title":"MoneyHash","href":"/integrations/payments/moneyhash-integration"},{"title":"Oso","href":"/integrations/entitlements/osohq"},{"title":"QuickBooks","href":"/integrations/accounting/quickbooks"}]}]}]},{"tab":"Templates","pages":[{"title":"Templates","href":"/templates/introduction"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/about-lago"}]},{"tab":"Knowledge Base","href":"https://knowledge.getlago.com"},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/product"}]}]},"basePath":"","title":"NetSuite - Lago","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BI-0LlZX.js","DynamicMarkdown-JYyBNlrJ.js","zoom-image-lightbox-hIK1nklX.js","lightbox-handle-r17bVUz3.js"]}