Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they’re connected.
The onboarding page your customer sees, with your app's name.
Add the “Connect to QuickBooks” button
1
Create the connection
When your customer clicks the button, create a connection for them. Name it after their company, and
pass the webhook_url QuBe Sync tells when they’re connected.Store the connection’s id against the customer’s account. You’ll use it for every request. Until it’s
connected, show the account as waiting for QuickBooks. In a production app, the call is refused with
402billing_required until your organization has billing (Going live).
If your app runs workflows, create its connections with "type": "realtime": a workflow run on a
standard connection is refused with realtime_required (see
Workflows run on realtime connections), and the API
can’t change a connection’s type afterwards.Realtime connections are billed at a higher rate; see pricing.Every connection’s Web Connector is set to run every 10 seconds, and QuBe Sync tells a standard connection’s
to wait, so its Last Result often reads “Update postponed by application”. That’s normal. Your customer
shouldn’t change the “Every Min” field (leave it blank) in the Web Connector, no matter which type is chosen. This also lets you switch a
connection’s type later without installing a new QWC file.
2
Send them to onboarding
Redirect the browser to the connection’s links.onboarding. Ask your customer to do this on the
Windows computer where QuickBooks is installed. If they use a QuickBooks server, that machine is best.If they open it somewhere else, like a phone, a Mac or another PC, the page shows them a short code. They
enter it at qubesync.com/go on the QuickBooks computer and carry on there, so your app doesn’t need to handle
that case.
Opened on the wrong computer, the page shows a code to enter on the QuickBooks computer.
3
Know when they're connected
When the Web Connector checks in for the first time, QuBe Sync POSTs connection.connected to the
connection’s webhook_url. That’s your signal to mark the account
connected and start syncing.
Find the account by connection.id, the id you saved. The same URL hears the rest of the connection’s
events (Connection events has them all):
Event
What happened
What your app does
connection.connected
The Web Connector checked in for the first time.
Marks the account connected.
connection.setup_cancelled
Your customer chose “Cancel setup” on the onboarding page.
Offers the button again.
connection.company_file_changed
Your customer chose “Use a different company file” on the onboarding page.
Sets aside the QuickBooks ids stored for the connection, waits for QuickBooks again, then checks them on the new file.
connection.stalled
Your requests have waited too long, say on a computer that’s off, or with QuickBooks closed when the app wasn’t allowed to start it.
Tells your customer what to do.
connection.resumed
After a stall, they’re being taken again.
Clears that.
The setup ends on the QuickBooks computer, which usually isn’t signed in to your app, and with a setup
code it isn’t even the computer where they clicked Connect. So the onboarding page doesn’t send them
back to your app: when it’s done, it tells them QuickBooks is connected and that they can close it. The
webhook is how your app knows. Nothing has to wait for it: runs you start before the Web Connector
connects wait in the queue.An onboarding link lasts 48 hours. One opened after that tells your customer to start again from your
app, which regenerates the link when they
click the button. A simulated connection is connected as it’s made, so its connection.connected
comes as soon as POST /connections returns: test your handler with one.
# Qube.api is the small client in Making requests. Route:# post "quickbooks/connect", to: "quickbooks_connections#create"## Behind your sign-in, as ApplicationController is: create keeps the# connection on the signed-in customer's account.class QuickbooksConnectionsController < ApplicationController # POST /quickbooks/connect, from a "Connect QuickBooks Desktop" # button. Best clicked on the computer where QuickBooks is installed. # Until connection.connected comes, show the account as waiting for # QuickBooks: the setup doesn't come back here. def create # Where QuBe Sync says it's connected (connection.connected). webhook_url = ENV.fetch("QUBE_WEBHOOK_URL") connection_id = saved_connection_id if connection_id # Connected before: the same connection, its webhook URL brought # up to date, with a fresh link. Qube.api( :put, "/connections/#{connection_id}", { webhook_url: webhook_url } ) connection = Qube.api( :post, "/connections/#{connection_id}/onboarding-url" ) else connection = Qube.api( :post, "/connections", { name: current_account.name, webhook_url: webhook_url } ) save_connection_id(connection["id"]) end onboarding = connection.dig("links", "onboarding") redirect_to onboarding, allow_other_host: true end private # Where your app keeps the connection id: on the customer's account. # Every request and run for them goes to it. def saved_connection_id current_account.qube_connection_id end def save_connection_id(connection_id) current_account.update!(qube_connection_id: connection_id) endend
// qube is the small client in Making requests. Mount the router after// your sign-in middleware:// app.use(requireSignIn); // yours// app.use(quickbooksConnect);const express = require("express");// Behind your sign-in: connect keeps the connection on the signed-in// customer's account.const quickbooksConnect = express.Router();// POST /quickbooks/connect, from a "Connect QuickBooks Desktop" button.// Best clicked on the computer where QuickBooks is installed. Until// connection.connected comes, show the account as waiting for// QuickBooks: the setup doesn't come back here.quickbooksConnect.post("/quickbooks/connect", connect);async function connect(req, res, next) { try { // Where QuBe Sync says it's connected (connection.connected). const webhookUrl = process.env.QUBE_WEBHOOK_URL; const connectionId = await savedConnectionId(req); let connection; if (connectionId) { // Connected before: the same connection, its webhook URL brought // up to date, with a fresh link. await qube("PUT", `/connections/${connectionId}`, { webhook_url: webhookUrl, }); connection = await qube( "POST", `/connections/${connectionId}/onboarding-url`, ); } else { connection = await qube("POST", "/connections", { name: req.account.name, webhook_url: webhookUrl, }); await saveConnectionId(req, connection.id); } res.redirect(connection.links.onboarding); } catch (err) { next(err); }}// Where your app keeps the connection id: on the customer's account.// Every request and run for them goes to it.async function savedConnectionId(req) { return req.account.qubeConnectionId;}async function saveConnectionId(req, connectionId) { await req.account.update({ qubeConnectionId: connectionId });}module.exports = { quickbooksConnect };
Keep an eye on the connection
Showing your customer their connection status can help them self-diagnose why they’re still waiting on a request.When their web connector hasn’t been heard from, the
connection’s webhook_url receives connection.stalled (and connection.resumed once it’s polling again; see Connection events). Its connection.stall_reason tells you what
to tell your customer. not_checking_in means the Web Connector hasn’t checked in when it was due (by the
longer of 15 minutes and twice its schedule), so turn on the QuickBooks computer and check the Web Connector. quickbooks_unavailable means it is checking in but can’t reach QuickBooks (when the app was allowed to run with QuickBooks closed, the Web Connector opens it itself, so this usually means a dialog or the wrong company file), so open QuickBooks with the correct
company file.
Setting a connection up again
If QuickBooks moves to another computer, or your customer’s Web Connector entry was removed, send them to the
connection’s onboarding link again (regenerate it
if it’s more than 48 hours old). The page tells them the connection is already set up, and offers Set up again.Choosing it changes the connection’s password at once, so the old Web Connector entry is turned away
(“Invalid password for username”). Until the new setup is done, requests wait and last_connected_at stays
at the old entry’s last check-in. When the new entry checks in, the webhook_url hears connection.connected
again, with connection.setup set to again.
Using a different company file
A connection stays with the first company file the Web Connector opens for it: a request from another file
waits as retryable, with a user_message saying so. When your customer
really is moving to another file (a new file after a year-end rebuild, a restored copy, a file renamed or moved, or the wrong file
picked at setup), the same onboarding link offers Use a different company file beside Set up
again. The connection’s links.company_file opens that page directly. It carries the onboarding link’s token, so it expires with it, and
regenerating the onboarding URL renews both.
It’s null for a simulated connection.The page shows any pending work on the old company file and lets them wait for it to finish or switch
immediately.Make sure your connection has a webhook_url so it will be notified about the changes.Switching does what Set up again does, and the connection also forgets its company file: the first
request after the new setup learns the one that’s open. It:
sends connection.company_file_changed to the connection’s webhook_url. The QuickBooks ids you stored
for the connection (list_id, txn_id, edit_sequence) are the old file’s, so stop using them. The new
file is often the same company, renamed, moved or copied, and keeps most of them: once the connection is
connected again, query the new file by those ids, keep each it finds under the same name (with its new
edit_sequence), ask your customer about each it finds under another name, and treat the rest as
not in QuickBooks;
ends your requests still waiting with error, each with its webhook, and cancels the connection’s live
workflow runs (workflow_run.cancelled). They were written for the old file. Requests the Web Connector
had already taken finish there if it sends them; any it stops without sending end with error too;
sends connection.connected, with connection.setup set to again, once the new setup checks in.
When a customer leaves
Delete the connection and ask your customer to remove
your app from their Web Connector (select it, then Remove).Until your app is removed, the Web Connector keeps checking in on its own.
Build your own onboarding
If you’d rather keep your customer inside your app, skip links.onboarding and give them the two things
the Web Connector needs yourself:
1
The QWC file
POST /connections/{id}/qwc returns it. Offer it as
a download. QuickBooks has to be open with the company file when they add it. A company file takes a
connection’s setup file once: adding one again is refused with QBWC1039 until the first is cleared, so
beside the download, link
Common problems
for the customer who sees that.
2
A password
POST /connections/{id}/password
generates one, or sets one you choose. They paste it into the Web Connector after adding the QWC file.
Tell them to leave Auto-Run ticked and not to change the schedule (the Every Min column, which is
blank for a QuBe Sync entry). QuBe Sync decides how often a connection checks in, so editing it only breaks that.The connection is live when its webhook_url hears connection.connected, the moment last_connected_at is set.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"QuBe Sync","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/qubesync/gN_APnIajnQKnywV/logo/full-light.png?fit=max\u0026auto=format\u0026n=gN_APnIajnQKnywV\u0026q=85\u0026s=0690db6248367802891c15bad08ae9e9","dark":"https://mintcdn.com/qubesync/gN_APnIajnQKnywV/logo/full-dark.png?fit=max\u0026auto=format\u0026n=gN_APnIajnQKnywV\u0026q=85\u0026s=49fb7c4ae5cb86868e1d029c62580428"},"favicon":{"light":"https://mintcdn.com/qubesync/gN_APnIajnQKnywV/favicon.ico?fit=max\u0026auto=format\u0026n=gN_APnIajnQKnywV\u0026q=85\u0026s=ecfae754138bc13cdcb4d589ad584c71","dark":"https://mintcdn.com/qubesync/gN_APnIajnQKnywV/favicon.ico?fit=max\u0026auto=format\u0026n=gN_APnIajnQKnywV\u0026q=85\u0026s=ecfae754138bc13cdcb4d589ad584c71"},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://qubesync.com/app"}},"footer":{"socials":{"github":"https://github.com/qubeintegrations","linkedin":"https://linkedin.com/company/qube-integrations"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"QuBe Sync Slack","icon":"slack","href":"https://qubeintegrations.slack.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qubesync","hasAudioNarration":false,"actualSubdomain":"qubesync","customDomains":["docs.qubesync.com"],"gitSource":{"type":"github","owner":"qubeintegrations","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0a00762db098fe84101b48","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"API Reference","count":332},{"language":"default","tag":"API v2","count":308},{"language":"default","tag":"Workflows","count":30},{"language":"default","tag":"API v1 (legacy)","count":23},{"language":"default","tag":"Guides","count":19},{"language":"default","tag":"Connections","count":19},{"language":"default","tag":"Pre-built Queries","count":12},{"language":"default","tag":"Queued Requests","count":9},{"language":"default","tag":"Build your integration","count":6},{"language":"default","tag":"Data Ext Defs","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"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},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[data-badge=\"true\"]{white-space:nowrap}[data-badge=\"true\"] code{background:none;border:0;border-radius:0;padding:0}.qube-request{--qr-frame: rgb(243 247 245);--qr-border: rgb(10 15 12 / 0.1);--qr-panel: #fff;--qr-title: rgb(63 67 64);--qr-button: rgb(112 116 114);--qr-button-hover: rgb(63 67 64);--qr-hover: rgb(229 231 235 / 0.5);--qr-focus: rgb(var(--primary));--qr-ink: #1f2328;--qr-method: #0550ae;--qr-muted: #6e7781;--qr-param: #8250df;--qr-key: #116329;--qr-string: #0a3069;--qr-number: #0550ae;--qr-literal: #0550ae;--qr-mono: paperMono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;min-width:0;max-width:100%;margin:1.25rem 0 2rem;padding:2px;border:1px solid var(--qr-border);border-radius:1rem;background:var(--qr-frame)}.dark .qube-request{--qr-frame: rgb(255 255 255 / 0.05);--qr-border: rgb(255 255 255 / 0.1);--qr-panel: rgb(11 12 14);--qr-title: rgb(206 211 208);--qr-button: rgb(159 163 160);--qr-button-hover: rgb(206 211 208);--qr-hover: rgb(55 65 81 / 0.7);--qr-focus: rgb(var(--primary-light));--qr-ink: #d4d4d4;--qr-method: #569cd6;--qr-muted: #808080;--qr-param: #c586c0;--qr-key: #9cdcfe;--qr-string: #ce9178;--qr-number: #b5cea8;--qr-literal: #569cd6}.qube-request-head{display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.625rem 0.25rem 1rem;font-size:0.75rem;font-weight:500;line-height:1.5rem}.qube-request-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--qr-title)}.qube-request-copy{display:inline-flex;flex:none;align-items:center;gap:0.375rem;height:1.625rem;padding:0 0.375rem;border:0;border-radius:0.5rem;background:transparent;font:inherit;color:var(--qr-button);cursor:pointer}.qube-request-copy:hover{background:var(--qr-hover);color:var(--qr-button-hover)}.qube-request-copy:focus-visible{outline:1px solid var(--qr-focus);outline-offset:0}.qube-request-code{margin:0;padding:0.875rem 1rem;overflow-x:auto;border-radius:14px;background:var(--qr-panel);font-family:var(--qr-mono);font-size:0.875rem;line-height:1.5rem;color:var(--qr-ink)}.qube-request-code code{display:block;padding:0;background:none;font:inherit;color:inherit;white-space:pre}.qube-request-method{font-weight:600;color:var(--qr-method)}.qube-request-prefix{color:var(--qr-muted)}.qube-request-param{color:var(--qr-param)}.qube-request-key{color:var(--qr-key)}.qube-request-string{color:var(--qr-string)}.qube-request-number{color:var(--qr-number)}.qube-request-literal{color:var(--qr-literal)}.qube-points{margin:0.5rem 0 1.5rem}.qube-point{display:flex;gap:1rem;padding:1.125rem 0;border-bottom:1px solid rgb(10 15 12 / 0.1)}.qube-point:last-child{border-bottom:0}.dark .qube-point{border-color:rgb(255 255 255 / 0.1)}.qube-point>svg{flex:none;margin-top:0.25rem}.qube-point>div{min-width:0}.qube-point [data-as=\"p\"]{display:block;margin:0}.qube-point [data-as=\"p\"]+[data-as=\"p\"]{margin-top:0.125rem}"}]}
{"page":{"pagePath":"onboarding","slug":"/onboarding","pageMetadata":{"title":"Connect your customers","description":"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they're connected.","icon":"plug","href":"/onboarding"},"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: \"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they’re connected.\"\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];const Request=({method=`GET`,path,query,body,file,label,auth=true})=>{const[copied,setCopied]=useState(false);const WIDTH=80;const BASE=`https://qubesync.com`;const inline=v=>{if(Array.isArray(v))return`[`+v.map(inline).join(`, `)+`]`;if(v!==null\u0026\u0026typeof v===`object`){return`{`+Object.entries(v).map(([k,x])=>JSON.stringify(k)+`: `+inline(x)).join(`, `)+`}`}return JSON.stringify(v)};const fmt=(v,col,lead,force)=>{const flat=inline(v);if(!force\u0026\u0026lead+flat.length+1\u003c=WIDTH)return flat;const pad=` `.repeat(col+2);if(Array.isArray(v)\u0026\u0026v.length){const rows=v.map((x,i)=>pad+fmt(x,col+2,pad.length)+(i\u003cv.length-1?`,`:``));return[`[`,...rows,` `.repeat(col)+`]`].join(`\n`)}if(v!==null\u0026\u0026typeof v===`object`\u0026\u0026Object.keys(v).length){const entries=Object.entries(v);const rows=entries.map(([k,x],i)=>{const key=pad+JSON.stringify(k)+`: `;return key+fmt(x,col+2,key.length)+(i\u003centries.length-1?`,`:``)});return[`{`,...rows,` `.repeat(col)+`}`].join(`\n`)}return flat};const formatJson=(v,col,lead)=>fmt(v,col,lead,!(v!==null\u0026\u0026typeof v===`object`\u0026\u0026!Array.isArray(v)\u0026\u0026Object.keys(v).length===1));const dedent=text=>{const[first,...rest]=text.split(`\n`);const indents=rest.filter(l=>l.trim()).map(l=>l.match(/^ */)[0].length);const cut=indents.length?Math.min(...indents):0;return[first,...rest.map(l=>l.slice(Math.min(cut,l.match(/^ */)[0].length)))].join(`\n`)};const requestParts=({method=`GET`,path,query,body,file,auth=true})=>{const params=Object.entries(query||{});const queryString=params.map(([k,v])=>k+`=`+v).join(`\u0026`);const hasBody=body!==undefined\u0026\u0026body!==null;const shown=!hasBody?``:typeof body===`string`?dedent(body):formatJson(body,0,0);const env=name=>`$`+(name===`connection_id`?`CONN_ID`:name.toUpperCase());const url=BASE+path.replace(/\\{(\\w+)\\}/g,(_,name)=>env(name));const getWithParams=method===`GET`\u0026\u0026params.length>1;const lines=auth?[`-u \"$QUBE_API_KEY:\"`]:[];if(getWithParams)lines.push(`-G`);if(method!==`GET`)lines.push(`-X `+method);lines.push(`\"`+(params.length\u0026\u0026!getWithParams?url+`?`+queryString:url)+`\"`);if(getWithParams)params.forEach(([k,v])=>lines.push(`--data-urlencode \"`+k+`=`+v+`\"`));if(hasBody){lines.push(`-H \"Content-Type: application/json\"`);const text=typeof body===`string`?dedent(body):formatJson(body,2,2+4);lines.push(file?`-d @`+file:`-d '`+text+`'`)}const curl=`curl `+lines.join(` \\\\\n `);const http=method+` `+path+(queryString?`?`+queryString:``)+(hasBody?`\n\n`+shown:``);return{params,queryString,hasBody,shown,curl,http}};const{params,hasBody,shown,curl}=requestParts({method,path,query,body,file,auth});const title=label||`Request`;const copy=()=>{const text=curl;const done=()=>{setCopied(true);setTimeout(()=>setCopied(false),2e3)};if(navigator.clipboard\u0026\u0026navigator.clipboard.writeText){navigator.clipboard.writeText(text).then(done,()=>{});return}const area=document.createElement(`textarea`);area.value=text;document.body.appendChild(area);area.select();document.execCommand(`copy`);document.body.removeChild(area);done()};const prefix=path.startsWith(`/api/v2`)?`/api/v2`:``;const pathParts=path.slice(prefix.length).split(/(\\{\\w+\\})/).map((part,i)=>/^\\{\\w+\\}$/.test(part)?_jsx(`span`,{className:`qube-request-param`,children:part},i):part);const valueClass=v=>typeof v===`number`?`qube-request-number`:typeof v===`boolean`?`qube-request-literal`:`qube-request-string`;const json=text=>{const out=[];const re=/(\"(?:\\\\.|[^\"\\\\])*\")(\\s*:)?|\\b(true|false|null)\\b|(-?\\d+(?:\\.\\d+)?)|(\\{\\.\\.\\.\\})/g;let last=0;let m;while(m=re.exec(text)){if(m.index>last)out.push(text.slice(last,m.index));const cls=m[1]?m[2]?`qube-request-key`:`qube-request-string`:m[3]?`qube-request-literal`:m[4]?`qube-request-number`:`qube-request-literal`;out.push(_jsx(`span`,{className:cls,children:m[1]?m[1]:m[0]},m.index));if(m[2])out.push(m[2]);last=m.index+m[0].length}if(last\u003ctext.length)out.push(text.slice(last));return out};const queryParts=params.length?[`?`,...params.flatMap(([k,v],i)=>[i?`\u0026`:``,_jsx(`span`,{className:`qube-request-key`,children:k},k+`-key`),`=`,_jsx(`span`,{className:valueClass(v),children:String(v)},k+`-value`)])]:null;return _jsxs(`div`,{className:`qube-request not-prose`,children:[_jsxs(`div`,{className:`qube-request-head`,children:[_jsx(`span`,{className:`qube-request-title`,title,children:title}),_jsxs(`button`,{type:`button`,className:`qube-request-copy`,onClick:copy,\"aria-live\":`polite`,children:[_jsx(`svg`,{width:`16`,height:`16`,viewBox:`0 0 18 18`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,\"aria-hidden\":`true`,children:copied?_jsx(`polyline`,{points:`4 9.5 7.5 13 14 5`}):_jsxs(`g`,{children:[_jsx(`rect`,{x:`6.5`,y:`6.5`,width:`9`,height:`9`,rx:`2`}),_jsx(`path`,{d:`M3.5 11.5v-6a2 2 0 0 1 2-2h6`})]})}),copied?`Copied`:`Copy as curl`]})]}),_jsx(`pre`,{className:`qube-request-code`,children:_jsxs(`code`,{children:[_jsx(`span`,{className:`qube-request-method`,children:method}),` `,prefix?_jsx(`span`,{className:`qube-request-prefix`,children:prefix}):null,pathParts,queryParts,hasBody?[`\n\n`,...json(shown)]:null]})})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Badge,CodeBlock,CodeGroup,Frame,Heading,OptimizedImage,Step,Steps,Table,Visibility,_MdxComponentBoundary}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Visibility)_missingMdxReference(`Visibility`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Frame,{caption:`The onboarding page your customer sees, with your app's name.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=40e785f863388479d89dcb647b199c93`,alt:`The onboarding page for My App Dev: step 1, Get QuickBooks ready, done, and step 2, Add My App Dev to the Web Connector, open with Download setup file and the Web Connector's two prompts, each a screenshot beside the answer to give`,\"data-og-width\":`3072`,width:`3072`,\"data-og-height\":`3148`,height:`3148`,\"data-path\":`images/quickstart/onboarding-ready.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=280\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=56c0106137b57fb669d8d870e54fc091 280w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=560\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=240fd5627d8201790f11ccc5f7290da6 560w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=840\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=e3e91f9d0187a6f85275ce1e56f249b3 840w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=1100\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=9ea343467679478a6a33b01e0345f3fc 1100w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=1650\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=4fbaf6df21d4e6c35fbdb5e7b7445e4c 1650w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-ready.png?w=2500\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=051c1173f7c8eeb07ca7ba579f935e6b 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`add-the-“connect-to-quickbooks”-button`,children:`Add the “Connect to QuickBooks” button`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Create the connection`,children:[_jsxs(_components.p,{children:[`When your customer clicks the button, create a connection for them. Name it after their company, and\npass the `,_jsx(_components.code,{children:`webhook_url`}),` QuBe Sync tells when they’re connected.`]}),_jsx(_MdxComponentBoundary,{name:`Request`,children:_jsx(Request,{method:`POST`,path:`/api/v2/connections`,body:{name:`Riverbend Electric`,webhook_url:`https://your-app.example/webhooks/qube`}})}),_jsxs(Visibility,{for:`agents`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v2/connections`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Riverbend Electric\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://your-app.example/webhooks/qube\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -u`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$QUBE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://qubesync.com/api/v2/connections\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Riverbend Electric\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"webhook_url\": \"https://your-app.example/webhooks/qube\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(_components.p,{children:[`Store the connection’s `,_jsx(_components.code,{children:`id`}),` against the customer’s account. You’ll use it for every request. Until it’s\nconnected, show the account as waiting for QuickBooks. In a production app, the call is refused with\n`,_jsx(_components.code,{children:`402`}),` `,_jsx(_components.code,{children:`billing_required`}),` until your organization has billing (`,_jsx(_components.a,{href:`/going-live`,children:`Going live`}),`).`]}),_jsxs(Accordion,{title:`Standard or realtime?`,id:`standard-or-realtime`,children:[_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`type`}),` when you create the connection:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.th,{children:`Picks up requests`}),_jsx(_components.th,{children:`Best for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`standard`}),` (default)`]}),_jsx(_components.td,{children:`Every 5 minutes`}),_jsx(_components.td,{children:`Background syncing`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`realtime`})}),_jsx(_components.td,{children:`Every 10 seconds`}),_jsxs(_components.td,{children:[`Interactive UIs, where time matters, `,_jsx(_components.a,{href:`/workflows`,children:`workflows`}),` and `,_jsx(_components.a,{href:`/matching`,children:`name matching`})]})]})]})]}),_jsxs(_components.p,{children:[`If your app runs workflows, create its connections with `,_jsx(_components.code,{children:`\"type\": \"realtime\"`}),`: a workflow run on a\nstandard connection is refused with `,_jsx(_components.code,{children:`realtime_required`}),` (see\n`,_jsx(_components.a,{href:`/workflows#workflows-run-on-realtime-connections`,children:`Workflows run on realtime connections`}),`), and the API\ncan’t change a connection’s type afterwards.`]}),_jsxs(_components.p,{children:[`Realtime connections are billed at a higher rate; see `,_jsx(_components.a,{href:`https://qubesync.com/#pricing`,children:`pricing`}),`.`]}),_jsxs(_components.p,{children:[`Every connection’s Web Connector is set to run every 10 seconds, and QuBe Sync tells a standard connection’s\nto wait, so its `,_jsx(_components.strong,{children:`Last Result`}),` often reads “Update postponed by application”. That’s normal. Your customer\nshouldn’t change the “Every Min” field (leave it blank) in the Web Connector, no matter which type is chosen. This also lets you switch a\nconnection’s type later without installing a new QWC file.`]})]})]}),_jsxs(Step,{title:`Send them to onboarding`,children:[_jsxs(_components.p,{children:[`Redirect the browser to the connection’s `,_jsx(_components.code,{children:`links.onboarding`}),`. Ask your customer to do this on the\nWindows computer where QuickBooks is installed. If they use a QuickBooks server, that machine is best.`]}),_jsx(_components.p,{children:`If they open it somewhere else, like a phone, a Mac or another PC, the page shows them a short code. They\nenter it at qubesync.com/go on the QuickBooks computer and carry on there, so your app doesn’t need to handle\nthat case.`}),_jsx(Frame,{caption:`Opened on the wrong computer, the page shows a code to enter on the QuickBooks computer.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=5c46a94f577268d4317fb9dc5beae2b1`,alt:`A card headed Open this on the QuickBooks computer: on that computer, go to qubesync.com/go and enter this code, an eight-character code in large type, good for 15 minutes and works once, and a Share link for setting it up later or for someone else`,\"data-og-width\":`3072`,width:`3072`,\"data-og-height\":`1300`,height:`1300`,\"data-path\":`images/quickstart/onboarding-handoff.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=280\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=78c23e3103e70ae9715712504d56c44c 280w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=560\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=75660d9d93bbc79df7a5fde860c51f94 560w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=840\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=7a3488a912882a83b999c8907a9c0370 840w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=1100\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=ea0e8627451f5b3bbb21259bda750838 1100w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=1650\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=01844281a73d7e65a0daff43d8162483 1650w, https://mintcdn.com/qubesync/0vBf1cM4bTpV_SLq/images/quickstart/onboarding-handoff.png?w=2500\u0026fit=max\u0026auto=format\u0026n=0vBf1cM4bTpV_SLq\u0026q=85\u0026s=f5532f64712ad2c3f207d75cd1c19770 2500w`})})]}),_jsxs(Step,{title:`Know when they're connected`,children:[_jsxs(_components.p,{children:[`When the Web Connector checks in for the first time, QuBe Sync POSTs `,_jsx(_components.code,{children:`connection.connected`}),` to the\nconnection’s `,_jsx(_components.code,{children:`webhook_url`}),`. That’s your signal to mark the account\nconnected and start syncing.`]}),_jsx(CodeBlock,{filename:`connection.connected`,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"connection.connected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"delivery_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0f8a6c2e-4b1d-4e7a-9c3f-2d5b8e1a7c40\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"revision\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1792350252`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"app_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"98f339a4-32e8-424a-987e-ccaf5bcaa620\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sandbox\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"connection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3f9c2a71-5d4e-4b8a-9c1f-7e2d6a5b8c90\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Riverbend Electric\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"standard\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_connected_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-18T19:04:11Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"setup\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"first\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"links\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"self\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://qubesync.com/api/v2/connections/3f9c2a71-5d4e-4b8a-9c1f-7e2d6a5b8c90\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Find the account by `,_jsx(_components.code,{children:`connection.id`}),`, the id you saved. The same URL hears the rest of the connection’s\nevents (`,_jsx(_components.a,{href:`/webhooks#connection-events`,children:`Connection events`}),` has them all):`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event`}),_jsx(_components.th,{children:`What happened`}),_jsx(_components.th,{children:`What your app does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connection.connected`})}),_jsx(_components.td,{children:`The Web Connector checked in for the first time.`}),_jsx(_components.td,{children:`Marks the account connected.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connection.setup_cancelled`})}),_jsx(_components.td,{children:`Your customer chose “Cancel setup” on the onboarding page.`}),_jsx(_components.td,{children:`Offers the button again.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connection.company_file_changed`})}),_jsx(_components.td,{children:`Your customer chose “Use a different company file” on the onboarding page.`}),_jsx(_components.td,{children:`Sets aside the QuickBooks ids stored for the connection, waits for QuickBooks again, then checks them on the new file.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connection.stalled`})}),_jsx(_components.td,{children:`Your requests have waited too long, say on a computer that’s off, or with QuickBooks closed when the app wasn’t allowed to start it.`}),_jsx(_components.td,{children:`Tells your customer what to do.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connection.resumed`})}),_jsx(_components.td,{children:`After a stall, they’re being taken again.`}),_jsx(_components.td,{children:`Clears that.`})]})]})]}),_jsx(_components.p,{children:`The setup ends on the QuickBooks computer, which usually isn’t signed in to your app, and with a setup\ncode it isn’t even the computer where they clicked Connect. So the onboarding page doesn’t send them\nback to your app: when it’s done, it tells them QuickBooks is connected and that they can close it. The\nwebhook is how your app knows. Nothing has to wait for it: runs you start before the Web Connector\nconnects wait in the queue.`}),_jsxs(_components.p,{children:[`An onboarding link lasts 48 hours. One opened after that tells your customer to start again from your\napp, which `,_jsx(_components.a,{href:`/api-reference/v2/connections/regenerate-the-onboarding-url`,children:`regenerates the link`}),` when they\nclick the button. A `,_jsx(_components.code,{children:`simulated`}),` connection is connected as it’s made, so its `,_jsx(_components.code,{children:`connection.connected`}),`\ncomes as soon as `,_jsx(_components.code,{children:`POST /connections`}),` returns: test your handler with one.`]})]})]}),`\n`,_jsxs(_components.p,{children:[`In code, using the small API helper from `,_jsx(_components.a,{href:`/making-requests#a-small-api-client`,children:`Making requests`}),`:`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Rails`,numberOfLines:`48`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`48`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Qube.api is the small client in Making requests. Route:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# post \"quickbooks/connect\", to: \"quickbooks_connections#create\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`#`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Behind your sign-in, as ApplicationController is: create keeps the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# connection on the signed-in customer's account.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` QuickbooksConnectionsController`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`ApplicationController`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # POST /quickbooks/connect, from a \"Connect QuickBooks Desktop\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # button. Best clicked on the computer where QuickBooks is installed.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Until connection.connected comes, show the account as waiting for`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # QuickBooks: the setup doesn't come back here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` create`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Where QuBe Sync says it's connected (connection.connected).`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` webhook_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ENV`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUBE_WEBHOOK_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` saved_connection_id`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` connection_id`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Connected before: the same connection, its webhook URL brought`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # up to date, with a fresh link.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` :put`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/connections/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`#{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`connection_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`webhook_url:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_url }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` :post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/connections/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`#{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`connection_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/onboarding-url\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` :post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/connections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`name:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` current_account.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`webhook_url:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` webhook_url }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` save_connection_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(connection[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` onboarding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` connection.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`dig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"links\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"onboarding\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` redirect_to onboarding, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`allow_other_host:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Where your app keeps the connection id: on the customer's account.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Every request and run for them goes to it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` saved_connection_id`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` current_account.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`qube_connection_id`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` save_connection_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connection_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` current_account.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`qube_connection_id:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` connection_id)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`end`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Express`,numberOfLines:`56`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`56`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// qube is the small client in Making requests. Mount the router after`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// your sign-in middleware:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// app.use(requireSignIn);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // yours`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// app.use(quickbooksConnect);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` express`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"express\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Behind your sign-in: connect keeps the connection on the signed-in`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// customer's account.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` quickbooksConnect`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Router`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// POST /quickbooks/connect, from a \"Connect QuickBooks Desktop\" button.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Best clicked on the computer where QuickBooks is installed. Until`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// connection.connected comes, show the account as waiting for`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// QuickBooks: the setup doesn't come back here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quickbooksConnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/quickbooks/connect\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`next`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Where QuBe Sync says it's connected (connection.connected).`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` webhookUrl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`QUBE_WEBHOOK_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` connectionId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` savedConnectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Connected before: the same connection, its webhook URL brought`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // up to date, with a fresh link.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PUT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/connections/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connectionId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhook_url:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhookUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `/connections/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connectionId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/onboarding-url`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connection`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` qube`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/connections\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` name:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhook_url:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` webhookUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` saveConnectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`redirect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`links`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`onboarding`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` next`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Where your app keeps the connection id: on the customer's account.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Every request and run for them goes to it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` savedConnectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`qubeConnectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` saveConnectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`connectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`qubeConnectionId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` connectionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`quickbooksConnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`keep-an-eye-on-the-connection`,children:`Keep an eye on the connection`}),`\n`,_jsx(_components.p,{children:`Showing your customer their connection status can help them self-diagnose why they’re still waiting on a request.`}),`\n`,_jsxs(_components.p,{children:[`When their web connector hasn’t been heard from, the\nconnection’s `,_jsx(_components.code,{children:`webhook_url`}),` receives `,_jsx(_components.code,{children:`connection.stalled`}),` (and `,_jsx(_components.code,{children:`connection.resumed`}),` once it’s polling again; see `,_jsx(_components.a,{href:`/webhooks#connection-events`,children:`Connection events`}),`). Its `,_jsx(_components.code,{children:`connection.stall_reason`}),` tells you what\nto tell your customer. `,_jsx(_components.code,{children:`not_checking_in`}),` means the Web Connector hasn’t checked in when it was due (by the\nlonger of 15 minutes and twice its schedule), so turn on the QuickBooks computer and check the Web Connector. `,_jsx(_components.code,{children:`quickbooks_unavailable`}),` means it is checking in but can’t reach QuickBooks (when the app was allowed to run with QuickBooks closed, the Web Connector opens it itself, so this usually means a dialog or the wrong company file), so open QuickBooks with the correct\ncompany file.`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-a-connection-up-again`,children:`Setting a connection up again`}),`\n`,_jsxs(_components.p,{children:[`If QuickBooks moves to another computer, or your customer’s Web Connector entry was removed, send them to the\nconnection’s onboarding link again (`,_jsx(_components.a,{href:`/api-reference/v2/connections/regenerate-the-onboarding-url`,children:`regenerate it`}),`\nif it’s more than 48 hours old). The page tells them the connection is already set up, and offers `,_jsx(_components.strong,{children:`Set up again`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Choosing it changes the connection’s password at once, so the old Web Connector entry is turned away\n(“Invalid password for username”). Until the new setup is done, requests wait and `,_jsx(_components.code,{children:`last_connected_at`}),` stays\nat the old entry’s last check-in. When the new entry checks in, the `,_jsx(_components.code,{children:`webhook_url`}),` hears `,_jsx(_components.code,{children:`connection.connected`}),`\nagain, with `,_jsx(_components.code,{children:`connection.setup`}),` set to `,_jsx(_components.code,{children:`again`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`using-a-different-company-file`,children:`Using a different company file`}),`\n`,_jsxs(_components.p,{children:[`A connection stays with the first company file the Web Connector opens for it: a request from another file\nwaits as `,_jsx(Badge,{color:`orange`,children:_jsx(_components.code,{children:`retryable`})}),`, with a `,_jsx(_components.code,{children:`user_message`}),` saying so. When your customer\nreally is moving to another file (a new file after a year-end rebuild, a restored copy, a file renamed or moved, or the wrong file\npicked at setup), the same onboarding link offers `,_jsx(_components.strong,{children:`Use a different company file`}),` beside `,_jsx(_components.strong,{children:`Set up\nagain`}),`. The connection’s `,_jsx(_components.code,{children:`links.company_file`}),` opens that page directly. It carries the onboarding link’s token, so it expires with it, and\n`,_jsx(_components.a,{href:`/api-reference/v2/connections/regenerate-the-onboarding-url`,children:`regenerating the onboarding URL`}),` renews both.\nIt’s `,_jsx(_components.code,{children:`null`}),` for a `,_jsx(_components.code,{children:`simulated`}),` connection.`]}),`\n`,_jsx(_components.p,{children:`The page shows any pending work on the old company file and lets them wait for it to finish or switch\nimmediately.`}),`\n`,_jsxs(_components.p,{children:[`Make sure your connection has a `,_jsx(_components.code,{children:`webhook_url`}),` so it will be notified about the changes.`]}),`\n`,_jsxs(_components.p,{children:[`Switching does what `,_jsx(_components.strong,{children:`Set up again`}),` does, and the connection also forgets its company file: the first\nrequest after the new setup learns the one that’s open. It:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`sends `,_jsx(_components.code,{children:`connection.company_file_changed`}),` to the connection’s `,_jsx(_components.code,{children:`webhook_url`}),`. The QuickBooks ids you stored\nfor the connection (`,_jsx(_components.code,{children:`list_id`}),`, `,_jsx(_components.code,{children:`txn_id`}),`, `,_jsx(_components.code,{children:`edit_sequence`}),`) are the old file’s, so stop using them. The new\nfile is often the same company, renamed, moved or copied, and keeps most of them: once the connection is\nconnected again, query the new file by those ids, keep each it finds under the same name (with its new\n`,_jsx(_components.code,{children:`edit_sequence`}),`), ask your customer about each it finds under another name, and treat the rest as\nnot in QuickBooks;`]}),`\n`,_jsxs(_components.li,{children:[`ends your requests still waiting with `,_jsx(_components.code,{children:`error`}),`, each with its webhook, and cancels the connection’s live\nworkflow runs (`,_jsx(_components.code,{children:`workflow_run.cancelled`}),`). They were written for the old file. Requests the Web Connector\nhad already taken finish there if it sends them; any it stops without sending end with `,_jsx(_components.code,{children:`error`}),` too;`]}),`\n`,_jsxs(_components.li,{children:[`sends `,_jsx(_components.code,{children:`connection.connected`}),`, with `,_jsx(_components.code,{children:`connection.setup`}),` set to `,_jsx(_components.code,{children:`again`}),`, once the new setup checks in.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`when-a-customer-leaves`,children:`When a customer leaves`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/v2/connections/remove-a-connection`,children:`Delete the connection`}),` and ask your customer to remove\nyour app from their Web Connector (select it, then `,_jsx(_components.strong,{children:`Remove`}),`).`]}),`\n`,_jsx(_components.p,{children:`Until your app is removed, the Web Connector keeps checking in on its own.`}),`\n`,_jsx(Heading,{level:`2`,id:`build-your-own-onboarding`,children:`Build your own onboarding`}),`\n`,_jsxs(_components.p,{children:[`If you’d rather keep your customer inside your app, skip `,_jsx(_components.code,{children:`links.onboarding`}),` and give them the two things\nthe Web Connector needs yourself:`]}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`The QWC file`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/v2/connections/get-the-qwc-file`,children:_jsx(_components.code,{children:`POST /connections/{id}/qwc`})}),` returns it. Offer it as\na download. QuickBooks has to be open with the company file when they add it. A company file takes a\nconnection’s setup file once: adding one again is refused with QBWC1039 until the first is cleared, so\nbeside the download, link\n`,_jsx(_components.a,{href:`/common-problems#unique-ownerid-fileid-pair-value-required-when-adding-the-setup-file`,children:`Common problems`}),`\nfor the customer who sees that.`]})}),_jsx(Step,{title:`A password`,children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/api-reference/v2/connections/generate-or-set-a-password`,children:_jsx(_components.code,{children:`POST /connections/{id}/password`})}),`\ngenerates one, or sets one you choose. They paste it into the Web Connector after adding the QWC file.`]})})]}),`\n`,_jsxs(_components.p,{children:[`Tell them to leave `,_jsx(_components.strong,{children:`Auto-Run`}),` ticked and not to change the schedule (the `,_jsx(_components.strong,{children:`Every Min`}),` column, which is\nblank for a QuBe Sync entry). QuBe Sync decides how often a connection checks in, so editing it only breaks that.`]}),`\n`,_jsxs(_components.p,{children:[`The connection is live when its `,_jsx(_components.code,{children:`webhook_url`}),` hears `,_jsx(_components.code,{children:`connection.connected`}),`, the moment `,_jsx(_components.code,{children:`last_connected_at`}),` is set.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{Request,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":{"config":{},"pageMetadata":{"title":"Connect your customers","description":"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they're connected.","icon":"plug","href":"/onboarding"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[143,5186,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Add the “Connect to QuickBooks” button","slug":"add-the-“connect-to-quickbooks”-button","depth":2,"children":[]},{"title":"Keep an eye on the connection","slug":"keep-an-eye-on-the-connection","depth":2,"children":[]},{"title":"Setting a connection up again","slug":"setting-a-connection-up-again","depth":2,"children":[{"title":"Using a different company file","slug":"using-a-different-company-file","depth":3,"children":[]}]},{"title":"When a customer leaves","slug":"when-a-customer-leaves","depth":2,"children":[]},{"title":"Build your own onboarding","slug":"build-your-own-onboarding","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"qubesync","siteName":"QuBe Sync","title":"Connect your customers - QuBe Sync","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-27T22:13:48.761Z","originalFileLocation":"onboarding.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=\"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they\u0026#x27;re connected.\">\u003cmeta data-mint-head name=\"application-name\" content=\"QuBe Sync\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_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=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Connect your customers - QuBe Sync\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they\u0026#x27;re connected.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"QuBe Sync\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qubesync.com/onboarding\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qubesync.mintlify.site/_mintlify/api/og/v2?division=Build+your+integration\u0026amp;title=Connect+your+customers\u0026amp;description=Add+a+%E2%80%9CConnect+QuickBooks+Desktop%E2%80%9D+button+to+your+app.+QuBe+Sync+hosts+the+setup%2C+walks+your+customer+through+the+Web+Connector%2C+and+tells+your+app+when+they%27re\u0026amp;theme=76f80789c642fbe4bb283c77\u0026amp;signature=b7c07e8df67d83297f758ee801973725aa3288d22fe166ba0ac86e98743240aa\">\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=\"Connect your customers - QuBe Sync\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they\u0026#x27;re connected.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qubesync.mintlify.site/_mintlify/api/og/v2?division=Build+your+integration\u0026amp;title=Connect+your+customers\u0026amp;description=Add+a+%E2%80%9CConnect+QuickBooks+Desktop%E2%80%9D+button+to+your+app.+QuBe+Sync+hosts+the+setup%2C+walks+your+customer+through+the+Web+Connector%2C+and+tells+your+app+when+they%27re\u0026amp;theme=76f80789c642fbe4bb283c77\u0026amp;signature=b7c07e8df67d83297f758ee801973725aa3288d22fe166ba0ac86e98743240aa\">\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=\"/mintlify-assets/_mintlify/favicons/qubesync/GrEUn7G8W5QJHTqH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"QuBe Sync\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qubesync.com/onboarding\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/onboarding.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qubesync.com/#organization\",\"name\":\"QuBe Sync\",\"url\":\"https://docs.qubesync.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qubesync/gN_APnIajnQKnywV/logo/full-light.png?fit=max\u0026auto=format\u0026n=gN_APnIajnQKnywV\u0026q=85\u0026s=0690db6248367802891c15bad08ae9e9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qubesync.com#website\",\"name\":\"QuBe Sync\",\"url\":\"https://docs.qubesync.com\",\"publisher\":{\"@id\":\"https://docs.qubesync.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qubesync.com/onboarding#webpage\",\"url\":\"https://docs.qubesync.com/onboarding\",\"name\":\"Connect your customers\",\"description\":\"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they're connected.\",\"dateModified\":\"2026-11-27T22:13:48.761Z\",\"isPartOf\":{\"@id\":\"https://docs.qubesync.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qubesync.com/onboarding#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qubesync.com/onboarding#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"QuBe Sync\",\"item\":\"https://docs.qubesync.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Connect your customers\",\"item\":\"https://docs.qubesync.com/onboarding\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qubesync.com/onboarding#article\",\"headline\":\"Connect your customers\",\"name\":\"Connect your customers\",\"description\":\"Add a “Connect QuickBooks Desktop” button to your app. QuBe Sync hosts the setup, walks your customer through the Web Connector, and tells your app when they're connected.\",\"url\":\"https://docs.qubesync.com/onboarding\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qubesync.com/onboarding#webpage\"},\"dateModified\":\"2026-11-27T22:13:48.761Z\",\"publisher\":{\"@id\":\"https://docs.qubesync.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qubesync.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"QuBe Sync\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"QuBe Sync\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/onboarding.md","siteName":"QuBe Sync","nav":{"global":{"anchors":[{"anchor":"QuBe Sync Slack","icon":"slack","href":"https://qubeintegrations.slack.com"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Get started","pages":[{"title":"Not just a modern JSON API for QuickBooks Desktop","sidebarTitle":"Introduction","icon":"house","href":""},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"How it works","description":"The handful of ideas behind every QuBe Sync integration: apps, connections, queued requests, and the Web Connector's cycle.","icon":"gears","href":"/how-it-works"}]},{"group":"Build your integration","pages":[{"title":"Connect your customers","icon":"plug","href":"/onboarding"},{"title":"Making requests","description":"Query, create, update and delete anything in QuickBooks Desktop with plain JSON. Every operation follows the same pattern.","icon":"code","href":"/making-requests"},{"title":"Webhooks","icon":"bell","href":"/webhooks"},{"title":"Auto-Pagination","icon":"layer-group","href":"/pagination"},{"title":"Matching","icon":"magnifying-glass","href":"/matching"},{"title":"Error handling","icon":"triangle-exclamation","href":"/error_handling"}]},{"group":"Workflows","pages":[{"title":"Workflows","icon":"diagram-project","href":"/workflows"},{"title":"Build your own workflow","icon":"pen-ruler","href":"/workflow-authoring"}]},{"group":"Test and launch","pages":[{"title":"Test without QuickBooks","icon":"flask","tag":"Beta","href":"/simulator"},{"title":"Go to production","icon":"flag-checkered","href":"/going-live"},{"title":"Integration checklist","icon":"list-check","href":"/integration-checklist"}]},{"group":"Tools for you and your agent","pages":[{"title":"The qube CLI","icon":"terminal","href":"/cli"},{"title":"MCP server","icon":"robot","href":"/mcp-server"}]},{"group":"Your dev environment","pages":[{"title":"Get QuickBooks for testing","icon":"desktop","href":"/nfr-quickbooks"},{"title":"Receive webhooks in development","icon":"tower-broadcast","href":"/ngrok"},{"title":"Web Connector logs","icon":"file-lines","href":"/qwc-logs"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Connect your customers - QuBe Sync","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CG7QalVD.js","DynamicMarkdown-B_9ywLDq.js","zoom-image-lightbox-uS0aI388.js","lightbox-handle-r17bVUz3.js"]}