You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.
You own checkout. doola never charges your customer, never shows them your price and never handles their card. A formation submitted in the SDK waits at AWAITING_PAYMENT, and nothing is filed until your server confirms payment.
Who controls what
You decide
doola does
Your price for the formation, and how you package it
Holds the submitted formation until you confirm payment
Your currency and your payment provider
Shows the founder the state filing fee for their state, so there are no surprises at your checkout
Discounts, bundles, trials and promotions
Files the company, gets the EIN and appoints the registered agent once you confirm
Receipts, invoices and any tax on your sale
Keeps the founder on a “payment pending” screen until then
Refunds to the founder
Refuses a confirmation for a formation it cancelled, so you know to refund
How doola bills you for SDK formations is set by your partner agreement.
The flow
Step by step
1
Open your checkout from onFormed
The founder presses Submit and pay on the last step of the wizard. doola creates the company at AWAITING_PAYMENT, and onFormed hands your page its id and nothing else.
Remove the SDK element while your checkout is open, or open the checkout on top of it. If you use the full-screen presentation on phones, removing the element also closes the overlay.onFormed fires again if the founder comes back to an unpaid formation and asks to pay, so opening a checkout for the same company twice must be safe. See Charge each company once.
2
Look the company up on your server
companyId came from the browser, where anyone can change it. Before you show a price, your server reads the company with your secret key, using Get a company, and checks two things:
It is waiting on payment. Charge only while formationSubmissionStatus is AWAITING_PAYMENT. PENDING, SUBMITTED and COMPLETED mean it is already paid. CANCELLED, FAILED and any status you don’t recognise mean it is not payable: never charge it, and never show it as paid.
It belongs to the signed-in customer. Read its owner with Get a customer, using the company’s doolaCustomerId, and compare its externalCustomerId with your signed-in user’s id. When externalCustomerId is null, compare the email with your user’s instead.
const DOOLA_API = 'https://api.test.doola.com'; // https://api.doola.com with a dk_live_ keyinterface Company { doolaCustomerId: string; entityType: 'LLC' | 'CCorp'; state: string; formationSubmissionStatus: string;}async function doola<T>(path: string): Promise<T> { const r = await fetch(`${DOOLA_API}${path}`, { headers: { authorization: process.env.DOOLA_API_KEY! }, // your dk_ secret key, no "Bearer" }); if (!r.ok) throw new Error(`doola ${path} answered ${r.status}`); return (await r.json()).payload; // every response is wrapped in { payload, error }}async function payableCompany(companyId: string, user: { id: string; email: string }) { const company = await doola<Company>(`/v1/partner/companies/${encodeURIComponent(companyId)}`); const owner = await doola<{ email: string; externalCustomerId: string | null }>( `/v1/partner/customers/${encodeURIComponent(company.doolaCustomerId)}`, ); const isOwner = owner.externalCustomerId ? owner.externalCustomerId === user.id : owner.email?.toLowerCase() === user.email.toLowerCase(); // never minted with an id // Someone else's company: answer 404, exactly as for one that does not exist. if (!isOwner) return null; const status = company.formationSubmissionStatus; if (status === 'AWAITING_PAYMENT') return { company, alreadyPaid: false }; if (['PENDING', 'SUBMITTED', 'COMPLETED'].includes(status)) return { company, alreadyPaid: true }; // CANCELLED, FAILED, or a status added after you wrote this: not payable. throw new Error(`formation ${companyId} is ${status} and cannot be paid`);}
When alreadyPaid is true, skip the charge and show the founder their company. When it throws, show an error and contact doola.externalCustomerId is the id you sent when minting the customer’s session, so it still matches after the founder changes their email on either side. It is null only for a customer never minted with one, such as one created with Create a customer or minted with an email alone, and only then does the email decide. When it is set, it decides alone: a customer whose externalCustomerId is not your user’s id is someone else’s, even if the emails match.
3
Price it on your server
Build the total from the company, never from anything the browser sends:
Your price for the formation, by entityType (LLC or CCorp) or however you package it.
The state filing fee, from List state filing fees for the company’s entityType, matched on its state. The founder already saw this amount in the wizard as “State filing fee +$X”, so show the same number.
const fees = await doola<{ state: string; priceInCents: number }[]>( `/v1/partner/references/state-fees?entityType=${company.entityType}`,);const stateFee = fees.find((fee) => fee.state === company.state);if (!stateFee) throw new Error(`no state filing fee for ${company.entityType} in ${company.state}`);const totalCents = YOUR_PRICE_CENTS[company.entityType] + stateFee.priceInCents;
If the fee is missing, stop the checkout rather than charging without it. Never fall back to zero.The SDK never shows the founder a formation price, so your checkout is where they first see yours.
A sample checkout: the partner's own price plus the state fee from doola.
4
Charge the founder
Charge with your own payment provider. Keep one order per companyId, and give each charge attempt its own idempotency key, for example ${companyId}:${attemptId}. A double click or a second tab on the same attempt then never charges twice, while a retry after a declined card is a new attempt that can still succeed. Providers such as Stripe replay the first result for a key, failures included, so a key per company would keep returning the decline. If the charge fails, do nothing on the doola side: the formation keeps waiting, and the founder can try again.
5
Confirm the payment
Once the charge succeeds, call Confirm payment from your server. This is what starts the formation.
async function confirmPayment(companyId: string, chargeId: string): Promise<void> { const r = await fetch( `${DOOLA_API}/v1/partner/companies/${encodeURIComponent(companyId)}/payment-confirmed`, { method: 'POST', headers: { authorization: process.env.DOOLA_API_KEY!, 'content-type': 'application/json' }, // Your own reference, such as a payment intent or order id. Logged, never verified. body: JSON.stringify({ partnerReference: chargeId }), }, ); // Safe to retry: a second confirmation for the same company changes nothing. if (!r.ok) throw new Error(`doola payment-confirmed answered ${r.status}`);}
A successful confirmation answers 200 with an empty body. The company moves to PENDING and doola starts filing it.
6
Show the founder their company
Replace the SDK element with a fresh one, for example element.replaceWith(doola.create()), or append a new doola.create() if your checkout already took the old one off the page. Never leave the old element beside the new one: each create() is its own iframe, and the old one keeps showing the payment screen. The new iframe shows the founder’s company, starting with any signature the IRS needs.The payment screen inside the iframe does not watch for your confirmation, so it only changes when the SDK mounts again. If the founder stays on it, it tells them to refresh after paying.
Confirm payment responses
HTTP
Code
Meaning
What to do
200
Confirmed, or it was already confirmed. Empty body
Nothing. A repeat is a no-op
401
E_AUTH_MISSING, E_AUTH_INVALID
Missing or wrong secret key, or a key for the other environment
Fix your configuration
404
E_NOT_FOUND
No such company in your account
Check the id. Never charge for it
409
E_COMPANY_CANCELLED
doola cancelled this formation before payment. The payment was not applied
Refund the founder
A 200 also comes back for a company that never waited on payment, such as one you created with the Partner API, and it changes nothing there.
What the founder sees
Right after they submit, the iframe shows “Your company details are in. Payment is the last step.” Once your checkout has had a few seconds to open, it adds a small “Payment window did not open? Open it here.” link. Once 10 minutes have passed since your checkout last opened, including when the founder comes back on a later day, a Continue to payment button takes the link’s place. Both fire onFormed again.
An unpaid formation, as the founder sees it when they come back.
Charge each company once
onFormed can fire more than once for the same company: when the founder submits, each time they press Continue to payment, and in more than one tab. Key everything on companyId:
One order per company. Create or reuse your order by companyId when the checkout opens.
Check before charging. Read the company again right before you charge. Skip the charge if it is already paid, and refuse it if it is CANCELLED, FAILED or a status you don’t recognise.
Idempotent charges. Give each charge attempt its own idempotency key under that order, such as ${companyId}:${attemptId}, so a double click never charges twice and a retry after a decline still goes through.
When things go wrong
What happened
State at doola
What to do
The founder closed the tab before paying
AWAITING_PAYMENT. Nothing filed
Nothing. When they open the SDK again, they see the payment screen and can reopen your checkout
The charge failed
AWAITING_PAYMENT
Let them retry in your checkout. Do not call doola
The charge succeeded but your confirmation call failed
AWAITING_PAYMENT
Retry the confirmation. It is safe to repeat
The founder was charged twice
Confirmed by the first payment
Refund the extra charge, and keep one order per companyId with an idempotency key per charge attempt
Confirmation answered 409 E_COMPANY_CANCELLED
CANCELLED
Refund the founder
The founder wants to cancel before paying
AWAITING_PAYMENT
Contact doola to cancel it. Only doola can cancel a formation, and cancelling also lets that customer start a new one
The founder wants a refund after you confirmed
PENDING or later. Filing has started
Your refund policy applies. Contact doola about the formation itself
Keep your records in step
doola sends no webhook while a formation waits on payment: the first event for an SDK company is company_formation_submitted, after you confirm. So your own records are the source of truth for unpaid formations.
Save companyId with your order as soon as your checkout opens.
Sweep charged orders that were never confirmed. For each, retry the confirmation. Run it on a schedule, for example every hour.
Sweep open orders. Read each company with Get a company. CANCELLED means the order is void. A company that is already past AWAITING_PAYMENT was paid.
To find a customer’s companies without an order, list them with GET /v1/partner/companies?customerId={doolaCustomerId}.
Test it
In sandbox, use your test card or your provider’s test mode, then confirm with your dk_test_ key exactly as in production. To move the company on to formed and EIN issued, use the sandbox playgroundafter you confirm payment. See Testing.
Last modified on October 8, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"doola Docs","description":"Build US company formation and compliance into your product with the doola Partner API, the embedded doola SDK, webhooks and the doola Formation MCP server, or refer founders to doola as an affiliate partner.","colors":{"primary":"#276EF1","light":"#4F8FF6","dark":"#1E5ED8"},"logo":{"light":"https://mintcdn.com/doola/SFeoF_TYCRlE4Apz/logo/doola_logo_black.svg?fit=max\u0026auto=format\u0026n=SFeoF_TYCRlE4Apz\u0026q=85\u0026s=fdd4abb64b5833608e513ef10fa97314","dark":"https://mintcdn.com/doola/SFeoF_TYCRlE4Apz/logo/doola_logo.svg?fit=max\u0026auto=format\u0026n=SFeoF_TYCRlE4Apz\u0026q=85\u0026s=1ca0b509d4e07ac2f28422c4612aa121"},"favicon":"https://mintcdn.com/doola/YGCgGm1CbPVX-ivx/logo/favicon.ico?fit=max\u0026auto=format\u0026n=YGCgGm1CbPVX-ivx\u0026q=85\u0026s=3df3336ae81325012cdcf6719483eeb5","api":{"examples":{"languages":["curl","javascript","node","python","go","java","php"],"prefill":true}},"appearance":{"default":"dark"},"navbar":{"primary":{"type":"button","label":"Become a partner","href":"https://www.doola.com/partner-with-us/"}},"footer":{"socials":{"website":"https://www.doola.com"},"links":[{"header":"Partners","items":[{"label":"Partner Portal","href":"https://partners-portal.doola.com"},{"label":"Get API access","href":"https://www.doola.com/partner-with-us"},{"label":"Affiliate program","href":"/affiliates/overview"}]},{"header":"Legal","items":[{"label":"Privacy policy","href":"https://www.doola.com/privacy-policy"},{"label":"Terms of service","href":"https://www.doola.com/terms-of-service"}]}]},"search":{"prompt":"Search the doola docs"},"seo":{"organization":{"name":"doola","url":"https://www.doola.com"}},"fonts":{"family":"Inter"},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page moved or never existed. Start from the [Partner API](/api/introduction) or the [Affiliate program](/affiliates/overview), search the docs, or email [engineering@doola.com](mailto:engineering@doola.com)."}},"contextual":{"options":["copy","view","claude","chatgpt","download-spec",{"title":"Connect the doola MCP server","description":"Form a US LLC from your own AI client","icon":"plug","href":"https://docs.doola.com/mcp/connect"}],"display":"header"},"thumbnails":{"fonts":{"family":"Inter"}},"metadata":{"timestamp":true},"markdown":{"instructions":["Authenticate with the raw API key in the Authorization header. Never add a Bearer prefix.","Use the sandbox base URL https://api.test.doola.com and a dk_test_ key in examples unless the user asks for production.","Send an Idempotency-Key header on POST /v1/partner/customers, POST /v1/partner/companies, POST /v1/partner/companies/import, POST /v1/partner/companies/{companyId}/services and POST /v1/partner/companies/{companyId}/documents. No other endpoint takes one.","Every response is wrapped as {payload, error}. Read fields from payload and branch on error.code, never on the message.","Drive formation progress from webhooks plus a reconciliation sweep, never a polling loop.","Embedded SDK (@doola/js): the dk_ key stays on the server and mints customer sessions; the browser gets only a pk_ key and the session. onFormed carries only companyId and can fire more than once. Before charging, read the company with the dk_ key, require formationSubmissionStatus AWAITING_PAYMENT, check the owner's email, and price on the server. Then POST payment-confirmed, which answers 200 with an empty body, and replace the SDK element with a new doola.create() (never append a second one).","The doola Formation MCP server at https://mcp.doola.com is for founders forming their own company with their own doola account. Platform partners integrate the Partner API or the Embedded SDK. The /mcp endpoint on this docs site only searches these docs.","Affiliates refer founders to doola with a PartnerStack referral link and coupon code, or with two doola-branded iframe widgets: the Demo Booking Widget (app.doola.com/embed/book-demo?link=\u003creferral link>) and the Company Formation Widget (app.doola.com/embed/partner/\u003cpartner ID>). The widgets need no API key and are not the Embedded SDK. Copy the snippets exactly as documented, never add a sandbox attribute to the formation widget iframe.","For a full capability summary with the rules above, read https://docs.doola.com/skill.md."]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"doola","hasAudioNarration":false,"actualSubdomain":"doola","customDomains":["docs.doola.com"],"gitSource":{"type":"github","owner":"doolahq","repo":"doola-data","deployBranch":"main","contentDirectory":"developer-docs","isPrivate":true,"mountPath":"","label":"","_id":"6adb9fb30954663ebe7b6469"},"feedback":{"thumbs":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b001c37286e5a4832613725","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Build with doola","count":78},{"language":"default","tag":"Partner API","count":60},{"language":"default","tag":"API reference","count":35},{"language":"default","tag":"Core concepts","count":19},{"language":"default","tag":"Embedded SDK","count":18},{"language":"default","tag":"Get started","count":12},{"language":"default","tag":"Affiliates","count":11},{"language":"default","tag":"Reference","count":8},{"language":"default","tag":"Integrate","count":7},{"language":"default","tag":"Required actions","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"workos-onboarding","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":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"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}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"sdk/payments","slug":"/sdk/payments","pageMetadata":{"title":"Take payment","description":"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.","href":"/sdk/payments"},"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: \"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,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},{CodeBlock,CodeGroup,Frame,Heading,Info,Mermaid,OptimizedImage,Step,Steps,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`You own checkout.`}),` doola never charges your customer, never shows them your price and never handles their card. A formation submitted in the SDK waits at `,_jsx(_components.code,{children:`AWAITING_PAYMENT`}),`, and `,_jsx(_components.strong,{children:`nothing is filed until your server confirms payment.`})]})}),`\n`,_jsx(Heading,{level:`2`,id:`who-controls-what`,children:`Who controls what`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You decide`}),_jsx(_components.th,{children:`doola does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Your price for the formation, and how you package it`}),_jsx(_components.td,{children:`Holds the submitted formation until you confirm payment`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Your currency and your payment provider`}),_jsx(_components.td,{children:`Shows the founder the state filing fee for their state, so there are no surprises at your checkout`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Discounts, bundles, trials and promotions`}),_jsx(_components.td,{children:`Files the company, gets the EIN and appoints the registered agent once you confirm`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Receipts, invoices and any tax on your sale`}),_jsx(_components.td,{children:`Keeps the founder on a “payment pending” screen until then`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Refunds to the founder`}),_jsx(_components.td,{children:`Refuses a confirmation for a formation it cancelled, so you know to refund`})]})]})]}),`\n`,_jsx(_components.p,{children:`How doola bills you for SDK formations is set by your partner agreement.`}),`\n`,_jsx(Heading,{level:`2`,id:`the-flow`,children:`The flow`}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n autonumber\n participant F as Founder\n participant SDK as SDK iframe\n participant P as Your page\n participant S as Your server\n participant D as doola API\n F->>SDK: Submit and pay\n SDK->>D: Create the company\n D-->>SDK: AWAITING_PAYMENT\n SDK-->>P: onFormed({ companyId })\n P->>S: Open checkout for companyId\n S->>D: GET company and its customer\n S->>S: Check owner and status, price it\n F->>P: Pays in your checkout\n S->>S: Charge the founder\n S->>D: POST payment-confirmed\n D-->>D: AWAITING_PAYMENT to PENDING, filing starts\n P->>SDK: Mount again: the founder sees their company`}),`\n`,_jsx(Heading,{level:`2`,id:`step-by-step`,children:`Step by step`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Open your checkout from onFormed`,children:[_jsxs(_components.p,{children:[`The founder presses `,_jsx(_components.strong,{children:`Submit and pay`}),` on the last step of the wizard. doola creates the company at `,_jsx(_components.code,{children:`AWAITING_PAYMENT`}),`, and `,_jsx(_components.code,{children:`onFormed`}),` hands your page its id and nothing else.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#C8C8C8`},children:`onFormed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` openCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`]})})}),_jsx(_components.p,{children:`Remove the SDK element while your checkout is open, or open the checkout on top of it. If you use the full-screen presentation on phones, removing the element also closes the overlay.`}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`onFormed`}),` fires again if the founder comes back to an unpaid formation and asks to pay, so opening a checkout for the same company twice must be safe. See `,_jsx(_components.a,{href:`#charge-each-company-once`,children:`Charge each company once`}),`.`]})]}),_jsxs(Step,{title:`Look the company up on your server`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`companyId`}),` came from the browser, where anyone can change it. Before you show a price, your server reads the company with your secret key, using `,_jsx(_components.a,{href:`/api/api-reference/companies/get-a-company`,children:`Get a company`}),`, and checks two things:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It is waiting on payment.`}),` Charge only while `,_jsx(_components.code,{children:`formationSubmissionStatus`}),` is `,_jsx(_components.code,{children:`AWAITING_PAYMENT`}),`. `,_jsx(_components.code,{children:`PENDING`}),`, `,_jsx(_components.code,{children:`SUBMITTED`}),` and `,_jsx(_components.code,{children:`COMPLETED`}),` mean it is already paid. `,_jsx(_components.code,{children:`CANCELLED`}),`, `,_jsx(_components.code,{children:`FAILED`}),` and any status you don’t recognise mean it is not payable: never charge it, and never show it as paid.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`It belongs to the signed-in customer.`}),` Read its owner with `,_jsx(_components.a,{href:`/api/api-reference/customers/get-a-customer`,children:`Get a customer`}),`, using the company’s `,_jsx(_components.code,{children:`doolaCustomerId`}),`, and compare its `,_jsx(_components.code,{children:`externalCustomerId`}),` with your signed-in user’s id. When `,_jsx(_components.code,{children:`externalCustomerId`}),` is `,_jsx(_components.code,{children:`null`}),`, compare the `,_jsx(_components.code,{children:`email`}),` with your user’s instead.`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`38`,children:[_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:` DOOLA_API`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.test.doola.com'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// https://api.doola.com with a dk_live_ key`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`interface`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Company`}),_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:` doolaCustomerId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` entityType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'LLC'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'CCorp'`}),_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:` state`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` formationSubmissionStatus`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` doola`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_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:` r`}),_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:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`DOOLA_API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"}${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_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:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`authorization:`}),_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:`DOOLA_API_KEY`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// your dk_ secret key, no \"Bearer\"`})]}),`\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:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`doola \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` answered `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_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`,_jsx(_components.span,{className:`line`}),`\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\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// every response is wrapped in { payload, error }`})]}),`\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:` payableCompany`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`user`}),_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:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` company`}),_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:` doola`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`/v1/partner/companies/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encodeURIComponent`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` owner`}),_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:` doola`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`externalCustomerId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` null`}),_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:\" `/v1/partner/customers/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encodeURIComponent`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`doolaCustomerId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_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`,_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:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` isOwner`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` owner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`externalCustomerId`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` owner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`externalCustomerId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` owner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLowerCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` user`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toLowerCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// never minted with an id`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Someone else's company: answer 404, exactly as for one that does not exist.`})}),`\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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`isOwner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_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:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`formationSubmissionStatus`}),_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:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'AWAITING_PAYMENT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`alreadyPaid:`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'PENDING'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'SUBMITTED'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'COMPLETED'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`includes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`alreadyPaid:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_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:` // CANCELLED, FAILED, or a status added after you wrote this: not payable.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`formation \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` is `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" and cannot be paid`\"}),_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:[`When `,_jsx(_components.code,{children:`alreadyPaid`}),` is true, skip the charge and show the founder their company. When it throws, show an error and contact doola.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`externalCustomerId`}),` is the id you sent when minting the customer’s session, so it still matches after the founder changes their email on either side. It is `,_jsx(_components.code,{children:`null`}),` only for a customer never minted with one, such as one created with `,_jsx(_components.a,{href:`/api/api-reference/customers/create-a-customer`,children:`Create a customer`}),` or minted with an email alone, and only then does the email decide. When it is set, it decides alone: a customer whose `,_jsx(_components.code,{children:`externalCustomerId`}),` is not your user’s id is someone else’s, even if the emails match.`]})]}),_jsxs(Step,{title:`Price it on your server`,children:[_jsx(_components.p,{children:`Build the total from the company, never from anything the browser sends:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your price`}),` for the formation, by `,_jsx(_components.code,{children:`entityType`}),` (`,_jsx(_components.code,{children:`LLC`}),` or `,_jsx(_components.code,{children:`CCorp`}),`) or however you package it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The state filing fee`}),`, from `,_jsx(_components.a,{href:`/api/api-reference/reference-data/list-state-filing-fees`,children:`List state filing fees`}),` for the company’s `,_jsx(_components.code,{children:`entityType`}),`, matched on its `,_jsx(_components.code,{children:`state`}),`. The founder already saw this amount in the wizard as “State filing fee +$X”, so show the same number.`]}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_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:` fees`}),_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:` doola`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c{ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`priceInCents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` number`}),_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:\" `/v1/partner/references/state-fees?entityType=\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`entityType`}),_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`,_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` stateFee`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fees`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`find`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`fee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` fee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`stateFee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`no state filing fee for \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`entityType`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` in `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`state`}),_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`,_jsx(_components.span,{className:`line`}),`\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:` totalCents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` YOUR_PRICE_CENTS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`company`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`entityType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stateFee`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`priceInCents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:`If the fee is missing, stop the checkout rather than charging without it. Never fall back to zero.`}),_jsx(_components.p,{children:`The SDK never shows the founder a formation price, so your checkout is where they first see yours.`}),_jsx(Frame,{caption:`A sample checkout: the partner's own price plus the state fee from doola.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=7e9c072a00346ac4db6c8874eed626a6`,alt:`A checkout listing an LLC formation package at the partner's price, the Wyoming state filing fee and the total`,\"data-og-width\":`2880`,width:`2880`,\"data-og-height\":`2000`,height:`2000`,\"data-path\":`images/sdk/partner-checkout.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=280\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=c17d78a5e0799d3fbca65b59233dd1b1 280w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=560\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=dc44d8f99b8af265108c463cea46d7f1 560w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=840\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=8a0d9343b46b2b464d5aa6cceaa5d1e1 840w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=1100\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=ccabb5431a416eec73f59be9f192e56d 1100w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=1650\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=6dcdb9924cf45eacc8cc2e6114f8376f 1650w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/partner-checkout.png?w=2500\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=61f64e4c295f504841d214aea3f59879 2500w`})})]}),_jsx(Step,{title:`Charge the founder`,children:_jsxs(_components.p,{children:[`Charge with your own payment provider. Keep one order per `,_jsx(_components.code,{children:`companyId`}),`, and give each charge attempt its own idempotency key, for example `,_jsx(_components.code,{children:\"${companyId}:${attemptId}\"}),`. A double click or a second tab on the same attempt then never charges twice, while a retry after a declined card is a new attempt that can still succeed. Providers such as Stripe replay the first result for a key, failures included, so a key per company would keep returning the decline. If the charge fails, do nothing on the doola side: the formation keeps waiting, and the founder can try again.`]})}),_jsxs(Step,{title:`Confirm the payment`,children:[_jsxs(_components.p,{children:[`Once the charge succeeds, call `,_jsx(_components.a,{href:`/api/api-reference/companies/confirm-payment-for-a-draft-formation`,children:`Confirm payment`}),` from your server. This is what starts the formation.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node`,numberOfLines:`14`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_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:` confirmPayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`chargeId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`void`}),_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:` r`}),_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:` fetch`}),_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:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`DOOLA_API`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/v1/partner/companies/`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`encodeURIComponent`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`companyId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"/payment-confirmed`\"}),_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:` method:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`authorization:`}),_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:`DOOLA_API_KEY`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'content-type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_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:` // Your own reference, such as a payment intent or order id. Logged, never verified.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`partnerReference:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chargeId`}),_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:` // Safe to retry: a second confirmation for the same company changes nothing.`})}),`\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:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`doola payment-confirmed answered \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`curl`,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.test.doola.com/v1/partner/companies/{companyId}/payment-confirmed`}),_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:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: dk_test_your_api_key_here\"`}),_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:` '{ \"partnerReference\": \"pi_3Q1example\" }'`})]}),`\n`]})})})]}),_jsxs(_components.p,{children:[`A successful confirmation answers `,_jsx(_components.code,{children:`200`}),` with an empty body. The company moves to `,_jsx(_components.code,{children:`PENDING`}),` and doola starts filing it.`]})]}),_jsxs(Step,{title:`Show the founder their company`,children:[_jsxs(_components.p,{children:[`Replace the SDK element with a fresh one, for example `,_jsx(_components.code,{children:`element.replaceWith(doola.create())`}),`, or append a new `,_jsx(_components.code,{children:`doola.create()`}),` if your checkout already took the old one off the page. Never leave the old element beside the new one: each `,_jsx(_components.code,{children:`create()`}),` is its own iframe, and the old one keeps showing the payment screen. The new iframe shows the founder’s company, starting with any signature the IRS needs.`]}),_jsx(_components.p,{children:`The payment screen inside the iframe does not watch for your confirmation, so it only changes when the SDK mounts again. If the founder stays on it, it tells them to refresh after paying.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`confirm-payment-responses`,children:`Confirm payment responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`200`}),_jsx(_components.td,{}),_jsx(_components.td,{children:`Confirmed, or it was already confirmed. Empty body`}),_jsx(_components.td,{children:`Nothing. A repeat is a no-op`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`401`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`E_AUTH_MISSING`}),`, `,_jsx(_components.code,{children:`E_AUTH_INVALID`})]}),_jsx(_components.td,{children:`Missing or wrong secret key, or a key for the other environment`}),_jsx(_components.td,{children:`Fix your configuration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`E_NOT_FOUND`})}),_jsx(_components.td,{children:`No such company in your account`}),_jsx(_components.td,{children:`Check the id. Never charge for it`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`409`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`E_COMPANY_CANCELLED`})}),_jsx(_components.td,{children:`doola cancelled this formation before payment. The payment was not applied`}),_jsx(_components.td,{children:`Refund the founder`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`200`}),` also comes back for a company that never waited on payment, such as one you created with the Partner API, and it changes nothing there.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-the-founder-sees`,children:`What the founder sees`}),`\n`,_jsxs(_components.p,{children:[`Right after they submit, the iframe shows “Your company details are in. Payment is the last step.” Once your checkout has had a few seconds to open, it adds a small “Payment window did not open? Open it here.” link. Once 10 minutes have passed since your checkout last opened, including when the founder comes back on a later day, a `,_jsx(_components.strong,{children:`Continue to payment`}),` button takes the link’s place. Both fire `,_jsx(_components.code,{children:`onFormed`}),` again.`]}),`\n`,_jsx(Frame,{caption:`An unpaid formation, as the founder sees it when they come back.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=8b779d876092af6a7ce9916db255b3bc`,alt:`A card reading Payment pending, with a link to open the payment window`,\"data-og-width\":`1996`,width:`1996`,\"data-og-height\":`540`,height:`540`,\"data-path\":`images/sdk/waiting-for-payment.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=280\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=2d1949b775f04b8fe05d04003036b16d 280w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=560\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=db144ab448da1b2e48934a7f0e078d2e 560w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=840\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=0af3e981d523620f28e1e7d7335e9f01 840w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=1100\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=a1ae2df58857856b6fc2277caba37714 1100w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=1650\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=f182fe97366ba13f4f090fc795c8b0e6 1650w, https://mintcdn.com/doola/pax_vNmbRmeuaKRG/images/sdk/waiting-for-payment.png?w=2500\u0026fit=max\u0026auto=format\u0026n=pax_vNmbRmeuaKRG\u0026q=85\u0026s=887e7dcca184ab65c79a105fff22b6ad 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`charge-each-company-once`,children:`Charge each company once`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`onFormed`}),` can fire more than once for the same company: when the founder submits, each time they press `,_jsx(_components.strong,{children:`Continue to payment`}),`, and in more than one tab. Key everything on `,_jsx(_components.code,{children:`companyId`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`One order per company.`}),` Create or reuse your order by `,_jsx(_components.code,{children:`companyId`}),` when the checkout opens.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check before charging.`}),` Read the company again right before you charge. Skip the charge if it is already paid, and refuse it if it is `,_jsx(_components.code,{children:`CANCELLED`}),`, `,_jsx(_components.code,{children:`FAILED`}),` or a status you don’t recognise.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Idempotent charges.`}),` Give each charge attempt its own idempotency key under that order, such as `,_jsx(_components.code,{children:\"${companyId}:${attemptId}\"}),`, so a double click never charges twice and a retry after a decline still goes through.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`when-things-go-wrong`,children:`When things go wrong`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What happened`}),_jsx(_components.th,{children:`State at doola`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The founder closed the tab before paying`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AWAITING_PAYMENT`}),`. Nothing filed`]}),_jsx(_components.td,{children:`Nothing. When they open the SDK again, they see the payment screen and can reopen your checkout`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The charge failed`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_PAYMENT`})}),_jsx(_components.td,{children:`Let them retry in your checkout. Do not call doola`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The charge succeeded but your confirmation call failed`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_PAYMENT`})}),_jsx(_components.td,{children:`Retry the confirmation. It is safe to repeat`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The founder was charged twice`}),_jsx(_components.td,{children:`Confirmed by the first payment`}),_jsxs(_components.td,{children:[`Refund the extra charge, and keep one order per `,_jsx(_components.code,{children:`companyId`}),` with an idempotency key per charge attempt`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Confirmation answered `,_jsx(_components.code,{children:`409 E_COMPANY_CANCELLED`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELLED`})}),_jsx(_components.td,{children:`Refund the founder`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The founder wants to cancel before paying`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`AWAITING_PAYMENT`})}),_jsx(_components.td,{children:`Contact doola to cancel it. Only doola can cancel a formation, and cancelling also lets that customer start a new one`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The founder wants a refund after you confirmed`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PENDING`}),` or later. Filing has started`]}),_jsx(_components.td,{children:`Your refund policy applies. Contact doola about the formation itself`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`keep-your-records-in-step`,children:`Keep your records in step`}),`\n`,_jsxs(_components.p,{children:[`doola sends no webhook while a formation waits on payment: the first event for an SDK company is `,_jsx(_components.code,{children:`company_formation_submitted`}),`, after you confirm. So your own records are the source of truth for unpaid formations.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Save `,_jsx(_components.code,{children:`companyId`}),` with your order`]}),` as soon as your checkout opens.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Sweep charged orders that were never confirmed.`}),` For each, retry the confirmation. Run it on a schedule, for example every hour.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Sweep open orders.`}),` Read each company with `,_jsx(_components.a,{href:`/api/api-reference/companies/get-a-company`,children:`Get a company`}),`. `,_jsx(_components.code,{children:`CANCELLED`}),` means the order is void. A company that is already past `,_jsx(_components.code,{children:`AWAITING_PAYMENT`}),` was paid.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`To find a customer’s companies without an order, list them with `,_jsx(_components.code,{children:`GET /v1/partner/companies?customerId={doolaCustomerId}`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`test-it`,children:`Test it`}),`\n`,_jsxs(_components.p,{children:[`In sandbox, use your test card or your provider’s test mode, then confirm with your `,_jsx(_components.code,{children:`dk_test_`}),` key exactly as in production. To move the company on to formed and EIN issued, use the `,_jsx(_components.a,{href:`/api/sandbox-playground`,children:`sandbox playground`}),` `,_jsx(_components.strong,{children:`after`}),` you confirm payment. See `,_jsx(_components.a,{href:`/sdk/testing`,children:`Testing`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Take payment","description":"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.","href":"/sdk/payments"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Who controls what","slug":"who-controls-what","depth":2,"children":[]},{"title":"The flow","slug":"the-flow","depth":2,"children":[]},{"title":"Step by step","slug":"step-by-step","depth":2,"children":[]},{"title":"Confirm payment responses","slug":"confirm-payment-responses","depth":2,"children":[]},{"title":"What the founder sees","slug":"what-the-founder-sees","depth":2,"children":[]},{"title":"Charge each company once","slug":"charge-each-company-once","depth":2,"children":[]},{"title":"When things go wrong","slug":"when-things-go-wrong","depth":2,"children":[]},{"title":"Keep your records in step","slug":"keep-your-records-in-step","depth":2,"children":[]},{"title":"Test it","slug":"test-it","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"doola","siteName":"doola Docs","title":"Take payment - doola Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T14:39:06.690Z","gitLastModified":"2026-10-08T20:09:58.000Z","originalFileLocation":"sdk/payments.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=\"dark\"}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=\"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"doola Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_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/doola/CgqtkROOt5ypSrSx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Take payment - doola Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"doola Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.doola.com/sdk/payments\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://doola.mintlify.site/_mintlify/api/og/v2?division=Integrate\u0026amp;title=Take+payment\u0026amp;description=You+own+checkout.+Charge+your+customer+your+own+price%2C+then+confirm+the+payment+so+doola+starts+the+formation.\u0026amp;theme=79214773a9ea41ab7e7d4859\u0026amp;signature=bca2f2d64cf84d84105d9c43b22edcc799a34eab5e32801dd44149c38e78e551\">\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=\"Take payment - doola Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://doola.mintlify.site/_mintlify/api/og/v2?division=Integrate\u0026amp;title=Take+payment\u0026amp;description=You+own+checkout.+Charge+your+customer+your+own+price%2C+then+confirm+the+payment+so+doola+starts+the+formation.\u0026amp;theme=79214773a9ea41ab7e7d4859\u0026amp;signature=bca2f2d64cf84d84105d9c43b22edcc799a34eab5e32801dd44149c38e78e551\">\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/doola/CgqtkROOt5ypSrSx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"doola Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#276EF1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.doola.com/sdk/payments\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/sdk/payments.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.doola.com/#organization\",\"name\":\"doola\",\"url\":\"https://www.doola.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/doola/SFeoF_TYCRlE4Apz/logo/doola_logo_black.svg?fit=max\u0026auto=format\u0026n=SFeoF_TYCRlE4Apz\u0026q=85\u0026s=fdd4abb64b5833608e513ef10fa97314\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.doola.com#website\",\"name\":\"doola Docs\",\"url\":\"https://docs.doola.com\",\"publisher\":{\"@id\":\"https://www.doola.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.doola.com/sdk/payments#webpage\",\"url\":\"https://docs.doola.com/sdk/payments\",\"name\":\"Take payment\",\"description\":\"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\",\"dateModified\":\"2026-10-08T20:09:58.000Z\",\"isPartOf\":{\"@id\":\"https://docs.doola.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.doola.com/sdk/payments#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.doola.com/sdk/payments#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrate\",\"item\":\"https://docs.doola.com/sdk/sessions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Take payment\",\"item\":\"https://docs.doola.com/sdk/payments\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.doola.com/sdk/payments#article\",\"headline\":\"Take payment\",\"name\":\"Take payment\",\"description\":\"You own checkout. Charge your customer your own price, then confirm the payment so doola starts the formation.\",\"url\":\"https://docs.doola.com/sdk/payments\",\"mainEntityOfPage\":{\"@id\":\"https://docs.doola.com/sdk/payments#webpage\"},\"dateModified\":\"2026-10-08T20:09:58.000Z\",\"publisher\":{\"@id\":\"https://www.doola.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.doola.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"doola Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"doola\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/sdk/payments.md","siteName":"doola Docs","nav":{"global":null,"tabs":[{"tab":"Build with doola","icon":"code","dropdowns":[{"dropdown":"Partner API","icon":"plug","description":"Form companies from your own screens over REST","groups":[{"group":"Get started","pages":[{"title":"doola Partner API","href":"/api/introduction"},{"title":"Authentication","href":"/api/authentication"}]},{"group":"Core concepts","pages":[{"group":"Company formation","expanded":true,"pages":[{"title":"Company formation","href":"/api/formation"},{"title":"SS-4 and Form 8821 signing","href":"/api/non-us-formation"},{"title":"Expedited EIN","href":"/api/expedited-ein"},{"title":"Choosing an industry","href":"/api/naics-industry"}]},{"title":"Import a company","href":"/api/import-company"},{"group":"Services","pages":[{"title":"Company services","href":"/api/company-services"},{"title":"Add a service","href":"/api/add-services"}]},{"title":"Compliance Calendar","href":"/api/compliance/calendar"},{"title":"Annual Report Filing","href":"/api/compliance/annual-report-filing"},{"title":"Webhooks","href":"/api/webhooks"},{"group":"Required actions","pages":[{"title":"Required actions","href":"/api/required-actions"},{"title":"New company names needed","href":"/api/required-actions/name-options"},{"title":"SS-4 signature needed again","href":"/api/required-actions/ss4-reset"},{"title":"Form 8821 signature needed","href":"/api/required-actions/form8821-required"},{"title":"Founder address needed","href":"/api/required-actions/founder-address"},{"title":"Annual report correction","href":"/api/required-actions/annual-report-correction"},{"title":"Imported company actions","href":"/api/required-actions/import"}]},{"title":"Sandbox playground","href":"/api/sandbox-playground"},{"title":"Errors","href":"/api/errors"}]},{"group":"Reference","pages":[{"title":"Domain objects","href":"/api/domain-objects"},{"title":"OpenAPI specification","href":"/api/openapi-spec"}]},{"group":"API reference","pages":[{"group":"Playground (sandbox only)","pages":[{"title":"Complete Formation (sandbox)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/playground/companies/{companyId}/formation/complete","href":"/api/api-reference/playground-sandbox-only/complete-formation-sandbox"},{"title":"Complete EIN creation (sandbox)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/playground/companies/{companyId}/eincreation/complete","href":"/api/api-reference/playground-sandbox-only/complete-ein-creation-sandbox"}]},{"group":"Customers","pages":[{"title":"List customers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/customers","href":"/api/api-reference/customers/list-customers"},{"title":"Create a customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/customers","href":"/api/api-reference/customers/create-a-customer"},{"title":"Get a customer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/customers/{customerId}","href":"/api/api-reference/customers/get-a-customer"}]},{"group":"Customer sessions","pages":[{"title":"Create a customer session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/customer-sessions","href":"/api/api-reference/customer-sessions/create-a-customer-session"}]},{"group":"Companies","pages":[{"title":"List companies","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies","href":"/api/api-reference/companies/list-companies"},{"title":"Create a company","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies","href":"/api/api-reference/companies/create-a-company"},{"title":"Add services to a company","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/services","href":"/api/api-reference/companies/add-services-to-a-company"},{"title":"Confirm payment for a draft formation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/payment-confirmed","href":"/api/api-reference/companies/confirm-payment-for-a-draft-formation"},{"title":"Import a company","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/import","href":"/api/api-reference/companies/import-a-company"},{"title":"Get a company","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}","href":"/api/api-reference/companies/get-a-company"}]},{"group":"Documents","pages":[{"title":"List company documents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{doolaCompanyId}/documents","href":"/api/api-reference/documents/list-company-documents"},{"title":"Upload a company document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{doolaCompanyId}/documents","href":"/api/api-reference/documents/upload-a-company-document"},{"title":"Get a document download URL","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{doolaCompanyId}/documents/{documentId}","href":"/api/api-reference/documents/get-a-document-download-url"}]},{"group":"Tax Filing","pages":[{"title":"Confirm a company's tax filing for a tax year","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/tax/confirm","href":"/api/api-reference/tax-filing/confirm-a-companys-tax-filing-for-a-tax-year"},{"title":"List a company's tax filing years","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/tax-filings/years","href":"/api/api-reference/tax-filing/list-a-companys-tax-filing-years"},{"title":"Get a company's tax filing status for one tax year","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/tax-filings/years/{taxYear}","href":"/api/api-reference/tax-filing/get-a-companys-tax-filing-status-for-one-tax-year"}]},{"group":"Signatures","pages":[{"title":"Create a signature session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/signatures","href":"/api/api-reference/signatures/create-a-signature-session"}]},{"group":"Required Actions","pages":[{"title":"Resolve a required action","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/required-actions/{requiredActionId}/resolution","href":"/api/api-reference/required-actions/resolve-a-required-action"},{"title":"List open required actions across your companies","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/required-actions","href":"/api/api-reference/required-actions/list-open-required-actions-across-your-companies"},{"title":"List a company's required actions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/required-actions","href":"/api/api-reference/required-actions/list-a-companys-required-actions"},{"title":"Retrieve a required action","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/required-actions/{requiredActionId}","href":"/api/api-reference/required-actions/retrieve-a-required-action"}]},{"group":"Annual Report Filing","pages":[{"title":"List a company's annual reports","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/compliance/annual-reports","href":"/api/api-reference/annual-report-filing/list-a-companys-annual-reports"},{"title":"Submit a company's annual report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/compliance/annual-reports","href":"/api/api-reference/annual-report-filing/submit-a-companys-annual-report"},{"title":"Confirm an annual report and hand it to doola to file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/partner/companies/{companyId}/compliance/annual-reports/{annualReportId}/confirm","href":"/api/api-reference/annual-report-filing/confirm-an-annual-report-and-hand-it-to-doola-to-file"},{"title":"Get one annual report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/compliance/annual-reports/{annualReportId}","href":"/api/api-reference/annual-report-filing/get-one-annual-report"},{"title":"Get the state fee for a company's annual report","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/compliance/annual-reports/state-fees","href":"/api/api-reference/annual-report-filing/get-the-state-fee-for-a-companys-annual-report"},{"title":"Get the annual report requirements for a company","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/compliance/annual-reports/requirements","href":"/api/api-reference/annual-report-filing/get-the-annual-report-requirements-for-a-company"}]},{"group":"SDK","pages":[{"title":"Get your publishable key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/sdk/keys","href":"/api/api-reference/sdk/get-your-publishable-key"}]},{"group":"Reference data","pages":[{"title":"List states","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/references/states","href":"/api/api-reference/reference-data/list-states"},{"title":"List state filing fees","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/references/state-fees","href":"/api/api-reference/reference-data/list-state-filing-fees"},{"title":"List NAICS codes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/references/naics-codes","href":"/api/api-reference/reference-data/list-naics-codes"},{"title":"List countries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/references/countries","href":"/api/api-reference/reference-data/list-countries"}]},{"group":"Compliance","pages":[{"title":"Get a company's compliance calendar","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/partner/companies/{companyId}/compliance/calendar","href":"/api/api-reference/compliance/get-a-companys-compliance-calendar"}]}]},{"group":"Help","pages":[{"title":"FAQ","href":"/api/faq"}]},{"group":"Updates","pages":[{"title":"Changelog","href":"/api/changelog"}]}]},{"dropdown":"Embedded SDK","icon":"window-maximize","description":"doola's formation flow inside your product, in your brand","groups":[{"group":"Get started","pages":[{"title":"doola Embedded SDK","sidebarTitle":"Overview","href":"/sdk/overview"},{"title":"Quickstart","href":"/sdk/quickstart"},{"title":"How it works","href":"/sdk/how-it-works"},{"title":"Customer experience","href":"/sdk/customer-experience"}]},{"group":"Integrate","pages":[{"title":"Create sessions","href":"/sdk/sessions"},{"title":"Embed the SDK","description":"Install @doola/js, mount the formation flow on your page, and keep it working across your framework's lifecycle.","href":"/sdk/embed"},{"title":"Take payment","href":"/sdk/payments"},{"title":"After payment","description":"What happens once you confirm payment: filing, signatures, documents and the webhooks that tell you about each.","href":"/sdk/after-payment"}]},{"group":"Customize","pages":[{"title":"Branding","href":"/sdk/branding"},{"title":"Presentation and mobile","href":"/sdk/presentation"}]},{"group":"Test and launch","pages":[{"title":"Testing","href":"/sdk/testing"},{"title":"Go-live checklist","href":"/sdk/go-live"}]},{"group":"Reference","pages":[{"title":"Client reference","href":"/sdk/reference/client"},{"title":"Server reference","href":"/sdk/reference/server"},{"title":"Errors","href":"/sdk/reference/errors"},{"title":"Security and data","href":"/sdk/security"}]},{"group":"Help","pages":[{"title":"FAQ","href":"/sdk/faq"},{"title":"Changelog","href":"/sdk/changelog"}]}]}]},{"tab":"Affiliates","icon":"handshake","pages":[{"title":"Affiliates","href":"/affiliates/overview"}]},{"tab":"MCP server","icon":"robot","pages":[{"title":"MCP server","href":"/mcp/introduction"}]}]},"basePath":"","title":"Take payment - doola Docs","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DMn5ZJp6.js","DynamicMarkdown-5yMTCLas.js","zoom-image-lightbox-BUkqX3JF.js","lightbox-handle-r17bVUz3.js"]}