[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-whop-whop-payments-network":3,"mdc-72swg9-key":34,"related-org-whop-whop-payments-network":8877,"related-repo-whop-whop-payments-network":8886},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":25,"mdContent":33},"whop-payments-network","integrate Whop Payments Network","Integrate the Whop Payments Network into your platform — pay-ins, payouts, checkout, embedded components, API patterns, and webhooks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"whop","Whop","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fwhop.png","whopio",[13,17,20,21],{"name":14,"slug":15,"type":16},"Payments","payments","tag",{"name":18,"slug":19,"type":16},"API Development","api-development",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"Webhooks","webhooks",1,"https:\u002F\u002Fgithub.com\u002Fwhopio\u002Fwhop-payments-network-skill","2026-04-06T18:57:39.593857",null,0,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"Whop Payments Network integration skill for AI coding tools (Cursor, Claude Code, Copilot). Install: npx skills add whopio\u002Fwhop-payments-network-skill","---\nname: whop-payments-network\ndescription: Integrate the Whop Payments Network into your platform — pay-ins, payouts, checkout, embedded components, API patterns, and webhooks.\n---\n\n# Whop Payments Network Integration\n\nWhop provides a full payments network: accept payments (pay-ins), send payouts, embed checkout and wallet components, handle webhooks, manage connected accounts, and send notifications. This skill covers the patterns you need to integrate Whop into any platform.\n\n## 1. SDK Packages\n\n| Package | Purpose | Install |\n|---------|---------|---------|\n| `@whop\u002Fsdk` | Server-side API client (TypeScript) | `npm install @whop\u002Fsdk` |\n| `whop-sdk` | Server-side API client (Python) | `pip install whop-sdk` |\n| `whop_sdk` | Server-side API client (Ruby) | `gem install whop_sdk` |\n| `@whop\u002Fcheckout` | Embedded checkout React component | `npm install @whop\u002Fcheckout` |\n| `@whop\u002Fembedded-components-react-js` | Embedded payout\u002Fwallet\u002FKYC\u002Fchat components (React) | `npm install @whop\u002Fembedded-components-react-js` |\n| `@whop\u002Fembedded-components-vanilla-js` | Embedded components (Vanilla JS) | `npm install @whop\u002Fembedded-components-vanilla-js` |\n\n## 2. SDK Setup\n\nBase URL: `https:\u002F\u002Fapi.whop.com\u002Fapi\u002Fv1`\n\n```typescript\nimport Whop from \"@whop\u002Fsdk\";\n\n\u002F\u002F Company API Key — access your own company's data or connected accounts\nconst client = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  \u002F\u002F appID is NOT required for Company API Keys\n});\n\n\u002F\u002F App API Key — access data on companies that installed your app\nconst appClient = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  appID: \"app_xxxxxxxxxxxxxx\",\n});\n```\n\nFor webhook verification, add the webhook secret:\n\n```typescript\nconst client = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  webhookKey: btoa(process.env.WHOP_WEBHOOK_SECRET || \"\"),\n});\n```\n\n## 3. Authentication\n\n### API Key Types\n\n| Type | When to use | How to get |\n|------|-------------|------------|\n| **Company API Key** | Your own company data, connected accounts, platform operations | Dashboard > Developer > Company API Keys |\n| **App API Key** | Access data on companies that installed your app | Dashboard > Developer > Create App > Env Vars |\n| **OAuth Token** | Act on behalf of a specific user | OAuth 2.1 + PKCE flow |\n\n### OAuth \u002F NextAuth v5 OIDC\n\nKey config: `type: \"oidc\"`, `issuer: \"https:\u002F\u002Fapi.whop.com\"`, `token_endpoint_auth_method: \"none\"`, `id_token_signed_response_alg: \"ES256\"`, `checks: [\"pkce\", \"nonce\"]`. Profile fields: `sub`, `name`, `email`, `picture`, `username`.\n\n> **Note:** OAuth\u002FOIDC is still marked \"in development\" in official docs. The NextAuth pattern works but may change.\n\n### Admin Authorization\n\n```typescript\nconst access = await client.users.checkAccess(companyId, { id: userId });\n```\n\n## 4. Architecture Patterns\n\n### Pattern A: Stateless \u002F No-Database Architecture\n\nUse Whop entities as your datastore instead of running your own database:\n\n| Your concept | Whop entity | Store custom data via |\n|--------------|-------------|----------------------|\n| User accounts | Companies | `metadata` on company |\n| Listings \u002F catalog items | Products | `description` (can store JSON) |\n| Pricing \u002F variants | Plans | plan fields + `metadata` |\n| Purchases \u002F bookings | Memberships | membership lookup |\n\nThis works well for marketplaces, booking platforms, and listing sites where Whop handles all transactional state.\n\n### Pattern B: Two-Sided Marketplace (Connected Accounts)\n\nEach vendor\u002Fcreator gets a child company. Platform takes `application_fee_amount` on checkouts:\n\n```typescript\nconst vendor = await client.companies.create({\n  parent_company_id: \"biz_yourplatform\",\n  email: \"vendor@example.com\",\n  title: \"Vendor Store\",\n  metadata: { vendor_tier: \"gold\" },\n});\n\nconst checkout = await client.checkoutConfigurations.create({\n  company_id: vendor.id,\n  mode: \"payment\",\n  redirect_url: \"https:\u002F\u002Fyourplatform.com\u002Fcomplete\",\n  plan: {\n    company_id: vendor.id, product_id: \"prod_xxx\",\n    initial_price: 5000, plan_type: \"one_time\", currency: \"usd\",\n    visibility: \"hidden\", release_method: \"buy_now\",\n    application_fee_amount: 500, \u002F\u002F must be > 0 AND \u003C total\n  },\n});\n\u002F\u002F Dynamic fees: Math.round(price * (tier === \"gold\" ? 0.05 : 0.10))\n```\n\n### Pattern C: Platform Treasury Model\n\nAll payments go to the platform. Platform distributes via transfers after admin approval:\n\n```typescript\n\u002F\u002F 1. Checkout to platform (no application_fee)\nconst checkout = await client.checkoutConfigurations.create({\n  company_id: \"biz_yourplatform\",\n  plan: { initial_price: 5000, plan_type: \"one_time\" },\n});\n\u002F\u002F 2. Check balance\nconst ledger = await client.ledgerAccounts.retrieve(\"biz_yourplatform\");\n\u002F\u002F 3. Transfer to vendor\nconst transfer = await client.transfers.create({\n  amount: 4500, currency: \"usd\",         \u002F\u002F amount in CENTS\n  origin_id: \"biz_yourplatform\", destination_id: \"biz_vendor\",\n  metadata: { order_id: \"order_123\" }, notes: \"Payout for order #123\",\n  idempotence_key: \"transfer_order_123\", \u002F\u002F prevents duplicates\n});\n```\n\n## 5. Products & Plans\n\n### Products API\n\nProducts are the catalog layer above plans. A product has multiple plans (pricing variants).\n\n> Use `product_id` to link a plan to a product. `access_pass_id` is a legacy alias — prefer `product_id` for new integrations.\n\n```typescript\nconst product = await client.products.create({\n  company_id: \"biz_xxx\",\n  title: \"Premium Course\",\n  description: JSON.stringify({ category: \"education\", level: \"advanced\" }), \u002F\u002F can store JSON\n  visibility: \"visible\", \u002F\u002F or \"hidden\"\n});\nawait client.products.update(product.id, { title: \"Updated Title\" });\nconst products = await client.products.list({ company_id: \"biz_xxx\" });\n```\n\n### Plans API\n\n```typescript\n\u002F\u002F One-time payment plan\nconst plan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  initial_price: 2999,     \u002F\u002F $29.99\n  plan_type: \"one_time\",\n  currency: \"usd\",\n  visibility: \"visible\",   \u002F\u002F or \"hidden\" for checkout-only plans\n  release_method: \"buy_now\",\n});\n\n\u002F\u002F Subscription plan\nconst subPlan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  plan_type: \"renewal\",\n  initial_price: 999,\n  renewal_price: 999,\n  billing_period: 30,       \u002F\u002F days\n  currency: \"usd\",\n});\n\n\u002F\u002F Limited stock plan (inventory)\nconst limitedPlan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  initial_price: 4999,\n  plan_type: \"one_time\",\n  stock: 100,               \u002F\u002F sold out after 100 purchases\n});\n\nconsole.log(plan.purchase_url); \u002F\u002F shareable checkout link\n```\n\n### Async Iteration for Paginated Results\n\nAll `.list()` methods return async iterators:\n\n```typescript\nfor await (const product of await client.products.list({ company_id: \"biz_xxx\" })) {\n  console.log(product.title);\n}\n\nfor await (const company of await client.companies.list({ parent_company_id: \"biz_xxx\" })) {\n  console.log(company.title, company.metadata);\n}\n```\n\n## 6. Checkout\n\n### Option A: Checkout Links (Simplest)\n\nCreate a plan, redirect to `plan.purchase_url`. Sandbox: `https:\u002F\u002Fsandbox.whop.com\u002Fcheckout\u002F{plan.id}`.\n\n### Option B: Embedded Checkout (Custom UI)\n\n**Server — create checkout configuration:**\n\n```typescript\nconst config = await client.checkoutConfigurations.create({\n  company_id: \"biz_xxx\",\n  mode: \"payment\",\n  redirect_url: \"https:\u002F\u002Fyoursite.com\u002Fcomplete\",\n  plan: {\n    company_id: \"biz_xxx\",\n    product_id: \"prod_xxx\",\n    initial_price: 1000,\n    plan_type: \"one_time\",\n    currency: \"usd\",\n    visibility: \"hidden\",\n    release_method: \"buy_now\",\n    application_fee_amount: 100, \u002F\u002F optional platform fee\n  },\n  metadata: { order_id: \"order_123\" },\n});\n\u002F\u002F config.id = sessionId for client\n\u002F\u002F config.purchase_url = direct link\n\u002F\u002F config.plan.id = created plan ID\n```\n\n**Client — render embed:**\n\n```tsx\nimport { WhopCheckoutEmbed } from \"@whop\u002Fcheckout\u002Freact\";\n\n\u003CWhopCheckoutEmbed\n  sessionId={config.id}\n  returnUrl=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n  environment=\"production\"  \u002F\u002F or \"sandbox\"\n  themeOptions={{ accentColor: \"#FF6243\", highContrast: true }}\n  onComplete={(paymentId) => console.log(\"Paid:\", paymentId)}\n\u002F>\n```\n\nIn production, `redirect_url` must be HTTPS. Localhost (HTTP) works in sandbox but will be rejected in production.\n\nOr use `planId` directly (no server config needed):\n\n```tsx\n\u003CWhopCheckoutEmbed\n  planId=\"plan_xxx\"\n  returnUrl=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n  environment=\"sandbox\"\n\u002F>\n```\n\n### Option C: Aggregated Cart Checkout\n\nAggregate cart total into one checkout, serialize items in `metadata.cart`:\n\n```typescript\nconst total = cartItems.reduce((sum, i) => sum + i.price * i.qty, 0);\nconst config = await client.checkoutConfigurations.create({\n  company_id: \"biz_xxx\",\n  plan: { initial_price: total, plan_type: \"one_time\" },\n  metadata: { cart: JSON.stringify(cartItems) },\n});\n```\n\n### Option D: Vanilla JS Checkout\n\n```html\n\u003Cscript async defer src=\"https:\u002F\u002Fjs.whop.com\u002Fstatic\u002Fcheckout\u002Floader.js\">\u003C\u002Fscript>\n\u003Cdiv\n  data-whop-checkout-plan-id=\"plan_xxx\"\n  data-whop-checkout-return-url=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n>\u003C\u002Fdiv>\n```\n\nSee `references\u002Fcheckout-embed.md` for full prop reference, programmatic controls, and sandbox testing.\n\n## 7. Connected Accounts\n\n```typescript\n\u002F\u002F Create\nconst company = await client.companies.create({\n  parent_company_id: \"biz_yourplatform\",\n  email: \"creator@example.com\", title: \"Creator Store\",\n  metadata: { tier: \"free\" },\n});\n\u002F\u002F List (async iterator)\nfor await (const co of await client.companies.list({ parent_company_id: \"biz_yourplatform\" })) {\n  console.log(co.id, co.title);\n}\n\u002F\u002F Update metadata (SDK typing gap — use type cast)\nawait (client.companies as any).update(company.id, { metadata: { tier: \"premium\" } });\n```\n\n### Account Onboarding & KYC\n\n```typescript\n\u002F\u002F use_case: \"hosted_kyc\" | \"hosted_payouts\" | \"account_onboarding\"\nconst link = await client.accountLinks.create({\n  company_id: \"biz_xxx\", use_case: \"hosted_kyc\",\n  return_url: \"https:\u002F\u002Fyourplatform.com\u002Fdashboard\",\n  refresh_url: \"https:\u002F\u002Fyourplatform.com\u002Frefresh\",\n});\n\u002F\u002F Redirect to link.url\n```\n\n### Ledger & Verification: `await client.ledgerAccounts.retrieve(\"biz_xxx\")` — returns balances, KYC status, payments_approval_status.\n\n## 8. Payouts\n\n### Funding Your Platform Balance (Top-ups)\n\nBefore you can send transfers to connected accounts, your platform needs a positive balance. Use the Top-ups API to add funds by charging a saved payment method. **Top-ups have no fees.**\n\n```typescript\n\u002F\u002F 1. First, save a payment method via the Whop Dashboard (Settings > Payment Methods)\n\u002F\u002F 2. Then top up programmatically:\nconst topup = await client.topups.create({\n  company_id: \"biz_your_platform\",\n  amount: 50000, \u002F\u002F $500.00 in cents\n  currency: \"usd\",\n  payment_method_id: \"pm_saved_method_id\",\n});\n\u002F\u002F Listen for payment.succeeded webhook to confirm\n```\n\n**Three ways money enters a platform:**\n1. **Top-ups** — charge a saved payment method (ACH, card). Best for platforms that collect funds externally (wire, invoice) and need to fund their Whop balance for payouts.\n2. **Direct charges** — customers pay connected accounts directly, platform takes an `application_fee_amount`. Money flows through checkout.\n3. **Transfers model** — customers pay the platform via checkout, platform distributes to connected accounts via `transfers.create()`.\n\nSee [Add funds to your balance](https:\u002F\u002Fdocs.whop.com\u002Fdeveloper\u002Fplatforms\u002Fadd-funds-to-your-balance) for full guide.\n\n### Embedded Payout Components (React)\n\n```tsx\nimport { PayoutsSession, VerifyElement, AddPayoutMethodElement } from \"@whop\u002Fembedded-components-react-js\";\nimport { loadWhopElements } from \"@whop\u002Fembedded-components-vanilla-js\";\n\nconst elements = loadWhopElements({ environment: \"production\" }); \u002F\u002F or \"sandbox\"\n\u002F\u002F Server: const token = await client.accessTokens.create({ company_id: \"biz_vendor\" });\n\nfunction VendorPayouts({ token, companyId }: { token: string; companyId: string }) {\n  return (\n    \u003CPayoutsSession token={token} companyId={companyId} redirectUrl=\"\u002Fdashboard\">\n      \u003CVerifyElement \u002F>\n      \u003CAddPayoutMethodElement \u002F>\n      {\u002F* Also: BalanceElement, WithdrawElement, PayoutMethodsElement *\u002F}\n    \u003C\u002FPayoutsSession>\n  );\n}\n```\n\n### Check Payout Method\n\n```typescript\nconst methods = await client.payoutMethods.list({ company_id: \"biz_xxx\" });\nconst hasDefault = methods.some((m: any) => m.is_default);\n```\n\n### Transfers (cents) & Withdrawals (dollars)\n\n```typescript\n\u002F\u002F Transfers — amount in CENTS\nawait client.transfers.create({\n  amount: 4500, currency: \"usd\",\n  origin_id: \"biz_platform\", destination_id: \"biz_vendor\",\n  metadata: { order_id: \"order_123\" }, notes: \"Weekly payout\",\n  idempotence_key: \"payout_week12_vendor456\",\n});\n\u002F\u002F Withdrawals — amount in DOLLARS (different!)\nawait client.withdrawals.create({ company_id: \"biz_xxx\", amount: 45.00 });\n```\n\nSee `references\u002Fpayouts.md` for hosted payouts, embedded wallet components, and the interactive playground.\n\n## 9. Webhooks\n\n**Setup:** Dashboard > Developer > Create Webhook > select events > provide URL.\n\n```typescript\nimport type { NextRequest } from \"next\u002Fserver\";\nimport { whopsdk } from \"@\u002Flib\u002Fwhop-sdk\";\n\nexport async function POST(request: NextRequest): Promise\u003CResponse> {\n  const body = await request.text();\n  const headers = Object.fromEntries(request.headers);\n  const webhookData = whopsdk.webhooks.unwrap(body, { headers });\n\n  \u002F\u002F GOTCHA: event field is `event`, not `type`\n  \u002F\u002F GOTCHA: events may arrive with underscores: \"membership_went_valid\"\n  const eventType = webhookData.event.replace(\u002F_\u002Fg, \".\"); \u002F\u002F normalize\n\n  switch (eventType) {\n    case \"payment.succeeded\":\n      \u002F\u002F handle payment\n      break;\n    case \"membership.went.valid\":\n      \u002F\u002F handle activation\n      break;\n  }\n\n  return new Response(\"OK\", { status: 200 }); \u002F\u002F return 2xx quickly!\n}\n```\n\nSee `references\u002Fwebhooks.md` for all events, company vs app webhooks, and validation.\n\n## 10. Notifications\n\nSend push notifications to users with deep linking:\n\n```typescript\nawait client.notifications.create({\n  company_id: \"biz_xxx\",\n  user_id: \"user_xxx\",\n  title: \"Your order shipped!\",\n  content: \"Track your order in the app.\",\n  rest_path: \"\u002Forders\u002Forder_123\", \u002F\u002F deep link path within your app\n});\n```\n\n## 11. Chat SDK\n\nEmbed real-time chat via `ChatElement` inside `ChatSession` + `Elements` wrappers. See `references\u002Fchat-sdk.md` for React, Vanilla JS, and Swift examples.\n\n## 12. Common Gotchas\n\n1. **Transfers use cents, Withdrawals use dollars** — `transfers.create({ amount: 4500 })` = $45.00, but `withdrawals.create({ amount: 45 })` = $45.00.\n2. **`application_fee_amount` must be > 0 AND \u003C total price** — zero or equal-to-total will error.\n3. **Webhook `event` field, not `type`** — The webhook body uses `event` as the key. Some docs incorrectly show `type`.\n4. **Webhook events may use underscores** — `membership_went_valid` instead of `membership.went.valid`. Normalize with `.replace(\u002F_\u002Fg, \".\")`.\n5. **`returnUrl` is required for external payment methods** — Apple Pay, Google Pay, PayPal redirects fail without it.\n6. **Webhook secret must be base64-encoded** — Pass `btoa(process.env.WHOP_WEBHOOK_SECRET)` to SDK's `webhookKey`.\n7. **Return 2xx quickly from webhooks** — Whop retries on timeout. Use `waitUntil()` or background jobs for heavy processing.\n8. **Access tokens expire** — Default 1 hour, max 3 hours. Refresh before expiry for embedded components.\n9. **Company metadata SDK typing gap** — Update metadata via type cast: `(client.companies as any).update(id, { metadata })`.\n10. **SDK init without appID is valid** — Company API Keys don't need `appID`.\n11. **Checkout config response includes `purchase_url` and `plan.id`** — Use these for redirect flows or plan references.\n12. **Sandbox checkout URL** — `https:\u002F\u002Fsandbox.whop.com\u002Fcheckout\u002F{planId}`.\n13. **`setupFutureUsage: \"off_session\"`** — Required on checkout embed when you plan to charge the user later via `chargeUser` API.\n14. **Permission re-approval** — After adding new app permissions, API calls fail with `403` until the company re-approves.\n15. **Always use idempotence keys** — On transfers and any money-movement operation to prevent duplicates.\n16. **Payout methods pagination duplicates** — Payout methods list may return duplicates during pagination — deduplicate by `.id` when consuming the full list.\n17. **Auto-withdraw after transfer** — After approving a transfer, consider auto-initiating a withdrawal to the recipient's default payout method so they don't have to manually withdraw. Note: transfers use cents, withdrawals use dollars.\n\n## 13. Permissions System\n\nApps must request permissions before accessing company data. Each API endpoint has required scopes.\n\n**Setup:** Dashboard > Developer > App > Permissions tab > Add permissions with justification > Install app > Approve.\n\nWhen updating permissions, creators see a \"Re-approve\" button. Handle `403` errors gracefully until re-approved.\n\n## 14. MCP Server Access\n\n| Transport | URL |\n|-----------|-----|\n| HTTP Streaming (Cursor) | `https:\u002F\u002Fmcp.whop.com\u002Fmcp` |\n| SSE (Claude) | `https:\u002F\u002Fmcp.whop.com\u002Fsse` |\n| Docs MCP | `https:\u002F\u002Fdocs.whop.com\u002Fmcp` |\n\n## 15. Reference Files\n\n| File | Contents |\n|------|----------|\n| `references\u002Fcheckout-embed.md` | Full prop reference, programmatic controls, Vanilla JS, sandbox, Apple Pay |\n| `references\u002Fpayouts.md` | Embedded wallet components, hosted payouts, account links, playground |\n| `references\u002Fchat-sdk.md` | Chat SDK for React, Vanilla JS, Swift with full examples |\n| `references\u002Fapi-reference.md` | SDK initialization, key endpoints, MCP server setup |\n| `references\u002Fwebhooks.md` | Webhook events, validation, company vs app webhooks |\n| `codebase-scan.md` | Prompt to analyze a client's codebase for Whop integration planning |\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,48,54,61,251,257,268,586,591,736,742,749,840,846,923,937,943,1035,1041,1047,1052,1168,1173,1179,1192,1801,1807,1812,2324,2330,2336,2341,2372,2800,2806,3601,3607,3620,3936,3942,3948,3968,3974,3982,4429,4437,4732,4745,4758,4855,4861,4873,5189,5195,5338,5351,5357,5841,5847,6045,6059,6065,6071,6081,6285,6293,6342,6357,6363,6808,6814,6979,6985,7331,7343,7349,7359,8025,8037,8043,8048,8253,8259,8296,8302,8634,8640,8645,8654,8666,8672,8745,8751,8871],{"type":40,"tag":41,"props":42,"children":44},"element","h1",{"id":43},"whop-payments-network-integration",[45],{"type":46,"value":47},"text","Whop Payments Network Integration",{"type":40,"tag":49,"props":50,"children":51},"p",{},[52],{"type":46,"value":53},"Whop provides a full payments network: accept payments (pay-ins), send payouts, embed checkout and wallet components, handle webhooks, manage connected accounts, and send notifications. This skill covers the patterns you need to integrate Whop into any platform.",{"type":40,"tag":55,"props":56,"children":58},"h2",{"id":57},"_1-sdk-packages",[59],{"type":46,"value":60},"1. SDK Packages",{"type":40,"tag":62,"props":63,"children":64},"table",{},[65,89],{"type":40,"tag":66,"props":67,"children":68},"thead",{},[69],{"type":40,"tag":70,"props":71,"children":72},"tr",{},[73,79,84],{"type":40,"tag":74,"props":75,"children":76},"th",{},[77],{"type":46,"value":78},"Package",{"type":40,"tag":74,"props":80,"children":81},{},[82],{"type":46,"value":83},"Purpose",{"type":40,"tag":74,"props":85,"children":86},{},[87],{"type":46,"value":88},"Install",{"type":40,"tag":90,"props":91,"children":92},"tbody",{},[93,121,147,173,199,225],{"type":40,"tag":70,"props":94,"children":95},{},[96,107,112],{"type":40,"tag":97,"props":98,"children":99},"td",{},[100],{"type":40,"tag":101,"props":102,"children":104},"code",{"className":103},[],[105],{"type":46,"value":106},"@whop\u002Fsdk",{"type":40,"tag":97,"props":108,"children":109},{},[110],{"type":46,"value":111},"Server-side API client (TypeScript)",{"type":40,"tag":97,"props":113,"children":114},{},[115],{"type":40,"tag":101,"props":116,"children":118},{"className":117},[],[119],{"type":46,"value":120},"npm install @whop\u002Fsdk",{"type":40,"tag":70,"props":122,"children":123},{},[124,133,138],{"type":40,"tag":97,"props":125,"children":126},{},[127],{"type":40,"tag":101,"props":128,"children":130},{"className":129},[],[131],{"type":46,"value":132},"whop-sdk",{"type":40,"tag":97,"props":134,"children":135},{},[136],{"type":46,"value":137},"Server-side API client (Python)",{"type":40,"tag":97,"props":139,"children":140},{},[141],{"type":40,"tag":101,"props":142,"children":144},{"className":143},[],[145],{"type":46,"value":146},"pip install whop-sdk",{"type":40,"tag":70,"props":148,"children":149},{},[150,159,164],{"type":40,"tag":97,"props":151,"children":152},{},[153],{"type":40,"tag":101,"props":154,"children":156},{"className":155},[],[157],{"type":46,"value":158},"whop_sdk",{"type":40,"tag":97,"props":160,"children":161},{},[162],{"type":46,"value":163},"Server-side API client (Ruby)",{"type":40,"tag":97,"props":165,"children":166},{},[167],{"type":40,"tag":101,"props":168,"children":170},{"className":169},[],[171],{"type":46,"value":172},"gem install whop_sdk",{"type":40,"tag":70,"props":174,"children":175},{},[176,185,190],{"type":40,"tag":97,"props":177,"children":178},{},[179],{"type":40,"tag":101,"props":180,"children":182},{"className":181},[],[183],{"type":46,"value":184},"@whop\u002Fcheckout",{"type":40,"tag":97,"props":186,"children":187},{},[188],{"type":46,"value":189},"Embedded checkout React component",{"type":40,"tag":97,"props":191,"children":192},{},[193],{"type":40,"tag":101,"props":194,"children":196},{"className":195},[],[197],{"type":46,"value":198},"npm install @whop\u002Fcheckout",{"type":40,"tag":70,"props":200,"children":201},{},[202,211,216],{"type":40,"tag":97,"props":203,"children":204},{},[205],{"type":40,"tag":101,"props":206,"children":208},{"className":207},[],[209],{"type":46,"value":210},"@whop\u002Fembedded-components-react-js",{"type":40,"tag":97,"props":212,"children":213},{},[214],{"type":46,"value":215},"Embedded payout\u002Fwallet\u002FKYC\u002Fchat components (React)",{"type":40,"tag":97,"props":217,"children":218},{},[219],{"type":40,"tag":101,"props":220,"children":222},{"className":221},[],[223],{"type":46,"value":224},"npm install @whop\u002Fembedded-components-react-js",{"type":40,"tag":70,"props":226,"children":227},{},[228,237,242],{"type":40,"tag":97,"props":229,"children":230},{},[231],{"type":40,"tag":101,"props":232,"children":234},{"className":233},[],[235],{"type":46,"value":236},"@whop\u002Fembedded-components-vanilla-js",{"type":40,"tag":97,"props":238,"children":239},{},[240],{"type":46,"value":241},"Embedded components (Vanilla JS)",{"type":40,"tag":97,"props":243,"children":244},{},[245],{"type":40,"tag":101,"props":246,"children":248},{"className":247},[],[249],{"type":46,"value":250},"npm install @whop\u002Fembedded-components-vanilla-js",{"type":40,"tag":55,"props":252,"children":254},{"id":253},"_2-sdk-setup",[255],{"type":46,"value":256},"2. SDK Setup",{"type":40,"tag":49,"props":258,"children":259},{},[260,262],{"type":46,"value":261},"Base URL: ",{"type":40,"tag":101,"props":263,"children":265},{"className":264},[],[266],{"type":46,"value":267},"https:\u002F\u002Fapi.whop.com\u002Fapi\u002Fv1",{"type":40,"tag":269,"props":270,"children":275},"pre",{"className":271,"code":272,"language":273,"meta":274,"style":274},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import Whop from \"@whop\u002Fsdk\";\n\n\u002F\u002F Company API Key — access your own company's data or connected accounts\nconst client = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  \u002F\u002F appID is NOT required for Company API Keys\n});\n\n\u002F\u002F App API Key — access data on companies that installed your app\nconst appClient = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  appID: \"app_xxxxxxxxxxxxxx\",\n});\n","typescript","",[276],{"type":40,"tag":101,"props":277,"children":278},{"__ignoreMap":274},[279,322,332,342,383,427,436,454,462,471,504,540,570],{"type":40,"tag":280,"props":281,"children":283},"span",{"class":282,"line":24},"line",[284,290,296,301,307,312,317],{"type":40,"tag":280,"props":285,"children":287},{"style":286},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[288],{"type":46,"value":289},"import",{"type":40,"tag":280,"props":291,"children":293},{"style":292},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[294],{"type":46,"value":295}," Whop ",{"type":40,"tag":280,"props":297,"children":298},{"style":286},[299],{"type":46,"value":300},"from",{"type":40,"tag":280,"props":302,"children":304},{"style":303},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[305],{"type":46,"value":306}," \"",{"type":40,"tag":280,"props":308,"children":310},{"style":309},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[311],{"type":46,"value":106},{"type":40,"tag":280,"props":313,"children":314},{"style":303},[315],{"type":46,"value":316},"\"",{"type":40,"tag":280,"props":318,"children":319},{"style":303},[320],{"type":46,"value":321},";\n",{"type":40,"tag":280,"props":323,"children":325},{"class":282,"line":324},2,[326],{"type":40,"tag":280,"props":327,"children":329},{"emptyLinePlaceholder":328},true,[330],{"type":46,"value":331},"\n",{"type":40,"tag":280,"props":333,"children":335},{"class":282,"line":334},3,[336],{"type":40,"tag":280,"props":337,"children":339},{"style":338},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[340],{"type":46,"value":341},"\u002F\u002F Company API Key — access your own company's data or connected accounts\n",{"type":40,"tag":280,"props":343,"children":345},{"class":282,"line":344},4,[346,352,357,362,367,373,378],{"type":40,"tag":280,"props":347,"children":349},{"style":348},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[350],{"type":46,"value":351},"const",{"type":40,"tag":280,"props":353,"children":354},{"style":292},[355],{"type":46,"value":356}," client ",{"type":40,"tag":280,"props":358,"children":359},{"style":303},[360],{"type":46,"value":361},"=",{"type":40,"tag":280,"props":363,"children":364},{"style":303},[365],{"type":46,"value":366}," new",{"type":40,"tag":280,"props":368,"children":370},{"style":369},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[371],{"type":46,"value":372}," Whop",{"type":40,"tag":280,"props":374,"children":375},{"style":292},[376],{"type":46,"value":377},"(",{"type":40,"tag":280,"props":379,"children":380},{"style":303},[381],{"type":46,"value":382},"{\n",{"type":40,"tag":280,"props":384,"children":386},{"class":282,"line":385},5,[387,393,398,403,408,413,417,422],{"type":40,"tag":280,"props":388,"children":390},{"style":389},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[391],{"type":46,"value":392},"  apiKey",{"type":40,"tag":280,"props":394,"children":395},{"style":303},[396],{"type":46,"value":397},":",{"type":40,"tag":280,"props":399,"children":400},{"style":292},[401],{"type":46,"value":402}," process",{"type":40,"tag":280,"props":404,"children":405},{"style":303},[406],{"type":46,"value":407},".",{"type":40,"tag":280,"props":409,"children":410},{"style":292},[411],{"type":46,"value":412},"env",{"type":40,"tag":280,"props":414,"children":415},{"style":303},[416],{"type":46,"value":407},{"type":40,"tag":280,"props":418,"children":419},{"style":292},[420],{"type":46,"value":421},"WHOP_API_KEY",{"type":40,"tag":280,"props":423,"children":424},{"style":303},[425],{"type":46,"value":426},",\n",{"type":40,"tag":280,"props":428,"children":430},{"class":282,"line":429},6,[431],{"type":40,"tag":280,"props":432,"children":433},{"style":338},[434],{"type":46,"value":435},"  \u002F\u002F appID is NOT required for Company API Keys\n",{"type":40,"tag":280,"props":437,"children":439},{"class":282,"line":438},7,[440,445,450],{"type":40,"tag":280,"props":441,"children":442},{"style":303},[443],{"type":46,"value":444},"}",{"type":40,"tag":280,"props":446,"children":447},{"style":292},[448],{"type":46,"value":449},")",{"type":40,"tag":280,"props":451,"children":452},{"style":303},[453],{"type":46,"value":321},{"type":40,"tag":280,"props":455,"children":457},{"class":282,"line":456},8,[458],{"type":40,"tag":280,"props":459,"children":460},{"emptyLinePlaceholder":328},[461],{"type":46,"value":331},{"type":40,"tag":280,"props":463,"children":465},{"class":282,"line":464},9,[466],{"type":40,"tag":280,"props":467,"children":468},{"style":338},[469],{"type":46,"value":470},"\u002F\u002F App API Key — access data on companies that installed your app\n",{"type":40,"tag":280,"props":472,"children":474},{"class":282,"line":473},10,[475,479,484,488,492,496,500],{"type":40,"tag":280,"props":476,"children":477},{"style":348},[478],{"type":46,"value":351},{"type":40,"tag":280,"props":480,"children":481},{"style":292},[482],{"type":46,"value":483}," appClient ",{"type":40,"tag":280,"props":485,"children":486},{"style":303},[487],{"type":46,"value":361},{"type":40,"tag":280,"props":489,"children":490},{"style":303},[491],{"type":46,"value":366},{"type":40,"tag":280,"props":493,"children":494},{"style":369},[495],{"type":46,"value":372},{"type":40,"tag":280,"props":497,"children":498},{"style":292},[499],{"type":46,"value":377},{"type":40,"tag":280,"props":501,"children":502},{"style":303},[503],{"type":46,"value":382},{"type":40,"tag":280,"props":505,"children":507},{"class":282,"line":506},11,[508,512,516,520,524,528,532,536],{"type":40,"tag":280,"props":509,"children":510},{"style":389},[511],{"type":46,"value":392},{"type":40,"tag":280,"props":513,"children":514},{"style":303},[515],{"type":46,"value":397},{"type":40,"tag":280,"props":517,"children":518},{"style":292},[519],{"type":46,"value":402},{"type":40,"tag":280,"props":521,"children":522},{"style":303},[523],{"type":46,"value":407},{"type":40,"tag":280,"props":525,"children":526},{"style":292},[527],{"type":46,"value":412},{"type":40,"tag":280,"props":529,"children":530},{"style":303},[531],{"type":46,"value":407},{"type":40,"tag":280,"props":533,"children":534},{"style":292},[535],{"type":46,"value":421},{"type":40,"tag":280,"props":537,"children":538},{"style":303},[539],{"type":46,"value":426},{"type":40,"tag":280,"props":541,"children":543},{"class":282,"line":542},12,[544,549,553,557,562,566],{"type":40,"tag":280,"props":545,"children":546},{"style":389},[547],{"type":46,"value":548},"  appID",{"type":40,"tag":280,"props":550,"children":551},{"style":303},[552],{"type":46,"value":397},{"type":40,"tag":280,"props":554,"children":555},{"style":303},[556],{"type":46,"value":306},{"type":40,"tag":280,"props":558,"children":559},{"style":309},[560],{"type":46,"value":561},"app_xxxxxxxxxxxxxx",{"type":40,"tag":280,"props":563,"children":564},{"style":303},[565],{"type":46,"value":316},{"type":40,"tag":280,"props":567,"children":568},{"style":303},[569],{"type":46,"value":426},{"type":40,"tag":280,"props":571,"children":573},{"class":282,"line":572},13,[574,578,582],{"type":40,"tag":280,"props":575,"children":576},{"style":303},[577],{"type":46,"value":444},{"type":40,"tag":280,"props":579,"children":580},{"style":292},[581],{"type":46,"value":449},{"type":40,"tag":280,"props":583,"children":584},{"style":303},[585],{"type":46,"value":321},{"type":40,"tag":49,"props":587,"children":588},{},[589],{"type":46,"value":590},"For webhook verification, add the webhook secret:",{"type":40,"tag":269,"props":592,"children":594},{"className":271,"code":593,"language":273,"meta":274,"style":274},"const client = new Whop({\n  apiKey: process.env.WHOP_API_KEY,\n  webhookKey: btoa(process.env.WHOP_WEBHOOK_SECRET || \"\"),\n});\n",[595],{"type":40,"tag":101,"props":596,"children":597},{"__ignoreMap":274},[598,629,664,721],{"type":40,"tag":280,"props":599,"children":600},{"class":282,"line":24},[601,605,609,613,617,621,625],{"type":40,"tag":280,"props":602,"children":603},{"style":348},[604],{"type":46,"value":351},{"type":40,"tag":280,"props":606,"children":607},{"style":292},[608],{"type":46,"value":356},{"type":40,"tag":280,"props":610,"children":611},{"style":303},[612],{"type":46,"value":361},{"type":40,"tag":280,"props":614,"children":615},{"style":303},[616],{"type":46,"value":366},{"type":40,"tag":280,"props":618,"children":619},{"style":369},[620],{"type":46,"value":372},{"type":40,"tag":280,"props":622,"children":623},{"style":292},[624],{"type":46,"value":377},{"type":40,"tag":280,"props":626,"children":627},{"style":303},[628],{"type":46,"value":382},{"type":40,"tag":280,"props":630,"children":631},{"class":282,"line":324},[632,636,640,644,648,652,656,660],{"type":40,"tag":280,"props":633,"children":634},{"style":389},[635],{"type":46,"value":392},{"type":40,"tag":280,"props":637,"children":638},{"style":303},[639],{"type":46,"value":397},{"type":40,"tag":280,"props":641,"children":642},{"style":292},[643],{"type":46,"value":402},{"type":40,"tag":280,"props":645,"children":646},{"style":303},[647],{"type":46,"value":407},{"type":40,"tag":280,"props":649,"children":650},{"style":292},[651],{"type":46,"value":412},{"type":40,"tag":280,"props":653,"children":654},{"style":303},[655],{"type":46,"value":407},{"type":40,"tag":280,"props":657,"children":658},{"style":292},[659],{"type":46,"value":421},{"type":40,"tag":280,"props":661,"children":662},{"style":303},[663],{"type":46,"value":426},{"type":40,"tag":280,"props":665,"children":666},{"class":282,"line":334},[667,672,676,681,686,690,694,698,703,708,713,717],{"type":40,"tag":280,"props":668,"children":669},{"style":389},[670],{"type":46,"value":671},"  webhookKey",{"type":40,"tag":280,"props":673,"children":674},{"style":303},[675],{"type":46,"value":397},{"type":40,"tag":280,"props":677,"children":678},{"style":369},[679],{"type":46,"value":680}," btoa",{"type":40,"tag":280,"props":682,"children":683},{"style":292},[684],{"type":46,"value":685},"(process",{"type":40,"tag":280,"props":687,"children":688},{"style":303},[689],{"type":46,"value":407},{"type":40,"tag":280,"props":691,"children":692},{"style":292},[693],{"type":46,"value":412},{"type":40,"tag":280,"props":695,"children":696},{"style":303},[697],{"type":46,"value":407},{"type":40,"tag":280,"props":699,"children":700},{"style":292},[701],{"type":46,"value":702},"WHOP_WEBHOOK_SECRET ",{"type":40,"tag":280,"props":704,"children":705},{"style":303},[706],{"type":46,"value":707},"||",{"type":40,"tag":280,"props":709,"children":710},{"style":303},[711],{"type":46,"value":712}," \"\"",{"type":40,"tag":280,"props":714,"children":715},{"style":292},[716],{"type":46,"value":449},{"type":40,"tag":280,"props":718,"children":719},{"style":303},[720],{"type":46,"value":426},{"type":40,"tag":280,"props":722,"children":723},{"class":282,"line":344},[724,728,732],{"type":40,"tag":280,"props":725,"children":726},{"style":303},[727],{"type":46,"value":444},{"type":40,"tag":280,"props":729,"children":730},{"style":292},[731],{"type":46,"value":449},{"type":40,"tag":280,"props":733,"children":734},{"style":303},[735],{"type":46,"value":321},{"type":40,"tag":55,"props":737,"children":739},{"id":738},"_3-authentication",[740],{"type":46,"value":741},"3. Authentication",{"type":40,"tag":743,"props":744,"children":746},"h3",{"id":745},"api-key-types",[747],{"type":46,"value":748},"API Key Types",{"type":40,"tag":62,"props":750,"children":751},{},[752,773],{"type":40,"tag":66,"props":753,"children":754},{},[755],{"type":40,"tag":70,"props":756,"children":757},{},[758,763,768],{"type":40,"tag":74,"props":759,"children":760},{},[761],{"type":46,"value":762},"Type",{"type":40,"tag":74,"props":764,"children":765},{},[766],{"type":46,"value":767},"When to use",{"type":40,"tag":74,"props":769,"children":770},{},[771],{"type":46,"value":772},"How to get",{"type":40,"tag":90,"props":774,"children":775},{},[776,798,819],{"type":40,"tag":70,"props":777,"children":778},{},[779,788,793],{"type":40,"tag":97,"props":780,"children":781},{},[782],{"type":40,"tag":783,"props":784,"children":785},"strong",{},[786],{"type":46,"value":787},"Company API Key",{"type":40,"tag":97,"props":789,"children":790},{},[791],{"type":46,"value":792},"Your own company data, connected accounts, platform operations",{"type":40,"tag":97,"props":794,"children":795},{},[796],{"type":46,"value":797},"Dashboard > Developer > Company API Keys",{"type":40,"tag":70,"props":799,"children":800},{},[801,809,814],{"type":40,"tag":97,"props":802,"children":803},{},[804],{"type":40,"tag":783,"props":805,"children":806},{},[807],{"type":46,"value":808},"App API Key",{"type":40,"tag":97,"props":810,"children":811},{},[812],{"type":46,"value":813},"Access data on companies that installed your app",{"type":40,"tag":97,"props":815,"children":816},{},[817],{"type":46,"value":818},"Dashboard > Developer > Create App > Env Vars",{"type":40,"tag":70,"props":820,"children":821},{},[822,830,835],{"type":40,"tag":97,"props":823,"children":824},{},[825],{"type":40,"tag":783,"props":826,"children":827},{},[828],{"type":46,"value":829},"OAuth Token",{"type":40,"tag":97,"props":831,"children":832},{},[833],{"type":46,"value":834},"Act on behalf of a specific user",{"type":40,"tag":97,"props":836,"children":837},{},[838],{"type":46,"value":839},"OAuth 2.1 + PKCE flow",{"type":40,"tag":743,"props":841,"children":843},{"id":842},"oauth-nextauth-v5-oidc",[844],{"type":46,"value":845},"OAuth \u002F NextAuth v5 OIDC",{"type":40,"tag":49,"props":847,"children":848},{},[849,851,857,859,865,866,872,873,879,880,886,888,894,895,901,902,908,909,915,916,922],{"type":46,"value":850},"Key config: ",{"type":40,"tag":101,"props":852,"children":854},{"className":853},[],[855],{"type":46,"value":856},"type: \"oidc\"",{"type":46,"value":858},", ",{"type":40,"tag":101,"props":860,"children":862},{"className":861},[],[863],{"type":46,"value":864},"issuer: \"https:\u002F\u002Fapi.whop.com\"",{"type":46,"value":858},{"type":40,"tag":101,"props":867,"children":869},{"className":868},[],[870],{"type":46,"value":871},"token_endpoint_auth_method: \"none\"",{"type":46,"value":858},{"type":40,"tag":101,"props":874,"children":876},{"className":875},[],[877],{"type":46,"value":878},"id_token_signed_response_alg: \"ES256\"",{"type":46,"value":858},{"type":40,"tag":101,"props":881,"children":883},{"className":882},[],[884],{"type":46,"value":885},"checks: [\"pkce\", \"nonce\"]",{"type":46,"value":887},". Profile fields: ",{"type":40,"tag":101,"props":889,"children":891},{"className":890},[],[892],{"type":46,"value":893},"sub",{"type":46,"value":858},{"type":40,"tag":101,"props":896,"children":898},{"className":897},[],[899],{"type":46,"value":900},"name",{"type":46,"value":858},{"type":40,"tag":101,"props":903,"children":905},{"className":904},[],[906],{"type":46,"value":907},"email",{"type":46,"value":858},{"type":40,"tag":101,"props":910,"children":912},{"className":911},[],[913],{"type":46,"value":914},"picture",{"type":46,"value":858},{"type":40,"tag":101,"props":917,"children":919},{"className":918},[],[920],{"type":46,"value":921},"username",{"type":46,"value":407},{"type":40,"tag":924,"props":925,"children":926},"blockquote",{},[927],{"type":40,"tag":49,"props":928,"children":929},{},[930,935],{"type":40,"tag":783,"props":931,"children":932},{},[933],{"type":46,"value":934},"Note:",{"type":46,"value":936}," OAuth\u002FOIDC is still marked \"in development\" in official docs. The NextAuth pattern works but may change.",{"type":40,"tag":743,"props":938,"children":940},{"id":939},"admin-authorization",[941],{"type":46,"value":942},"Admin Authorization",{"type":40,"tag":269,"props":944,"children":946},{"className":271,"code":945,"language":273,"meta":274,"style":274},"const access = await client.users.checkAccess(companyId, { id: userId });\n",[947],{"type":40,"tag":101,"props":948,"children":949},{"__ignoreMap":274},[950],{"type":40,"tag":280,"props":951,"children":952},{"class":282,"line":24},[953,957,962,966,971,976,980,985,989,994,999,1004,1009,1014,1018,1023,1027,1031],{"type":40,"tag":280,"props":954,"children":955},{"style":348},[956],{"type":46,"value":351},{"type":40,"tag":280,"props":958,"children":959},{"style":292},[960],{"type":46,"value":961}," access ",{"type":40,"tag":280,"props":963,"children":964},{"style":303},[965],{"type":46,"value":361},{"type":40,"tag":280,"props":967,"children":968},{"style":286},[969],{"type":46,"value":970}," await",{"type":40,"tag":280,"props":972,"children":973},{"style":292},[974],{"type":46,"value":975}," client",{"type":40,"tag":280,"props":977,"children":978},{"style":303},[979],{"type":46,"value":407},{"type":40,"tag":280,"props":981,"children":982},{"style":292},[983],{"type":46,"value":984},"users",{"type":40,"tag":280,"props":986,"children":987},{"style":303},[988],{"type":46,"value":407},{"type":40,"tag":280,"props":990,"children":991},{"style":369},[992],{"type":46,"value":993},"checkAccess",{"type":40,"tag":280,"props":995,"children":996},{"style":292},[997],{"type":46,"value":998},"(companyId",{"type":40,"tag":280,"props":1000,"children":1001},{"style":303},[1002],{"type":46,"value":1003},",",{"type":40,"tag":280,"props":1005,"children":1006},{"style":303},[1007],{"type":46,"value":1008}," {",{"type":40,"tag":280,"props":1010,"children":1011},{"style":389},[1012],{"type":46,"value":1013}," id",{"type":40,"tag":280,"props":1015,"children":1016},{"style":303},[1017],{"type":46,"value":397},{"type":40,"tag":280,"props":1019,"children":1020},{"style":292},[1021],{"type":46,"value":1022}," userId ",{"type":40,"tag":280,"props":1024,"children":1025},{"style":303},[1026],{"type":46,"value":444},{"type":40,"tag":280,"props":1028,"children":1029},{"style":292},[1030],{"type":46,"value":449},{"type":40,"tag":280,"props":1032,"children":1033},{"style":303},[1034],{"type":46,"value":321},{"type":40,"tag":55,"props":1036,"children":1038},{"id":1037},"_4-architecture-patterns",[1039],{"type":46,"value":1040},"4. Architecture Patterns",{"type":40,"tag":743,"props":1042,"children":1044},{"id":1043},"pattern-a-stateless-no-database-architecture",[1045],{"type":46,"value":1046},"Pattern A: Stateless \u002F No-Database Architecture",{"type":40,"tag":49,"props":1048,"children":1049},{},[1050],{"type":46,"value":1051},"Use Whop entities as your datastore instead of running your own database:",{"type":40,"tag":62,"props":1053,"children":1054},{},[1055,1076],{"type":40,"tag":66,"props":1056,"children":1057},{},[1058],{"type":40,"tag":70,"props":1059,"children":1060},{},[1061,1066,1071],{"type":40,"tag":74,"props":1062,"children":1063},{},[1064],{"type":46,"value":1065},"Your concept",{"type":40,"tag":74,"props":1067,"children":1068},{},[1069],{"type":46,"value":1070},"Whop entity",{"type":40,"tag":74,"props":1072,"children":1073},{},[1074],{"type":46,"value":1075},"Store custom data via",{"type":40,"tag":90,"props":1077,"children":1078},{},[1079,1103,1127,1150],{"type":40,"tag":70,"props":1080,"children":1081},{},[1082,1087,1092],{"type":40,"tag":97,"props":1083,"children":1084},{},[1085],{"type":46,"value":1086},"User accounts",{"type":40,"tag":97,"props":1088,"children":1089},{},[1090],{"type":46,"value":1091},"Companies",{"type":40,"tag":97,"props":1093,"children":1094},{},[1095,1101],{"type":40,"tag":101,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":46,"value":1100},"metadata",{"type":46,"value":1102}," on company",{"type":40,"tag":70,"props":1104,"children":1105},{},[1106,1111,1116],{"type":40,"tag":97,"props":1107,"children":1108},{},[1109],{"type":46,"value":1110},"Listings \u002F catalog items",{"type":40,"tag":97,"props":1112,"children":1113},{},[1114],{"type":46,"value":1115},"Products",{"type":40,"tag":97,"props":1117,"children":1118},{},[1119,1125],{"type":40,"tag":101,"props":1120,"children":1122},{"className":1121},[],[1123],{"type":46,"value":1124},"description",{"type":46,"value":1126}," (can store JSON)",{"type":40,"tag":70,"props":1128,"children":1129},{},[1130,1135,1140],{"type":40,"tag":97,"props":1131,"children":1132},{},[1133],{"type":46,"value":1134},"Pricing \u002F variants",{"type":40,"tag":97,"props":1136,"children":1137},{},[1138],{"type":46,"value":1139},"Plans",{"type":40,"tag":97,"props":1141,"children":1142},{},[1143,1145],{"type":46,"value":1144},"plan fields + ",{"type":40,"tag":101,"props":1146,"children":1148},{"className":1147},[],[1149],{"type":46,"value":1100},{"type":40,"tag":70,"props":1151,"children":1152},{},[1153,1158,1163],{"type":40,"tag":97,"props":1154,"children":1155},{},[1156],{"type":46,"value":1157},"Purchases \u002F bookings",{"type":40,"tag":97,"props":1159,"children":1160},{},[1161],{"type":46,"value":1162},"Memberships",{"type":40,"tag":97,"props":1164,"children":1165},{},[1166],{"type":46,"value":1167},"membership lookup",{"type":40,"tag":49,"props":1169,"children":1170},{},[1171],{"type":46,"value":1172},"This works well for marketplaces, booking platforms, and listing sites where Whop handles all transactional state.",{"type":40,"tag":743,"props":1174,"children":1176},{"id":1175},"pattern-b-two-sided-marketplace-connected-accounts",[1177],{"type":46,"value":1178},"Pattern B: Two-Sided Marketplace (Connected Accounts)",{"type":40,"tag":49,"props":1180,"children":1181},{},[1182,1184,1190],{"type":46,"value":1183},"Each vendor\u002Fcreator gets a child company. Platform takes ",{"type":40,"tag":101,"props":1185,"children":1187},{"className":1186},[],[1188],{"type":46,"value":1189},"application_fee_amount",{"type":46,"value":1191}," on checkouts:",{"type":40,"tag":269,"props":1193,"children":1195},{"className":271,"code":1194,"language":273,"meta":274,"style":274},"const vendor = await client.companies.create({\n  parent_company_id: \"biz_yourplatform\",\n  email: \"vendor@example.com\",\n  title: \"Vendor Store\",\n  metadata: { vendor_tier: \"gold\" },\n});\n\nconst checkout = await client.checkoutConfigurations.create({\n  company_id: vendor.id,\n  mode: \"payment\",\n  redirect_url: \"https:\u002F\u002Fyourplatform.com\u002Fcomplete\",\n  plan: {\n    company_id: vendor.id, product_id: \"prod_xxx\",\n    initial_price: 5000, plan_type: \"one_time\", currency: \"usd\",\n    visibility: \"hidden\", release_method: \"buy_now\",\n    application_fee_amount: 500, \u002F\u002F must be > 0 AND \u003C total\n  },\n});\n\u002F\u002F Dynamic fees: Math.round(price * (tier === \"gold\" ? 0.05 : 0.10))\n",[1196],{"type":40,"tag":101,"props":1197,"children":1198},{"__ignoreMap":274},[1199,1249,1278,1307,1336,1379,1394,1401,1450,1480,1509,1538,1555,1609,1684,1740,1767,1776,1792],{"type":40,"tag":280,"props":1200,"children":1201},{"class":282,"line":24},[1202,1206,1211,1215,1219,1223,1227,1232,1236,1241,1245],{"type":40,"tag":280,"props":1203,"children":1204},{"style":348},[1205],{"type":46,"value":351},{"type":40,"tag":280,"props":1207,"children":1208},{"style":292},[1209],{"type":46,"value":1210}," vendor ",{"type":40,"tag":280,"props":1212,"children":1213},{"style":303},[1214],{"type":46,"value":361},{"type":40,"tag":280,"props":1216,"children":1217},{"style":286},[1218],{"type":46,"value":970},{"type":40,"tag":280,"props":1220,"children":1221},{"style":292},[1222],{"type":46,"value":975},{"type":40,"tag":280,"props":1224,"children":1225},{"style":303},[1226],{"type":46,"value":407},{"type":40,"tag":280,"props":1228,"children":1229},{"style":292},[1230],{"type":46,"value":1231},"companies",{"type":40,"tag":280,"props":1233,"children":1234},{"style":303},[1235],{"type":46,"value":407},{"type":40,"tag":280,"props":1237,"children":1238},{"style":369},[1239],{"type":46,"value":1240},"create",{"type":40,"tag":280,"props":1242,"children":1243},{"style":292},[1244],{"type":46,"value":377},{"type":40,"tag":280,"props":1246,"children":1247},{"style":303},[1248],{"type":46,"value":382},{"type":40,"tag":280,"props":1250,"children":1251},{"class":282,"line":324},[1252,1257,1261,1265,1270,1274],{"type":40,"tag":280,"props":1253,"children":1254},{"style":389},[1255],{"type":46,"value":1256},"  parent_company_id",{"type":40,"tag":280,"props":1258,"children":1259},{"style":303},[1260],{"type":46,"value":397},{"type":40,"tag":280,"props":1262,"children":1263},{"style":303},[1264],{"type":46,"value":306},{"type":40,"tag":280,"props":1266,"children":1267},{"style":309},[1268],{"type":46,"value":1269},"biz_yourplatform",{"type":40,"tag":280,"props":1271,"children":1272},{"style":303},[1273],{"type":46,"value":316},{"type":40,"tag":280,"props":1275,"children":1276},{"style":303},[1277],{"type":46,"value":426},{"type":40,"tag":280,"props":1279,"children":1280},{"class":282,"line":334},[1281,1286,1290,1294,1299,1303],{"type":40,"tag":280,"props":1282,"children":1283},{"style":389},[1284],{"type":46,"value":1285},"  email",{"type":40,"tag":280,"props":1287,"children":1288},{"style":303},[1289],{"type":46,"value":397},{"type":40,"tag":280,"props":1291,"children":1292},{"style":303},[1293],{"type":46,"value":306},{"type":40,"tag":280,"props":1295,"children":1296},{"style":309},[1297],{"type":46,"value":1298},"vendor@example.com",{"type":40,"tag":280,"props":1300,"children":1301},{"style":303},[1302],{"type":46,"value":316},{"type":40,"tag":280,"props":1304,"children":1305},{"style":303},[1306],{"type":46,"value":426},{"type":40,"tag":280,"props":1308,"children":1309},{"class":282,"line":344},[1310,1315,1319,1323,1328,1332],{"type":40,"tag":280,"props":1311,"children":1312},{"style":389},[1313],{"type":46,"value":1314},"  title",{"type":40,"tag":280,"props":1316,"children":1317},{"style":303},[1318],{"type":46,"value":397},{"type":40,"tag":280,"props":1320,"children":1321},{"style":303},[1322],{"type":46,"value":306},{"type":40,"tag":280,"props":1324,"children":1325},{"style":309},[1326],{"type":46,"value":1327},"Vendor Store",{"type":40,"tag":280,"props":1329,"children":1330},{"style":303},[1331],{"type":46,"value":316},{"type":40,"tag":280,"props":1333,"children":1334},{"style":303},[1335],{"type":46,"value":426},{"type":40,"tag":280,"props":1337,"children":1338},{"class":282,"line":385},[1339,1344,1348,1352,1357,1361,1365,1370,1374],{"type":40,"tag":280,"props":1340,"children":1341},{"style":389},[1342],{"type":46,"value":1343},"  metadata",{"type":40,"tag":280,"props":1345,"children":1346},{"style":303},[1347],{"type":46,"value":397},{"type":40,"tag":280,"props":1349,"children":1350},{"style":303},[1351],{"type":46,"value":1008},{"type":40,"tag":280,"props":1353,"children":1354},{"style":389},[1355],{"type":46,"value":1356}," vendor_tier",{"type":40,"tag":280,"props":1358,"children":1359},{"style":303},[1360],{"type":46,"value":397},{"type":40,"tag":280,"props":1362,"children":1363},{"style":303},[1364],{"type":46,"value":306},{"type":40,"tag":280,"props":1366,"children":1367},{"style":309},[1368],{"type":46,"value":1369},"gold",{"type":40,"tag":280,"props":1371,"children":1372},{"style":303},[1373],{"type":46,"value":316},{"type":40,"tag":280,"props":1375,"children":1376},{"style":303},[1377],{"type":46,"value":1378}," },\n",{"type":40,"tag":280,"props":1380,"children":1381},{"class":282,"line":429},[1382,1386,1390],{"type":40,"tag":280,"props":1383,"children":1384},{"style":303},[1385],{"type":46,"value":444},{"type":40,"tag":280,"props":1387,"children":1388},{"style":292},[1389],{"type":46,"value":449},{"type":40,"tag":280,"props":1391,"children":1392},{"style":303},[1393],{"type":46,"value":321},{"type":40,"tag":280,"props":1395,"children":1396},{"class":282,"line":438},[1397],{"type":40,"tag":280,"props":1398,"children":1399},{"emptyLinePlaceholder":328},[1400],{"type":46,"value":331},{"type":40,"tag":280,"props":1402,"children":1403},{"class":282,"line":456},[1404,1408,1413,1417,1421,1425,1429,1434,1438,1442,1446],{"type":40,"tag":280,"props":1405,"children":1406},{"style":348},[1407],{"type":46,"value":351},{"type":40,"tag":280,"props":1409,"children":1410},{"style":292},[1411],{"type":46,"value":1412}," checkout ",{"type":40,"tag":280,"props":1414,"children":1415},{"style":303},[1416],{"type":46,"value":361},{"type":40,"tag":280,"props":1418,"children":1419},{"style":286},[1420],{"type":46,"value":970},{"type":40,"tag":280,"props":1422,"children":1423},{"style":292},[1424],{"type":46,"value":975},{"type":40,"tag":280,"props":1426,"children":1427},{"style":303},[1428],{"type":46,"value":407},{"type":40,"tag":280,"props":1430,"children":1431},{"style":292},[1432],{"type":46,"value":1433},"checkoutConfigurations",{"type":40,"tag":280,"props":1435,"children":1436},{"style":303},[1437],{"type":46,"value":407},{"type":40,"tag":280,"props":1439,"children":1440},{"style":369},[1441],{"type":46,"value":1240},{"type":40,"tag":280,"props":1443,"children":1444},{"style":292},[1445],{"type":46,"value":377},{"type":40,"tag":280,"props":1447,"children":1448},{"style":303},[1449],{"type":46,"value":382},{"type":40,"tag":280,"props":1451,"children":1452},{"class":282,"line":464},[1453,1458,1462,1467,1471,1476],{"type":40,"tag":280,"props":1454,"children":1455},{"style":389},[1456],{"type":46,"value":1457},"  company_id",{"type":40,"tag":280,"props":1459,"children":1460},{"style":303},[1461],{"type":46,"value":397},{"type":40,"tag":280,"props":1463,"children":1464},{"style":292},[1465],{"type":46,"value":1466}," vendor",{"type":40,"tag":280,"props":1468,"children":1469},{"style":303},[1470],{"type":46,"value":407},{"type":40,"tag":280,"props":1472,"children":1473},{"style":292},[1474],{"type":46,"value":1475},"id",{"type":40,"tag":280,"props":1477,"children":1478},{"style":303},[1479],{"type":46,"value":426},{"type":40,"tag":280,"props":1481,"children":1482},{"class":282,"line":473},[1483,1488,1492,1496,1501,1505],{"type":40,"tag":280,"props":1484,"children":1485},{"style":389},[1486],{"type":46,"value":1487},"  mode",{"type":40,"tag":280,"props":1489,"children":1490},{"style":303},[1491],{"type":46,"value":397},{"type":40,"tag":280,"props":1493,"children":1494},{"style":303},[1495],{"type":46,"value":306},{"type":40,"tag":280,"props":1497,"children":1498},{"style":309},[1499],{"type":46,"value":1500},"payment",{"type":40,"tag":280,"props":1502,"children":1503},{"style":303},[1504],{"type":46,"value":316},{"type":40,"tag":280,"props":1506,"children":1507},{"style":303},[1508],{"type":46,"value":426},{"type":40,"tag":280,"props":1510,"children":1511},{"class":282,"line":506},[1512,1517,1521,1525,1530,1534],{"type":40,"tag":280,"props":1513,"children":1514},{"style":389},[1515],{"type":46,"value":1516},"  redirect_url",{"type":40,"tag":280,"props":1518,"children":1519},{"style":303},[1520],{"type":46,"value":397},{"type":40,"tag":280,"props":1522,"children":1523},{"style":303},[1524],{"type":46,"value":306},{"type":40,"tag":280,"props":1526,"children":1527},{"style":309},[1528],{"type":46,"value":1529},"https:\u002F\u002Fyourplatform.com\u002Fcomplete",{"type":40,"tag":280,"props":1531,"children":1532},{"style":303},[1533],{"type":46,"value":316},{"type":40,"tag":280,"props":1535,"children":1536},{"style":303},[1537],{"type":46,"value":426},{"type":40,"tag":280,"props":1539,"children":1540},{"class":282,"line":542},[1541,1546,1550],{"type":40,"tag":280,"props":1542,"children":1543},{"style":389},[1544],{"type":46,"value":1545},"  plan",{"type":40,"tag":280,"props":1547,"children":1548},{"style":303},[1549],{"type":46,"value":397},{"type":40,"tag":280,"props":1551,"children":1552},{"style":303},[1553],{"type":46,"value":1554}," {\n",{"type":40,"tag":280,"props":1556,"children":1557},{"class":282,"line":572},[1558,1563,1567,1571,1575,1579,1583,1588,1592,1596,1601,1605],{"type":40,"tag":280,"props":1559,"children":1560},{"style":389},[1561],{"type":46,"value":1562},"    company_id",{"type":40,"tag":280,"props":1564,"children":1565},{"style":303},[1566],{"type":46,"value":397},{"type":40,"tag":280,"props":1568,"children":1569},{"style":292},[1570],{"type":46,"value":1466},{"type":40,"tag":280,"props":1572,"children":1573},{"style":303},[1574],{"type":46,"value":407},{"type":40,"tag":280,"props":1576,"children":1577},{"style":292},[1578],{"type":46,"value":1475},{"type":40,"tag":280,"props":1580,"children":1581},{"style":303},[1582],{"type":46,"value":1003},{"type":40,"tag":280,"props":1584,"children":1585},{"style":389},[1586],{"type":46,"value":1587}," product_id",{"type":40,"tag":280,"props":1589,"children":1590},{"style":303},[1591],{"type":46,"value":397},{"type":40,"tag":280,"props":1593,"children":1594},{"style":303},[1595],{"type":46,"value":306},{"type":40,"tag":280,"props":1597,"children":1598},{"style":309},[1599],{"type":46,"value":1600},"prod_xxx",{"type":40,"tag":280,"props":1602,"children":1603},{"style":303},[1604],{"type":46,"value":316},{"type":40,"tag":280,"props":1606,"children":1607},{"style":303},[1608],{"type":46,"value":426},{"type":40,"tag":280,"props":1610,"children":1612},{"class":282,"line":1611},14,[1613,1618,1622,1628,1632,1637,1641,1645,1650,1654,1658,1663,1667,1671,1676,1680],{"type":40,"tag":280,"props":1614,"children":1615},{"style":389},[1616],{"type":46,"value":1617},"    initial_price",{"type":40,"tag":280,"props":1619,"children":1620},{"style":303},[1621],{"type":46,"value":397},{"type":40,"tag":280,"props":1623,"children":1625},{"style":1624},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1626],{"type":46,"value":1627}," 5000",{"type":40,"tag":280,"props":1629,"children":1630},{"style":303},[1631],{"type":46,"value":1003},{"type":40,"tag":280,"props":1633,"children":1634},{"style":389},[1635],{"type":46,"value":1636}," plan_type",{"type":40,"tag":280,"props":1638,"children":1639},{"style":303},[1640],{"type":46,"value":397},{"type":40,"tag":280,"props":1642,"children":1643},{"style":303},[1644],{"type":46,"value":306},{"type":40,"tag":280,"props":1646,"children":1647},{"style":309},[1648],{"type":46,"value":1649},"one_time",{"type":40,"tag":280,"props":1651,"children":1652},{"style":303},[1653],{"type":46,"value":316},{"type":40,"tag":280,"props":1655,"children":1656},{"style":303},[1657],{"type":46,"value":1003},{"type":40,"tag":280,"props":1659,"children":1660},{"style":389},[1661],{"type":46,"value":1662}," currency",{"type":40,"tag":280,"props":1664,"children":1665},{"style":303},[1666],{"type":46,"value":397},{"type":40,"tag":280,"props":1668,"children":1669},{"style":303},[1670],{"type":46,"value":306},{"type":40,"tag":280,"props":1672,"children":1673},{"style":309},[1674],{"type":46,"value":1675},"usd",{"type":40,"tag":280,"props":1677,"children":1678},{"style":303},[1679],{"type":46,"value":316},{"type":40,"tag":280,"props":1681,"children":1682},{"style":303},[1683],{"type":46,"value":426},{"type":40,"tag":280,"props":1685,"children":1687},{"class":282,"line":1686},15,[1688,1693,1697,1701,1706,1710,1714,1719,1723,1727,1732,1736],{"type":40,"tag":280,"props":1689,"children":1690},{"style":389},[1691],{"type":46,"value":1692},"    visibility",{"type":40,"tag":280,"props":1694,"children":1695},{"style":303},[1696],{"type":46,"value":397},{"type":40,"tag":280,"props":1698,"children":1699},{"style":303},[1700],{"type":46,"value":306},{"type":40,"tag":280,"props":1702,"children":1703},{"style":309},[1704],{"type":46,"value":1705},"hidden",{"type":40,"tag":280,"props":1707,"children":1708},{"style":303},[1709],{"type":46,"value":316},{"type":40,"tag":280,"props":1711,"children":1712},{"style":303},[1713],{"type":46,"value":1003},{"type":40,"tag":280,"props":1715,"children":1716},{"style":389},[1717],{"type":46,"value":1718}," release_method",{"type":40,"tag":280,"props":1720,"children":1721},{"style":303},[1722],{"type":46,"value":397},{"type":40,"tag":280,"props":1724,"children":1725},{"style":303},[1726],{"type":46,"value":306},{"type":40,"tag":280,"props":1728,"children":1729},{"style":309},[1730],{"type":46,"value":1731},"buy_now",{"type":40,"tag":280,"props":1733,"children":1734},{"style":303},[1735],{"type":46,"value":316},{"type":40,"tag":280,"props":1737,"children":1738},{"style":303},[1739],{"type":46,"value":426},{"type":40,"tag":280,"props":1741,"children":1743},{"class":282,"line":1742},16,[1744,1749,1753,1758,1762],{"type":40,"tag":280,"props":1745,"children":1746},{"style":389},[1747],{"type":46,"value":1748},"    application_fee_amount",{"type":40,"tag":280,"props":1750,"children":1751},{"style":303},[1752],{"type":46,"value":397},{"type":40,"tag":280,"props":1754,"children":1755},{"style":1624},[1756],{"type":46,"value":1757}," 500",{"type":40,"tag":280,"props":1759,"children":1760},{"style":303},[1761],{"type":46,"value":1003},{"type":40,"tag":280,"props":1763,"children":1764},{"style":338},[1765],{"type":46,"value":1766}," \u002F\u002F must be > 0 AND \u003C total\n",{"type":40,"tag":280,"props":1768,"children":1770},{"class":282,"line":1769},17,[1771],{"type":40,"tag":280,"props":1772,"children":1773},{"style":303},[1774],{"type":46,"value":1775},"  },\n",{"type":40,"tag":280,"props":1777,"children":1779},{"class":282,"line":1778},18,[1780,1784,1788],{"type":40,"tag":280,"props":1781,"children":1782},{"style":303},[1783],{"type":46,"value":444},{"type":40,"tag":280,"props":1785,"children":1786},{"style":292},[1787],{"type":46,"value":449},{"type":40,"tag":280,"props":1789,"children":1790},{"style":303},[1791],{"type":46,"value":321},{"type":40,"tag":280,"props":1793,"children":1795},{"class":282,"line":1794},19,[1796],{"type":40,"tag":280,"props":1797,"children":1798},{"style":338},[1799],{"type":46,"value":1800},"\u002F\u002F Dynamic fees: Math.round(price * (tier === \"gold\" ? 0.05 : 0.10))\n",{"type":40,"tag":743,"props":1802,"children":1804},{"id":1803},"pattern-c-platform-treasury-model",[1805],{"type":46,"value":1806},"Pattern C: Platform Treasury Model",{"type":40,"tag":49,"props":1808,"children":1809},{},[1810],{"type":46,"value":1811},"All payments go to the platform. Platform distributes via transfers after admin approval:",{"type":40,"tag":269,"props":1813,"children":1815},{"className":271,"code":1814,"language":273,"meta":274,"style":274},"\u002F\u002F 1. Checkout to platform (no application_fee)\nconst checkout = await client.checkoutConfigurations.create({\n  company_id: \"biz_yourplatform\",\n  plan: { initial_price: 5000, plan_type: \"one_time\" },\n});\n\u002F\u002F 2. Check balance\nconst ledger = await client.ledgerAccounts.retrieve(\"biz_yourplatform\");\n\u002F\u002F 3. Transfer to vendor\nconst transfer = await client.transfers.create({\n  amount: 4500, currency: \"usd\",         \u002F\u002F amount in CENTS\n  origin_id: \"biz_yourplatform\", destination_id: \"biz_vendor\",\n  metadata: { order_id: \"order_123\" }, notes: \"Payout for order #123\",\n  idempotence_key: \"transfer_order_123\", \u002F\u002F prevents duplicates\n});\n",[1816],{"type":40,"tag":101,"props":1817,"children":1818},{"__ignoreMap":274},[1819,1827,1874,1901,1957,1972,1980,2046,2054,2103,2153,2207,2275,2309],{"type":40,"tag":280,"props":1820,"children":1821},{"class":282,"line":24},[1822],{"type":40,"tag":280,"props":1823,"children":1824},{"style":338},[1825],{"type":46,"value":1826},"\u002F\u002F 1. Checkout to platform (no application_fee)\n",{"type":40,"tag":280,"props":1828,"children":1829},{"class":282,"line":324},[1830,1834,1838,1842,1846,1850,1854,1858,1862,1866,1870],{"type":40,"tag":280,"props":1831,"children":1832},{"style":348},[1833],{"type":46,"value":351},{"type":40,"tag":280,"props":1835,"children":1836},{"style":292},[1837],{"type":46,"value":1412},{"type":40,"tag":280,"props":1839,"children":1840},{"style":303},[1841],{"type":46,"value":361},{"type":40,"tag":280,"props":1843,"children":1844},{"style":286},[1845],{"type":46,"value":970},{"type":40,"tag":280,"props":1847,"children":1848},{"style":292},[1849],{"type":46,"value":975},{"type":40,"tag":280,"props":1851,"children":1852},{"style":303},[1853],{"type":46,"value":407},{"type":40,"tag":280,"props":1855,"children":1856},{"style":292},[1857],{"type":46,"value":1433},{"type":40,"tag":280,"props":1859,"children":1860},{"style":303},[1861],{"type":46,"value":407},{"type":40,"tag":280,"props":1863,"children":1864},{"style":369},[1865],{"type":46,"value":1240},{"type":40,"tag":280,"props":1867,"children":1868},{"style":292},[1869],{"type":46,"value":377},{"type":40,"tag":280,"props":1871,"children":1872},{"style":303},[1873],{"type":46,"value":382},{"type":40,"tag":280,"props":1875,"children":1876},{"class":282,"line":334},[1877,1881,1885,1889,1893,1897],{"type":40,"tag":280,"props":1878,"children":1879},{"style":389},[1880],{"type":46,"value":1457},{"type":40,"tag":280,"props":1882,"children":1883},{"style":303},[1884],{"type":46,"value":397},{"type":40,"tag":280,"props":1886,"children":1887},{"style":303},[1888],{"type":46,"value":306},{"type":40,"tag":280,"props":1890,"children":1891},{"style":309},[1892],{"type":46,"value":1269},{"type":40,"tag":280,"props":1894,"children":1895},{"style":303},[1896],{"type":46,"value":316},{"type":40,"tag":280,"props":1898,"children":1899},{"style":303},[1900],{"type":46,"value":426},{"type":40,"tag":280,"props":1902,"children":1903},{"class":282,"line":344},[1904,1908,1912,1916,1921,1925,1929,1933,1937,1941,1945,1949,1953],{"type":40,"tag":280,"props":1905,"children":1906},{"style":389},[1907],{"type":46,"value":1545},{"type":40,"tag":280,"props":1909,"children":1910},{"style":303},[1911],{"type":46,"value":397},{"type":40,"tag":280,"props":1913,"children":1914},{"style":303},[1915],{"type":46,"value":1008},{"type":40,"tag":280,"props":1917,"children":1918},{"style":389},[1919],{"type":46,"value":1920}," initial_price",{"type":40,"tag":280,"props":1922,"children":1923},{"style":303},[1924],{"type":46,"value":397},{"type":40,"tag":280,"props":1926,"children":1927},{"style":1624},[1928],{"type":46,"value":1627},{"type":40,"tag":280,"props":1930,"children":1931},{"style":303},[1932],{"type":46,"value":1003},{"type":40,"tag":280,"props":1934,"children":1935},{"style":389},[1936],{"type":46,"value":1636},{"type":40,"tag":280,"props":1938,"children":1939},{"style":303},[1940],{"type":46,"value":397},{"type":40,"tag":280,"props":1942,"children":1943},{"style":303},[1944],{"type":46,"value":306},{"type":40,"tag":280,"props":1946,"children":1947},{"style":309},[1948],{"type":46,"value":1649},{"type":40,"tag":280,"props":1950,"children":1951},{"style":303},[1952],{"type":46,"value":316},{"type":40,"tag":280,"props":1954,"children":1955},{"style":303},[1956],{"type":46,"value":1378},{"type":40,"tag":280,"props":1958,"children":1959},{"class":282,"line":385},[1960,1964,1968],{"type":40,"tag":280,"props":1961,"children":1962},{"style":303},[1963],{"type":46,"value":444},{"type":40,"tag":280,"props":1965,"children":1966},{"style":292},[1967],{"type":46,"value":449},{"type":40,"tag":280,"props":1969,"children":1970},{"style":303},[1971],{"type":46,"value":321},{"type":40,"tag":280,"props":1973,"children":1974},{"class":282,"line":429},[1975],{"type":40,"tag":280,"props":1976,"children":1977},{"style":338},[1978],{"type":46,"value":1979},"\u002F\u002F 2. Check balance\n",{"type":40,"tag":280,"props":1981,"children":1982},{"class":282,"line":438},[1983,1987,1992,1996,2000,2004,2008,2013,2017,2022,2026,2030,2034,2038,2042],{"type":40,"tag":280,"props":1984,"children":1985},{"style":348},[1986],{"type":46,"value":351},{"type":40,"tag":280,"props":1988,"children":1989},{"style":292},[1990],{"type":46,"value":1991}," ledger ",{"type":40,"tag":280,"props":1993,"children":1994},{"style":303},[1995],{"type":46,"value":361},{"type":40,"tag":280,"props":1997,"children":1998},{"style":286},[1999],{"type":46,"value":970},{"type":40,"tag":280,"props":2001,"children":2002},{"style":292},[2003],{"type":46,"value":975},{"type":40,"tag":280,"props":2005,"children":2006},{"style":303},[2007],{"type":46,"value":407},{"type":40,"tag":280,"props":2009,"children":2010},{"style":292},[2011],{"type":46,"value":2012},"ledgerAccounts",{"type":40,"tag":280,"props":2014,"children":2015},{"style":303},[2016],{"type":46,"value":407},{"type":40,"tag":280,"props":2018,"children":2019},{"style":369},[2020],{"type":46,"value":2021},"retrieve",{"type":40,"tag":280,"props":2023,"children":2024},{"style":292},[2025],{"type":46,"value":377},{"type":40,"tag":280,"props":2027,"children":2028},{"style":303},[2029],{"type":46,"value":316},{"type":40,"tag":280,"props":2031,"children":2032},{"style":309},[2033],{"type":46,"value":1269},{"type":40,"tag":280,"props":2035,"children":2036},{"style":303},[2037],{"type":46,"value":316},{"type":40,"tag":280,"props":2039,"children":2040},{"style":292},[2041],{"type":46,"value":449},{"type":40,"tag":280,"props":2043,"children":2044},{"style":303},[2045],{"type":46,"value":321},{"type":40,"tag":280,"props":2047,"children":2048},{"class":282,"line":456},[2049],{"type":40,"tag":280,"props":2050,"children":2051},{"style":338},[2052],{"type":46,"value":2053},"\u002F\u002F 3. Transfer to vendor\n",{"type":40,"tag":280,"props":2055,"children":2056},{"class":282,"line":464},[2057,2061,2066,2070,2074,2078,2082,2087,2091,2095,2099],{"type":40,"tag":280,"props":2058,"children":2059},{"style":348},[2060],{"type":46,"value":351},{"type":40,"tag":280,"props":2062,"children":2063},{"style":292},[2064],{"type":46,"value":2065}," transfer ",{"type":40,"tag":280,"props":2067,"children":2068},{"style":303},[2069],{"type":46,"value":361},{"type":40,"tag":280,"props":2071,"children":2072},{"style":286},[2073],{"type":46,"value":970},{"type":40,"tag":280,"props":2075,"children":2076},{"style":292},[2077],{"type":46,"value":975},{"type":40,"tag":280,"props":2079,"children":2080},{"style":303},[2081],{"type":46,"value":407},{"type":40,"tag":280,"props":2083,"children":2084},{"style":292},[2085],{"type":46,"value":2086},"transfers",{"type":40,"tag":280,"props":2088,"children":2089},{"style":303},[2090],{"type":46,"value":407},{"type":40,"tag":280,"props":2092,"children":2093},{"style":369},[2094],{"type":46,"value":1240},{"type":40,"tag":280,"props":2096,"children":2097},{"style":292},[2098],{"type":46,"value":377},{"type":40,"tag":280,"props":2100,"children":2101},{"style":303},[2102],{"type":46,"value":382},{"type":40,"tag":280,"props":2104,"children":2105},{"class":282,"line":473},[2106,2111,2115,2120,2124,2128,2132,2136,2140,2144,2148],{"type":40,"tag":280,"props":2107,"children":2108},{"style":389},[2109],{"type":46,"value":2110},"  amount",{"type":40,"tag":280,"props":2112,"children":2113},{"style":303},[2114],{"type":46,"value":397},{"type":40,"tag":280,"props":2116,"children":2117},{"style":1624},[2118],{"type":46,"value":2119}," 4500",{"type":40,"tag":280,"props":2121,"children":2122},{"style":303},[2123],{"type":46,"value":1003},{"type":40,"tag":280,"props":2125,"children":2126},{"style":389},[2127],{"type":46,"value":1662},{"type":40,"tag":280,"props":2129,"children":2130},{"style":303},[2131],{"type":46,"value":397},{"type":40,"tag":280,"props":2133,"children":2134},{"style":303},[2135],{"type":46,"value":306},{"type":40,"tag":280,"props":2137,"children":2138},{"style":309},[2139],{"type":46,"value":1675},{"type":40,"tag":280,"props":2141,"children":2142},{"style":303},[2143],{"type":46,"value":316},{"type":40,"tag":280,"props":2145,"children":2146},{"style":303},[2147],{"type":46,"value":1003},{"type":40,"tag":280,"props":2149,"children":2150},{"style":338},[2151],{"type":46,"value":2152},"         \u002F\u002F amount in CENTS\n",{"type":40,"tag":280,"props":2154,"children":2155},{"class":282,"line":506},[2156,2161,2165,2169,2173,2177,2181,2186,2190,2194,2199,2203],{"type":40,"tag":280,"props":2157,"children":2158},{"style":389},[2159],{"type":46,"value":2160},"  origin_id",{"type":40,"tag":280,"props":2162,"children":2163},{"style":303},[2164],{"type":46,"value":397},{"type":40,"tag":280,"props":2166,"children":2167},{"style":303},[2168],{"type":46,"value":306},{"type":40,"tag":280,"props":2170,"children":2171},{"style":309},[2172],{"type":46,"value":1269},{"type":40,"tag":280,"props":2174,"children":2175},{"style":303},[2176],{"type":46,"value":316},{"type":40,"tag":280,"props":2178,"children":2179},{"style":303},[2180],{"type":46,"value":1003},{"type":40,"tag":280,"props":2182,"children":2183},{"style":389},[2184],{"type":46,"value":2185}," destination_id",{"type":40,"tag":280,"props":2187,"children":2188},{"style":303},[2189],{"type":46,"value":397},{"type":40,"tag":280,"props":2191,"children":2192},{"style":303},[2193],{"type":46,"value":306},{"type":40,"tag":280,"props":2195,"children":2196},{"style":309},[2197],{"type":46,"value":2198},"biz_vendor",{"type":40,"tag":280,"props":2200,"children":2201},{"style":303},[2202],{"type":46,"value":316},{"type":40,"tag":280,"props":2204,"children":2205},{"style":303},[2206],{"type":46,"value":426},{"type":40,"tag":280,"props":2208,"children":2209},{"class":282,"line":542},[2210,2214,2218,2222,2227,2231,2235,2240,2244,2249,2254,2258,2262,2267,2271],{"type":40,"tag":280,"props":2211,"children":2212},{"style":389},[2213],{"type":46,"value":1343},{"type":40,"tag":280,"props":2215,"children":2216},{"style":303},[2217],{"type":46,"value":397},{"type":40,"tag":280,"props":2219,"children":2220},{"style":303},[2221],{"type":46,"value":1008},{"type":40,"tag":280,"props":2223,"children":2224},{"style":389},[2225],{"type":46,"value":2226}," order_id",{"type":40,"tag":280,"props":2228,"children":2229},{"style":303},[2230],{"type":46,"value":397},{"type":40,"tag":280,"props":2232,"children":2233},{"style":303},[2234],{"type":46,"value":306},{"type":40,"tag":280,"props":2236,"children":2237},{"style":309},[2238],{"type":46,"value":2239},"order_123",{"type":40,"tag":280,"props":2241,"children":2242},{"style":303},[2243],{"type":46,"value":316},{"type":40,"tag":280,"props":2245,"children":2246},{"style":303},[2247],{"type":46,"value":2248}," },",{"type":40,"tag":280,"props":2250,"children":2251},{"style":389},[2252],{"type":46,"value":2253}," notes",{"type":40,"tag":280,"props":2255,"children":2256},{"style":303},[2257],{"type":46,"value":397},{"type":40,"tag":280,"props":2259,"children":2260},{"style":303},[2261],{"type":46,"value":306},{"type":40,"tag":280,"props":2263,"children":2264},{"style":309},[2265],{"type":46,"value":2266},"Payout for order #123",{"type":40,"tag":280,"props":2268,"children":2269},{"style":303},[2270],{"type":46,"value":316},{"type":40,"tag":280,"props":2272,"children":2273},{"style":303},[2274],{"type":46,"value":426},{"type":40,"tag":280,"props":2276,"children":2277},{"class":282,"line":572},[2278,2283,2287,2291,2296,2300,2304],{"type":40,"tag":280,"props":2279,"children":2280},{"style":389},[2281],{"type":46,"value":2282},"  idempotence_key",{"type":40,"tag":280,"props":2284,"children":2285},{"style":303},[2286],{"type":46,"value":397},{"type":40,"tag":280,"props":2288,"children":2289},{"style":303},[2290],{"type":46,"value":306},{"type":40,"tag":280,"props":2292,"children":2293},{"style":309},[2294],{"type":46,"value":2295},"transfer_order_123",{"type":40,"tag":280,"props":2297,"children":2298},{"style":303},[2299],{"type":46,"value":316},{"type":40,"tag":280,"props":2301,"children":2302},{"style":303},[2303],{"type":46,"value":1003},{"type":40,"tag":280,"props":2305,"children":2306},{"style":338},[2307],{"type":46,"value":2308}," \u002F\u002F prevents duplicates\n",{"type":40,"tag":280,"props":2310,"children":2311},{"class":282,"line":1611},[2312,2316,2320],{"type":40,"tag":280,"props":2313,"children":2314},{"style":303},[2315],{"type":46,"value":444},{"type":40,"tag":280,"props":2317,"children":2318},{"style":292},[2319],{"type":46,"value":449},{"type":40,"tag":280,"props":2321,"children":2322},{"style":303},[2323],{"type":46,"value":321},{"type":40,"tag":55,"props":2325,"children":2327},{"id":2326},"_5-products-plans",[2328],{"type":46,"value":2329},"5. Products & Plans",{"type":40,"tag":743,"props":2331,"children":2333},{"id":2332},"products-api",[2334],{"type":46,"value":2335},"Products API",{"type":40,"tag":49,"props":2337,"children":2338},{},[2339],{"type":46,"value":2340},"Products are the catalog layer above plans. A product has multiple plans (pricing variants).",{"type":40,"tag":924,"props":2342,"children":2343},{},[2344],{"type":40,"tag":49,"props":2345,"children":2346},{},[2347,2349,2355,2357,2363,2365,2370],{"type":46,"value":2348},"Use ",{"type":40,"tag":101,"props":2350,"children":2352},{"className":2351},[],[2353],{"type":46,"value":2354},"product_id",{"type":46,"value":2356}," to link a plan to a product. ",{"type":40,"tag":101,"props":2358,"children":2360},{"className":2359},[],[2361],{"type":46,"value":2362},"access_pass_id",{"type":46,"value":2364}," is a legacy alias — prefer ",{"type":40,"tag":101,"props":2366,"children":2368},{"className":2367},[],[2369],{"type":46,"value":2354},{"type":46,"value":2371}," for new integrations.",{"type":40,"tag":269,"props":2373,"children":2375},{"className":271,"code":2374,"language":273,"meta":274,"style":274},"const product = await client.products.create({\n  company_id: \"biz_xxx\",\n  title: \"Premium Course\",\n  description: JSON.stringify({ category: \"education\", level: \"advanced\" }), \u002F\u002F can store JSON\n  visibility: \"visible\", \u002F\u002F or \"hidden\"\n});\nawait client.products.update(product.id, { title: \"Updated Title\" });\nconst products = await client.products.list({ company_id: \"biz_xxx\" });\n",[2376],{"type":40,"tag":101,"props":2377,"children":2378},{"__ignoreMap":274},[2379,2428,2456,2484,2585,2619,2634,2718],{"type":40,"tag":280,"props":2380,"children":2381},{"class":282,"line":24},[2382,2386,2391,2395,2399,2403,2407,2412,2416,2420,2424],{"type":40,"tag":280,"props":2383,"children":2384},{"style":348},[2385],{"type":46,"value":351},{"type":40,"tag":280,"props":2387,"children":2388},{"style":292},[2389],{"type":46,"value":2390}," product ",{"type":40,"tag":280,"props":2392,"children":2393},{"style":303},[2394],{"type":46,"value":361},{"type":40,"tag":280,"props":2396,"children":2397},{"style":286},[2398],{"type":46,"value":970},{"type":40,"tag":280,"props":2400,"children":2401},{"style":292},[2402],{"type":46,"value":975},{"type":40,"tag":280,"props":2404,"children":2405},{"style":303},[2406],{"type":46,"value":407},{"type":40,"tag":280,"props":2408,"children":2409},{"style":292},[2410],{"type":46,"value":2411},"products",{"type":40,"tag":280,"props":2413,"children":2414},{"style":303},[2415],{"type":46,"value":407},{"type":40,"tag":280,"props":2417,"children":2418},{"style":369},[2419],{"type":46,"value":1240},{"type":40,"tag":280,"props":2421,"children":2422},{"style":292},[2423],{"type":46,"value":377},{"type":40,"tag":280,"props":2425,"children":2426},{"style":303},[2427],{"type":46,"value":382},{"type":40,"tag":280,"props":2429,"children":2430},{"class":282,"line":324},[2431,2435,2439,2443,2448,2452],{"type":40,"tag":280,"props":2432,"children":2433},{"style":389},[2434],{"type":46,"value":1457},{"type":40,"tag":280,"props":2436,"children":2437},{"style":303},[2438],{"type":46,"value":397},{"type":40,"tag":280,"props":2440,"children":2441},{"style":303},[2442],{"type":46,"value":306},{"type":40,"tag":280,"props":2444,"children":2445},{"style":309},[2446],{"type":46,"value":2447},"biz_xxx",{"type":40,"tag":280,"props":2449,"children":2450},{"style":303},[2451],{"type":46,"value":316},{"type":40,"tag":280,"props":2453,"children":2454},{"style":303},[2455],{"type":46,"value":426},{"type":40,"tag":280,"props":2457,"children":2458},{"class":282,"line":334},[2459,2463,2467,2471,2476,2480],{"type":40,"tag":280,"props":2460,"children":2461},{"style":389},[2462],{"type":46,"value":1314},{"type":40,"tag":280,"props":2464,"children":2465},{"style":303},[2466],{"type":46,"value":397},{"type":40,"tag":280,"props":2468,"children":2469},{"style":303},[2470],{"type":46,"value":306},{"type":40,"tag":280,"props":2472,"children":2473},{"style":309},[2474],{"type":46,"value":2475},"Premium Course",{"type":40,"tag":280,"props":2477,"children":2478},{"style":303},[2479],{"type":46,"value":316},{"type":40,"tag":280,"props":2481,"children":2482},{"style":303},[2483],{"type":46,"value":426},{"type":40,"tag":280,"props":2485,"children":2486},{"class":282,"line":344},[2487,2492,2496,2501,2505,2510,2514,2519,2524,2528,2532,2537,2541,2545,2550,2554,2558,2563,2567,2572,2576,2580],{"type":40,"tag":280,"props":2488,"children":2489},{"style":389},[2490],{"type":46,"value":2491},"  description",{"type":40,"tag":280,"props":2493,"children":2494},{"style":303},[2495],{"type":46,"value":397},{"type":40,"tag":280,"props":2497,"children":2498},{"style":292},[2499],{"type":46,"value":2500}," JSON",{"type":40,"tag":280,"props":2502,"children":2503},{"style":303},[2504],{"type":46,"value":407},{"type":40,"tag":280,"props":2506,"children":2507},{"style":369},[2508],{"type":46,"value":2509},"stringify",{"type":40,"tag":280,"props":2511,"children":2512},{"style":292},[2513],{"type":46,"value":377},{"type":40,"tag":280,"props":2515,"children":2516},{"style":303},[2517],{"type":46,"value":2518},"{",{"type":40,"tag":280,"props":2520,"children":2521},{"style":389},[2522],{"type":46,"value":2523}," category",{"type":40,"tag":280,"props":2525,"children":2526},{"style":303},[2527],{"type":46,"value":397},{"type":40,"tag":280,"props":2529,"children":2530},{"style":303},[2531],{"type":46,"value":306},{"type":40,"tag":280,"props":2533,"children":2534},{"style":309},[2535],{"type":46,"value":2536},"education",{"type":40,"tag":280,"props":2538,"children":2539},{"style":303},[2540],{"type":46,"value":316},{"type":40,"tag":280,"props":2542,"children":2543},{"style":303},[2544],{"type":46,"value":1003},{"type":40,"tag":280,"props":2546,"children":2547},{"style":389},[2548],{"type":46,"value":2549}," level",{"type":40,"tag":280,"props":2551,"children":2552},{"style":303},[2553],{"type":46,"value":397},{"type":40,"tag":280,"props":2555,"children":2556},{"style":303},[2557],{"type":46,"value":306},{"type":40,"tag":280,"props":2559,"children":2560},{"style":309},[2561],{"type":46,"value":2562},"advanced",{"type":40,"tag":280,"props":2564,"children":2565},{"style":303},[2566],{"type":46,"value":316},{"type":40,"tag":280,"props":2568,"children":2569},{"style":303},[2570],{"type":46,"value":2571}," }",{"type":40,"tag":280,"props":2573,"children":2574},{"style":292},[2575],{"type":46,"value":449},{"type":40,"tag":280,"props":2577,"children":2578},{"style":303},[2579],{"type":46,"value":1003},{"type":40,"tag":280,"props":2581,"children":2582},{"style":338},[2583],{"type":46,"value":2584}," \u002F\u002F can store JSON\n",{"type":40,"tag":280,"props":2586,"children":2587},{"class":282,"line":385},[2588,2593,2597,2601,2606,2610,2614],{"type":40,"tag":280,"props":2589,"children":2590},{"style":389},[2591],{"type":46,"value":2592},"  visibility",{"type":40,"tag":280,"props":2594,"children":2595},{"style":303},[2596],{"type":46,"value":397},{"type":40,"tag":280,"props":2598,"children":2599},{"style":303},[2600],{"type":46,"value":306},{"type":40,"tag":280,"props":2602,"children":2603},{"style":309},[2604],{"type":46,"value":2605},"visible",{"type":40,"tag":280,"props":2607,"children":2608},{"style":303},[2609],{"type":46,"value":316},{"type":40,"tag":280,"props":2611,"children":2612},{"style":303},[2613],{"type":46,"value":1003},{"type":40,"tag":280,"props":2615,"children":2616},{"style":338},[2617],{"type":46,"value":2618}," \u002F\u002F or \"hidden\"\n",{"type":40,"tag":280,"props":2620,"children":2621},{"class":282,"line":429},[2622,2626,2630],{"type":40,"tag":280,"props":2623,"children":2624},{"style":303},[2625],{"type":46,"value":444},{"type":40,"tag":280,"props":2627,"children":2628},{"style":292},[2629],{"type":46,"value":449},{"type":40,"tag":280,"props":2631,"children":2632},{"style":303},[2633],{"type":46,"value":321},{"type":40,"tag":280,"props":2635,"children":2636},{"class":282,"line":438},[2637,2642,2646,2650,2654,2658,2663,2668,2672,2676,2680,2684,2689,2693,2697,2702,2706,2710,2714],{"type":40,"tag":280,"props":2638,"children":2639},{"style":286},[2640],{"type":46,"value":2641},"await",{"type":40,"tag":280,"props":2643,"children":2644},{"style":292},[2645],{"type":46,"value":975},{"type":40,"tag":280,"props":2647,"children":2648},{"style":303},[2649],{"type":46,"value":407},{"type":40,"tag":280,"props":2651,"children":2652},{"style":292},[2653],{"type":46,"value":2411},{"type":40,"tag":280,"props":2655,"children":2656},{"style":303},[2657],{"type":46,"value":407},{"type":40,"tag":280,"props":2659,"children":2660},{"style":369},[2661],{"type":46,"value":2662},"update",{"type":40,"tag":280,"props":2664,"children":2665},{"style":292},[2666],{"type":46,"value":2667},"(product",{"type":40,"tag":280,"props":2669,"children":2670},{"style":303},[2671],{"type":46,"value":407},{"type":40,"tag":280,"props":2673,"children":2674},{"style":292},[2675],{"type":46,"value":1475},{"type":40,"tag":280,"props":2677,"children":2678},{"style":303},[2679],{"type":46,"value":1003},{"type":40,"tag":280,"props":2681,"children":2682},{"style":303},[2683],{"type":46,"value":1008},{"type":40,"tag":280,"props":2685,"children":2686},{"style":389},[2687],{"type":46,"value":2688}," title",{"type":40,"tag":280,"props":2690,"children":2691},{"style":303},[2692],{"type":46,"value":397},{"type":40,"tag":280,"props":2694,"children":2695},{"style":303},[2696],{"type":46,"value":306},{"type":40,"tag":280,"props":2698,"children":2699},{"style":309},[2700],{"type":46,"value":2701},"Updated Title",{"type":40,"tag":280,"props":2703,"children":2704},{"style":303},[2705],{"type":46,"value":316},{"type":40,"tag":280,"props":2707,"children":2708},{"style":303},[2709],{"type":46,"value":2571},{"type":40,"tag":280,"props":2711,"children":2712},{"style":292},[2713],{"type":46,"value":449},{"type":40,"tag":280,"props":2715,"children":2716},{"style":303},[2717],{"type":46,"value":321},{"type":40,"tag":280,"props":2719,"children":2720},{"class":282,"line":456},[2721,2725,2730,2734,2738,2742,2746,2750,2754,2759,2763,2767,2772,2776,2780,2784,2788,2792,2796],{"type":40,"tag":280,"props":2722,"children":2723},{"style":348},[2724],{"type":46,"value":351},{"type":40,"tag":280,"props":2726,"children":2727},{"style":292},[2728],{"type":46,"value":2729}," products ",{"type":40,"tag":280,"props":2731,"children":2732},{"style":303},[2733],{"type":46,"value":361},{"type":40,"tag":280,"props":2735,"children":2736},{"style":286},[2737],{"type":46,"value":970},{"type":40,"tag":280,"props":2739,"children":2740},{"style":292},[2741],{"type":46,"value":975},{"type":40,"tag":280,"props":2743,"children":2744},{"style":303},[2745],{"type":46,"value":407},{"type":40,"tag":280,"props":2747,"children":2748},{"style":292},[2749],{"type":46,"value":2411},{"type":40,"tag":280,"props":2751,"children":2752},{"style":303},[2753],{"type":46,"value":407},{"type":40,"tag":280,"props":2755,"children":2756},{"style":369},[2757],{"type":46,"value":2758},"list",{"type":40,"tag":280,"props":2760,"children":2761},{"style":292},[2762],{"type":46,"value":377},{"type":40,"tag":280,"props":2764,"children":2765},{"style":303},[2766],{"type":46,"value":2518},{"type":40,"tag":280,"props":2768,"children":2769},{"style":389},[2770],{"type":46,"value":2771}," company_id",{"type":40,"tag":280,"props":2773,"children":2774},{"style":303},[2775],{"type":46,"value":397},{"type":40,"tag":280,"props":2777,"children":2778},{"style":303},[2779],{"type":46,"value":306},{"type":40,"tag":280,"props":2781,"children":2782},{"style":309},[2783],{"type":46,"value":2447},{"type":40,"tag":280,"props":2785,"children":2786},{"style":303},[2787],{"type":46,"value":316},{"type":40,"tag":280,"props":2789,"children":2790},{"style":303},[2791],{"type":46,"value":2571},{"type":40,"tag":280,"props":2793,"children":2794},{"style":292},[2795],{"type":46,"value":449},{"type":40,"tag":280,"props":2797,"children":2798},{"style":303},[2799],{"type":46,"value":321},{"type":40,"tag":743,"props":2801,"children":2803},{"id":2802},"plans-api",[2804],{"type":46,"value":2805},"Plans API",{"type":40,"tag":269,"props":2807,"children":2809},{"className":271,"code":2808,"language":273,"meta":274,"style":274},"\u002F\u002F One-time payment plan\nconst plan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  initial_price: 2999,     \u002F\u002F $29.99\n  plan_type: \"one_time\",\n  currency: \"usd\",\n  visibility: \"visible\",   \u002F\u002F or \"hidden\" for checkout-only plans\n  release_method: \"buy_now\",\n});\n\n\u002F\u002F Subscription plan\nconst subPlan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  plan_type: \"renewal\",\n  initial_price: 999,\n  renewal_price: 999,\n  billing_period: 30,       \u002F\u002F days\n  currency: \"usd\",\n});\n\n\u002F\u002F Limited stock plan (inventory)\nconst limitedPlan = await client.plans.create({\n  company_id: \"biz_xxx\",\n  product_id: \"prod_xxx\",\n  initial_price: 4999,\n  plan_type: \"one_time\",\n  stock: 100,               \u002F\u002F sold out after 100 purchases\n});\n\nconsole.log(plan.purchase_url); \u002F\u002F shareable checkout link\n",[2810],{"type":40,"tag":101,"props":2811,"children":2812},{"__ignoreMap":274},[2813,2821,2870,2897,2925,2951,2979,3007,3039,3067,3082,3089,3097,3145,3172,3199,3227,3247,3267,3293,3321,3337,3345,3354,3403,3431,3459,3480,3508,3535,3551,3559],{"type":40,"tag":280,"props":2814,"children":2815},{"class":282,"line":24},[2816],{"type":40,"tag":280,"props":2817,"children":2818},{"style":338},[2819],{"type":46,"value":2820},"\u002F\u002F One-time payment plan\n",{"type":40,"tag":280,"props":2822,"children":2823},{"class":282,"line":324},[2824,2828,2833,2837,2841,2845,2849,2854,2858,2862,2866],{"type":40,"tag":280,"props":2825,"children":2826},{"style":348},[2827],{"type":46,"value":351},{"type":40,"tag":280,"props":2829,"children":2830},{"style":292},[2831],{"type":46,"value":2832}," plan ",{"type":40,"tag":280,"props":2834,"children":2835},{"style":303},[2836],{"type":46,"value":361},{"type":40,"tag":280,"props":2838,"children":2839},{"style":286},[2840],{"type":46,"value":970},{"type":40,"tag":280,"props":2842,"children":2843},{"style":292},[2844],{"type":46,"value":975},{"type":40,"tag":280,"props":2846,"children":2847},{"style":303},[2848],{"type":46,"value":407},{"type":40,"tag":280,"props":2850,"children":2851},{"style":292},[2852],{"type":46,"value":2853},"plans",{"type":40,"tag":280,"props":2855,"children":2856},{"style":303},[2857],{"type":46,"value":407},{"type":40,"tag":280,"props":2859,"children":2860},{"style":369},[2861],{"type":46,"value":1240},{"type":40,"tag":280,"props":2863,"children":2864},{"style":292},[2865],{"type":46,"value":377},{"type":40,"tag":280,"props":2867,"children":2868},{"style":303},[2869],{"type":46,"value":382},{"type":40,"tag":280,"props":2871,"children":2872},{"class":282,"line":334},[2873,2877,2881,2885,2889,2893],{"type":40,"tag":280,"props":2874,"children":2875},{"style":389},[2876],{"type":46,"value":1457},{"type":40,"tag":280,"props":2878,"children":2879},{"style":303},[2880],{"type":46,"value":397},{"type":40,"tag":280,"props":2882,"children":2883},{"style":303},[2884],{"type":46,"value":306},{"type":40,"tag":280,"props":2886,"children":2887},{"style":309},[2888],{"type":46,"value":2447},{"type":40,"tag":280,"props":2890,"children":2891},{"style":303},[2892],{"type":46,"value":316},{"type":40,"tag":280,"props":2894,"children":2895},{"style":303},[2896],{"type":46,"value":426},{"type":40,"tag":280,"props":2898,"children":2899},{"class":282,"line":344},[2900,2905,2909,2913,2917,2921],{"type":40,"tag":280,"props":2901,"children":2902},{"style":389},[2903],{"type":46,"value":2904},"  product_id",{"type":40,"tag":280,"props":2906,"children":2907},{"style":303},[2908],{"type":46,"value":397},{"type":40,"tag":280,"props":2910,"children":2911},{"style":303},[2912],{"type":46,"value":306},{"type":40,"tag":280,"props":2914,"children":2915},{"style":309},[2916],{"type":46,"value":1600},{"type":40,"tag":280,"props":2918,"children":2919},{"style":303},[2920],{"type":46,"value":316},{"type":40,"tag":280,"props":2922,"children":2923},{"style":303},[2924],{"type":46,"value":426},{"type":40,"tag":280,"props":2926,"children":2927},{"class":282,"line":385},[2928,2933,2937,2942,2946],{"type":40,"tag":280,"props":2929,"children":2930},{"style":389},[2931],{"type":46,"value":2932},"  initial_price",{"type":40,"tag":280,"props":2934,"children":2935},{"style":303},[2936],{"type":46,"value":397},{"type":40,"tag":280,"props":2938,"children":2939},{"style":1624},[2940],{"type":46,"value":2941}," 2999",{"type":40,"tag":280,"props":2943,"children":2944},{"style":303},[2945],{"type":46,"value":1003},{"type":40,"tag":280,"props":2947,"children":2948},{"style":338},[2949],{"type":46,"value":2950},"     \u002F\u002F $29.99\n",{"type":40,"tag":280,"props":2952,"children":2953},{"class":282,"line":429},[2954,2959,2963,2967,2971,2975],{"type":40,"tag":280,"props":2955,"children":2956},{"style":389},[2957],{"type":46,"value":2958},"  plan_type",{"type":40,"tag":280,"props":2960,"children":2961},{"style":303},[2962],{"type":46,"value":397},{"type":40,"tag":280,"props":2964,"children":2965},{"style":303},[2966],{"type":46,"value":306},{"type":40,"tag":280,"props":2968,"children":2969},{"style":309},[2970],{"type":46,"value":1649},{"type":40,"tag":280,"props":2972,"children":2973},{"style":303},[2974],{"type":46,"value":316},{"type":40,"tag":280,"props":2976,"children":2977},{"style":303},[2978],{"type":46,"value":426},{"type":40,"tag":280,"props":2980,"children":2981},{"class":282,"line":438},[2982,2987,2991,2995,2999,3003],{"type":40,"tag":280,"props":2983,"children":2984},{"style":389},[2985],{"type":46,"value":2986},"  currency",{"type":40,"tag":280,"props":2988,"children":2989},{"style":303},[2990],{"type":46,"value":397},{"type":40,"tag":280,"props":2992,"children":2993},{"style":303},[2994],{"type":46,"value":306},{"type":40,"tag":280,"props":2996,"children":2997},{"style":309},[2998],{"type":46,"value":1675},{"type":40,"tag":280,"props":3000,"children":3001},{"style":303},[3002],{"type":46,"value":316},{"type":40,"tag":280,"props":3004,"children":3005},{"style":303},[3006],{"type":46,"value":426},{"type":40,"tag":280,"props":3008,"children":3009},{"class":282,"line":456},[3010,3014,3018,3022,3026,3030,3034],{"type":40,"tag":280,"props":3011,"children":3012},{"style":389},[3013],{"type":46,"value":2592},{"type":40,"tag":280,"props":3015,"children":3016},{"style":303},[3017],{"type":46,"value":397},{"type":40,"tag":280,"props":3019,"children":3020},{"style":303},[3021],{"type":46,"value":306},{"type":40,"tag":280,"props":3023,"children":3024},{"style":309},[3025],{"type":46,"value":2605},{"type":40,"tag":280,"props":3027,"children":3028},{"style":303},[3029],{"type":46,"value":316},{"type":40,"tag":280,"props":3031,"children":3032},{"style":303},[3033],{"type":46,"value":1003},{"type":40,"tag":280,"props":3035,"children":3036},{"style":338},[3037],{"type":46,"value":3038},"   \u002F\u002F or \"hidden\" for checkout-only plans\n",{"type":40,"tag":280,"props":3040,"children":3041},{"class":282,"line":464},[3042,3047,3051,3055,3059,3063],{"type":40,"tag":280,"props":3043,"children":3044},{"style":389},[3045],{"type":46,"value":3046},"  release_method",{"type":40,"tag":280,"props":3048,"children":3049},{"style":303},[3050],{"type":46,"value":397},{"type":40,"tag":280,"props":3052,"children":3053},{"style":303},[3054],{"type":46,"value":306},{"type":40,"tag":280,"props":3056,"children":3057},{"style":309},[3058],{"type":46,"value":1731},{"type":40,"tag":280,"props":3060,"children":3061},{"style":303},[3062],{"type":46,"value":316},{"type":40,"tag":280,"props":3064,"children":3065},{"style":303},[3066],{"type":46,"value":426},{"type":40,"tag":280,"props":3068,"children":3069},{"class":282,"line":473},[3070,3074,3078],{"type":40,"tag":280,"props":3071,"children":3072},{"style":303},[3073],{"type":46,"value":444},{"type":40,"tag":280,"props":3075,"children":3076},{"style":292},[3077],{"type":46,"value":449},{"type":40,"tag":280,"props":3079,"children":3080},{"style":303},[3081],{"type":46,"value":321},{"type":40,"tag":280,"props":3083,"children":3084},{"class":282,"line":506},[3085],{"type":40,"tag":280,"props":3086,"children":3087},{"emptyLinePlaceholder":328},[3088],{"type":46,"value":331},{"type":40,"tag":280,"props":3090,"children":3091},{"class":282,"line":542},[3092],{"type":40,"tag":280,"props":3093,"children":3094},{"style":338},[3095],{"type":46,"value":3096},"\u002F\u002F Subscription plan\n",{"type":40,"tag":280,"props":3098,"children":3099},{"class":282,"line":572},[3100,3104,3109,3113,3117,3121,3125,3129,3133,3137,3141],{"type":40,"tag":280,"props":3101,"children":3102},{"style":348},[3103],{"type":46,"value":351},{"type":40,"tag":280,"props":3105,"children":3106},{"style":292},[3107],{"type":46,"value":3108}," subPlan ",{"type":40,"tag":280,"props":3110,"children":3111},{"style":303},[3112],{"type":46,"value":361},{"type":40,"tag":280,"props":3114,"children":3115},{"style":286},[3116],{"type":46,"value":970},{"type":40,"tag":280,"props":3118,"children":3119},{"style":292},[3120],{"type":46,"value":975},{"type":40,"tag":280,"props":3122,"children":3123},{"style":303},[3124],{"type":46,"value":407},{"type":40,"tag":280,"props":3126,"children":3127},{"style":292},[3128],{"type":46,"value":2853},{"type":40,"tag":280,"props":3130,"children":3131},{"style":303},[3132],{"type":46,"value":407},{"type":40,"tag":280,"props":3134,"children":3135},{"style":369},[3136],{"type":46,"value":1240},{"type":40,"tag":280,"props":3138,"children":3139},{"style":292},[3140],{"type":46,"value":377},{"type":40,"tag":280,"props":3142,"children":3143},{"style":303},[3144],{"type":46,"value":382},{"type":40,"tag":280,"props":3146,"children":3147},{"class":282,"line":1611},[3148,3152,3156,3160,3164,3168],{"type":40,"tag":280,"props":3149,"children":3150},{"style":389},[3151],{"type":46,"value":1457},{"type":40,"tag":280,"props":3153,"children":3154},{"style":303},[3155],{"type":46,"value":397},{"type":40,"tag":280,"props":3157,"children":3158},{"style":303},[3159],{"type":46,"value":306},{"type":40,"tag":280,"props":3161,"children":3162},{"style":309},[3163],{"type":46,"value":2447},{"type":40,"tag":280,"props":3165,"children":3166},{"style":303},[3167],{"type":46,"value":316},{"type":40,"tag":280,"props":3169,"children":3170},{"style":303},[3171],{"type":46,"value":426},{"type":40,"tag":280,"props":3173,"children":3174},{"class":282,"line":1686},[3175,3179,3183,3187,3191,3195],{"type":40,"tag":280,"props":3176,"children":3177},{"style":389},[3178],{"type":46,"value":2904},{"type":40,"tag":280,"props":3180,"children":3181},{"style":303},[3182],{"type":46,"value":397},{"type":40,"tag":280,"props":3184,"children":3185},{"style":303},[3186],{"type":46,"value":306},{"type":40,"tag":280,"props":3188,"children":3189},{"style":309},[3190],{"type":46,"value":1600},{"type":40,"tag":280,"props":3192,"children":3193},{"style":303},[3194],{"type":46,"value":316},{"type":40,"tag":280,"props":3196,"children":3197},{"style":303},[3198],{"type":46,"value":426},{"type":40,"tag":280,"props":3200,"children":3201},{"class":282,"line":1742},[3202,3206,3210,3214,3219,3223],{"type":40,"tag":280,"props":3203,"children":3204},{"style":389},[3205],{"type":46,"value":2958},{"type":40,"tag":280,"props":3207,"children":3208},{"style":303},[3209],{"type":46,"value":397},{"type":40,"tag":280,"props":3211,"children":3212},{"style":303},[3213],{"type":46,"value":306},{"type":40,"tag":280,"props":3215,"children":3216},{"style":309},[3217],{"type":46,"value":3218},"renewal",{"type":40,"tag":280,"props":3220,"children":3221},{"style":303},[3222],{"type":46,"value":316},{"type":40,"tag":280,"props":3224,"children":3225},{"style":303},[3226],{"type":46,"value":426},{"type":40,"tag":280,"props":3228,"children":3229},{"class":282,"line":1769},[3230,3234,3238,3243],{"type":40,"tag":280,"props":3231,"children":3232},{"style":389},[3233],{"type":46,"value":2932},{"type":40,"tag":280,"props":3235,"children":3236},{"style":303},[3237],{"type":46,"value":397},{"type":40,"tag":280,"props":3239,"children":3240},{"style":1624},[3241],{"type":46,"value":3242}," 999",{"type":40,"tag":280,"props":3244,"children":3245},{"style":303},[3246],{"type":46,"value":426},{"type":40,"tag":280,"props":3248,"children":3249},{"class":282,"line":1778},[3250,3255,3259,3263],{"type":40,"tag":280,"props":3251,"children":3252},{"style":389},[3253],{"type":46,"value":3254},"  renewal_price",{"type":40,"tag":280,"props":3256,"children":3257},{"style":303},[3258],{"type":46,"value":397},{"type":40,"tag":280,"props":3260,"children":3261},{"style":1624},[3262],{"type":46,"value":3242},{"type":40,"tag":280,"props":3264,"children":3265},{"style":303},[3266],{"type":46,"value":426},{"type":40,"tag":280,"props":3268,"children":3269},{"class":282,"line":1794},[3270,3275,3279,3284,3288],{"type":40,"tag":280,"props":3271,"children":3272},{"style":389},[3273],{"type":46,"value":3274},"  billing_period",{"type":40,"tag":280,"props":3276,"children":3277},{"style":303},[3278],{"type":46,"value":397},{"type":40,"tag":280,"props":3280,"children":3281},{"style":1624},[3282],{"type":46,"value":3283}," 30",{"type":40,"tag":280,"props":3285,"children":3286},{"style":303},[3287],{"type":46,"value":1003},{"type":40,"tag":280,"props":3289,"children":3290},{"style":338},[3291],{"type":46,"value":3292},"       \u002F\u002F days\n",{"type":40,"tag":280,"props":3294,"children":3296},{"class":282,"line":3295},20,[3297,3301,3305,3309,3313,3317],{"type":40,"tag":280,"props":3298,"children":3299},{"style":389},[3300],{"type":46,"value":2986},{"type":40,"tag":280,"props":3302,"children":3303},{"style":303},[3304],{"type":46,"value":397},{"type":40,"tag":280,"props":3306,"children":3307},{"style":303},[3308],{"type":46,"value":306},{"type":40,"tag":280,"props":3310,"children":3311},{"style":309},[3312],{"type":46,"value":1675},{"type":40,"tag":280,"props":3314,"children":3315},{"style":303},[3316],{"type":46,"value":316},{"type":40,"tag":280,"props":3318,"children":3319},{"style":303},[3320],{"type":46,"value":426},{"type":40,"tag":280,"props":3322,"children":3324},{"class":282,"line":3323},21,[3325,3329,3333],{"type":40,"tag":280,"props":3326,"children":3327},{"style":303},[3328],{"type":46,"value":444},{"type":40,"tag":280,"props":3330,"children":3331},{"style":292},[3332],{"type":46,"value":449},{"type":40,"tag":280,"props":3334,"children":3335},{"style":303},[3336],{"type":46,"value":321},{"type":40,"tag":280,"props":3338,"children":3340},{"class":282,"line":3339},22,[3341],{"type":40,"tag":280,"props":3342,"children":3343},{"emptyLinePlaceholder":328},[3344],{"type":46,"value":331},{"type":40,"tag":280,"props":3346,"children":3348},{"class":282,"line":3347},23,[3349],{"type":40,"tag":280,"props":3350,"children":3351},{"style":338},[3352],{"type":46,"value":3353},"\u002F\u002F Limited stock plan (inventory)\n",{"type":40,"tag":280,"props":3355,"children":3357},{"class":282,"line":3356},24,[3358,3362,3367,3371,3375,3379,3383,3387,3391,3395,3399],{"type":40,"tag":280,"props":3359,"children":3360},{"style":348},[3361],{"type":46,"value":351},{"type":40,"tag":280,"props":3363,"children":3364},{"style":292},[3365],{"type":46,"value":3366}," limitedPlan ",{"type":40,"tag":280,"props":3368,"children":3369},{"style":303},[3370],{"type":46,"value":361},{"type":40,"tag":280,"props":3372,"children":3373},{"style":286},[3374],{"type":46,"value":970},{"type":40,"tag":280,"props":3376,"children":3377},{"style":292},[3378],{"type":46,"value":975},{"type":40,"tag":280,"props":3380,"children":3381},{"style":303},[3382],{"type":46,"value":407},{"type":40,"tag":280,"props":3384,"children":3385},{"style":292},[3386],{"type":46,"value":2853},{"type":40,"tag":280,"props":3388,"children":3389},{"style":303},[3390],{"type":46,"value":407},{"type":40,"tag":280,"props":3392,"children":3393},{"style":369},[3394],{"type":46,"value":1240},{"type":40,"tag":280,"props":3396,"children":3397},{"style":292},[3398],{"type":46,"value":377},{"type":40,"tag":280,"props":3400,"children":3401},{"style":303},[3402],{"type":46,"value":382},{"type":40,"tag":280,"props":3404,"children":3406},{"class":282,"line":3405},25,[3407,3411,3415,3419,3423,3427],{"type":40,"tag":280,"props":3408,"children":3409},{"style":389},[3410],{"type":46,"value":1457},{"type":40,"tag":280,"props":3412,"children":3413},{"style":303},[3414],{"type":46,"value":397},{"type":40,"tag":280,"props":3416,"children":3417},{"style":303},[3418],{"type":46,"value":306},{"type":40,"tag":280,"props":3420,"children":3421},{"style":309},[3422],{"type":46,"value":2447},{"type":40,"tag":280,"props":3424,"children":3425},{"style":303},[3426],{"type":46,"value":316},{"type":40,"tag":280,"props":3428,"children":3429},{"style":303},[3430],{"type":46,"value":426},{"type":40,"tag":280,"props":3432,"children":3434},{"class":282,"line":3433},26,[3435,3439,3443,3447,3451,3455],{"type":40,"tag":280,"props":3436,"children":3437},{"style":389},[3438],{"type":46,"value":2904},{"type":40,"tag":280,"props":3440,"children":3441},{"style":303},[3442],{"type":46,"value":397},{"type":40,"tag":280,"props":3444,"children":3445},{"style":303},[3446],{"type":46,"value":306},{"type":40,"tag":280,"props":3448,"children":3449},{"style":309},[3450],{"type":46,"value":1600},{"type":40,"tag":280,"props":3452,"children":3453},{"style":303},[3454],{"type":46,"value":316},{"type":40,"tag":280,"props":3456,"children":3457},{"style":303},[3458],{"type":46,"value":426},{"type":40,"tag":280,"props":3460,"children":3462},{"class":282,"line":3461},27,[3463,3467,3471,3476],{"type":40,"tag":280,"props":3464,"children":3465},{"style":389},[3466],{"type":46,"value":2932},{"type":40,"tag":280,"props":3468,"children":3469},{"style":303},[3470],{"type":46,"value":397},{"type":40,"tag":280,"props":3472,"children":3473},{"style":1624},[3474],{"type":46,"value":3475}," 4999",{"type":40,"tag":280,"props":3477,"children":3478},{"style":303},[3479],{"type":46,"value":426},{"type":40,"tag":280,"props":3481,"children":3483},{"class":282,"line":3482},28,[3484,3488,3492,3496,3500,3504],{"type":40,"tag":280,"props":3485,"children":3486},{"style":389},[3487],{"type":46,"value":2958},{"type":40,"tag":280,"props":3489,"children":3490},{"style":303},[3491],{"type":46,"value":397},{"type":40,"tag":280,"props":3493,"children":3494},{"style":303},[3495],{"type":46,"value":306},{"type":40,"tag":280,"props":3497,"children":3498},{"style":309},[3499],{"type":46,"value":1649},{"type":40,"tag":280,"props":3501,"children":3502},{"style":303},[3503],{"type":46,"value":316},{"type":40,"tag":280,"props":3505,"children":3506},{"style":303},[3507],{"type":46,"value":426},{"type":40,"tag":280,"props":3509,"children":3511},{"class":282,"line":3510},29,[3512,3517,3521,3526,3530],{"type":40,"tag":280,"props":3513,"children":3514},{"style":389},[3515],{"type":46,"value":3516},"  stock",{"type":40,"tag":280,"props":3518,"children":3519},{"style":303},[3520],{"type":46,"value":397},{"type":40,"tag":280,"props":3522,"children":3523},{"style":1624},[3524],{"type":46,"value":3525}," 100",{"type":40,"tag":280,"props":3527,"children":3528},{"style":303},[3529],{"type":46,"value":1003},{"type":40,"tag":280,"props":3531,"children":3532},{"style":338},[3533],{"type":46,"value":3534},"               \u002F\u002F sold out after 100 purchases\n",{"type":40,"tag":280,"props":3536,"children":3538},{"class":282,"line":3537},30,[3539,3543,3547],{"type":40,"tag":280,"props":3540,"children":3541},{"style":303},[3542],{"type":46,"value":444},{"type":40,"tag":280,"props":3544,"children":3545},{"style":292},[3546],{"type":46,"value":449},{"type":40,"tag":280,"props":3548,"children":3549},{"style":303},[3550],{"type":46,"value":321},{"type":40,"tag":280,"props":3552,"children":3554},{"class":282,"line":3553},31,[3555],{"type":40,"tag":280,"props":3556,"children":3557},{"emptyLinePlaceholder":328},[3558],{"type":46,"value":331},{"type":40,"tag":280,"props":3560,"children":3562},{"class":282,"line":3561},32,[3563,3568,3572,3577,3582,3586,3591,3596],{"type":40,"tag":280,"props":3564,"children":3565},{"style":292},[3566],{"type":46,"value":3567},"console",{"type":40,"tag":280,"props":3569,"children":3570},{"style":303},[3571],{"type":46,"value":407},{"type":40,"tag":280,"props":3573,"children":3574},{"style":369},[3575],{"type":46,"value":3576},"log",{"type":40,"tag":280,"props":3578,"children":3579},{"style":292},[3580],{"type":46,"value":3581},"(plan",{"type":40,"tag":280,"props":3583,"children":3584},{"style":303},[3585],{"type":46,"value":407},{"type":40,"tag":280,"props":3587,"children":3588},{"style":292},[3589],{"type":46,"value":3590},"purchase_url)",{"type":40,"tag":280,"props":3592,"children":3593},{"style":303},[3594],{"type":46,"value":3595},";",{"type":40,"tag":280,"props":3597,"children":3598},{"style":338},[3599],{"type":46,"value":3600}," \u002F\u002F shareable checkout link\n",{"type":40,"tag":743,"props":3602,"children":3604},{"id":3603},"async-iteration-for-paginated-results",[3605],{"type":46,"value":3606},"Async Iteration for Paginated Results",{"type":40,"tag":49,"props":3608,"children":3609},{},[3610,3612,3618],{"type":46,"value":3611},"All ",{"type":40,"tag":101,"props":3613,"children":3615},{"className":3614},[],[3616],{"type":46,"value":3617},".list()",{"type":46,"value":3619}," methods return async iterators:",{"type":40,"tag":269,"props":3621,"children":3623},{"className":271,"code":3622,"language":273,"meta":274,"style":274},"for await (const product of await client.products.list({ company_id: \"biz_xxx\" })) {\n  console.log(product.title);\n}\n\nfor await (const company of await client.companies.list({ parent_company_id: \"biz_xxx\" })) {\n  console.log(company.title, company.metadata);\n}\n",[3624],{"type":40,"tag":101,"props":3625,"children":3626},{"__ignoreMap":274},[3627,3722,3764,3772,3779,3872,3929],{"type":40,"tag":280,"props":3628,"children":3629},{"class":282,"line":24},[3630,3635,3639,3644,3648,3652,3657,3661,3665,3669,3673,3677,3681,3685,3689,3693,3697,3701,3705,3709,3713,3718],{"type":40,"tag":280,"props":3631,"children":3632},{"style":286},[3633],{"type":46,"value":3634},"for",{"type":40,"tag":280,"props":3636,"children":3637},{"style":286},[3638],{"type":46,"value":970},{"type":40,"tag":280,"props":3640,"children":3641},{"style":292},[3642],{"type":46,"value":3643}," (",{"type":40,"tag":280,"props":3645,"children":3646},{"style":348},[3647],{"type":46,"value":351},{"type":40,"tag":280,"props":3649,"children":3650},{"style":292},[3651],{"type":46,"value":2390},{"type":40,"tag":280,"props":3653,"children":3654},{"style":303},[3655],{"type":46,"value":3656},"of",{"type":40,"tag":280,"props":3658,"children":3659},{"style":286},[3660],{"type":46,"value":970},{"type":40,"tag":280,"props":3662,"children":3663},{"style":292},[3664],{"type":46,"value":975},{"type":40,"tag":280,"props":3666,"children":3667},{"style":303},[3668],{"type":46,"value":407},{"type":40,"tag":280,"props":3670,"children":3671},{"style":292},[3672],{"type":46,"value":2411},{"type":40,"tag":280,"props":3674,"children":3675},{"style":303},[3676],{"type":46,"value":407},{"type":40,"tag":280,"props":3678,"children":3679},{"style":369},[3680],{"type":46,"value":2758},{"type":40,"tag":280,"props":3682,"children":3683},{"style":292},[3684],{"type":46,"value":377},{"type":40,"tag":280,"props":3686,"children":3687},{"style":303},[3688],{"type":46,"value":2518},{"type":40,"tag":280,"props":3690,"children":3691},{"style":389},[3692],{"type":46,"value":2771},{"type":40,"tag":280,"props":3694,"children":3695},{"style":303},[3696],{"type":46,"value":397},{"type":40,"tag":280,"props":3698,"children":3699},{"style":303},[3700],{"type":46,"value":306},{"type":40,"tag":280,"props":3702,"children":3703},{"style":309},[3704],{"type":46,"value":2447},{"type":40,"tag":280,"props":3706,"children":3707},{"style":303},[3708],{"type":46,"value":316},{"type":40,"tag":280,"props":3710,"children":3711},{"style":303},[3712],{"type":46,"value":2571},{"type":40,"tag":280,"props":3714,"children":3715},{"style":292},[3716],{"type":46,"value":3717},")) ",{"type":40,"tag":280,"props":3719,"children":3720},{"style":303},[3721],{"type":46,"value":382},{"type":40,"tag":280,"props":3723,"children":3724},{"class":282,"line":324},[3725,3730,3734,3738,3742,3747,3751,3756,3760],{"type":40,"tag":280,"props":3726,"children":3727},{"style":292},[3728],{"type":46,"value":3729},"  console",{"type":40,"tag":280,"props":3731,"children":3732},{"style":303},[3733],{"type":46,"value":407},{"type":40,"tag":280,"props":3735,"children":3736},{"style":369},[3737],{"type":46,"value":3576},{"type":40,"tag":280,"props":3739,"children":3740},{"style":389},[3741],{"type":46,"value":377},{"type":40,"tag":280,"props":3743,"children":3744},{"style":292},[3745],{"type":46,"value":3746},"product",{"type":40,"tag":280,"props":3748,"children":3749},{"style":303},[3750],{"type":46,"value":407},{"type":40,"tag":280,"props":3752,"children":3753},{"style":292},[3754],{"type":46,"value":3755},"title",{"type":40,"tag":280,"props":3757,"children":3758},{"style":389},[3759],{"type":46,"value":449},{"type":40,"tag":280,"props":3761,"children":3762},{"style":303},[3763],{"type":46,"value":321},{"type":40,"tag":280,"props":3765,"children":3766},{"class":282,"line":334},[3767],{"type":40,"tag":280,"props":3768,"children":3769},{"style":303},[3770],{"type":46,"value":3771},"}\n",{"type":40,"tag":280,"props":3773,"children":3774},{"class":282,"line":344},[3775],{"type":40,"tag":280,"props":3776,"children":3777},{"emptyLinePlaceholder":328},[3778],{"type":46,"value":331},{"type":40,"tag":280,"props":3780,"children":3781},{"class":282,"line":385},[3782,3786,3790,3794,3798,3803,3807,3811,3815,3819,3823,3827,3831,3835,3839,3844,3848,3852,3856,3860,3864,3868],{"type":40,"tag":280,"props":3783,"children":3784},{"style":286},[3785],{"type":46,"value":3634},{"type":40,"tag":280,"props":3787,"children":3788},{"style":286},[3789],{"type":46,"value":970},{"type":40,"tag":280,"props":3791,"children":3792},{"style":292},[3793],{"type":46,"value":3643},{"type":40,"tag":280,"props":3795,"children":3796},{"style":348},[3797],{"type":46,"value":351},{"type":40,"tag":280,"props":3799,"children":3800},{"style":292},[3801],{"type":46,"value":3802}," company ",{"type":40,"tag":280,"props":3804,"children":3805},{"style":303},[3806],{"type":46,"value":3656},{"type":40,"tag":280,"props":3808,"children":3809},{"style":286},[3810],{"type":46,"value":970},{"type":40,"tag":280,"props":3812,"children":3813},{"style":292},[3814],{"type":46,"value":975},{"type":40,"tag":280,"props":3816,"children":3817},{"style":303},[3818],{"type":46,"value":407},{"type":40,"tag":280,"props":3820,"children":3821},{"style":292},[3822],{"type":46,"value":1231},{"type":40,"tag":280,"props":3824,"children":3825},{"style":303},[3826],{"type":46,"value":407},{"type":40,"tag":280,"props":3828,"children":3829},{"style":369},[3830],{"type":46,"value":2758},{"type":40,"tag":280,"props":3832,"children":3833},{"style":292},[3834],{"type":46,"value":377},{"type":40,"tag":280,"props":3836,"children":3837},{"style":303},[3838],{"type":46,"value":2518},{"type":40,"tag":280,"props":3840,"children":3841},{"style":389},[3842],{"type":46,"value":3843}," parent_company_id",{"type":40,"tag":280,"props":3845,"children":3846},{"style":303},[3847],{"type":46,"value":397},{"type":40,"tag":280,"props":3849,"children":3850},{"style":303},[3851],{"type":46,"value":306},{"type":40,"tag":280,"props":3853,"children":3854},{"style":309},[3855],{"type":46,"value":2447},{"type":40,"tag":280,"props":3857,"children":3858},{"style":303},[3859],{"type":46,"value":316},{"type":40,"tag":280,"props":3861,"children":3862},{"style":303},[3863],{"type":46,"value":2571},{"type":40,"tag":280,"props":3865,"children":3866},{"style":292},[3867],{"type":46,"value":3717},{"type":40,"tag":280,"props":3869,"children":3870},{"style":303},[3871],{"type":46,"value":382},{"type":40,"tag":280,"props":3873,"children":3874},{"class":282,"line":429},[3875,3879,3883,3887,3891,3896,3900,3904,3908,3913,3917,3921,3925],{"type":40,"tag":280,"props":3876,"children":3877},{"style":292},[3878],{"type":46,"value":3729},{"type":40,"tag":280,"props":3880,"children":3881},{"style":303},[3882],{"type":46,"value":407},{"type":40,"tag":280,"props":3884,"children":3885},{"style":369},[3886],{"type":46,"value":3576},{"type":40,"tag":280,"props":3888,"children":3889},{"style":389},[3890],{"type":46,"value":377},{"type":40,"tag":280,"props":3892,"children":3893},{"style":292},[3894],{"type":46,"value":3895},"company",{"type":40,"tag":280,"props":3897,"children":3898},{"style":303},[3899],{"type":46,"value":407},{"type":40,"tag":280,"props":3901,"children":3902},{"style":292},[3903],{"type":46,"value":3755},{"type":40,"tag":280,"props":3905,"children":3906},{"style":303},[3907],{"type":46,"value":1003},{"type":40,"tag":280,"props":3909,"children":3910},{"style":292},[3911],{"type":46,"value":3912}," company",{"type":40,"tag":280,"props":3914,"children":3915},{"style":303},[3916],{"type":46,"value":407},{"type":40,"tag":280,"props":3918,"children":3919},{"style":292},[3920],{"type":46,"value":1100},{"type":40,"tag":280,"props":3922,"children":3923},{"style":389},[3924],{"type":46,"value":449},{"type":40,"tag":280,"props":3926,"children":3927},{"style":303},[3928],{"type":46,"value":321},{"type":40,"tag":280,"props":3930,"children":3931},{"class":282,"line":438},[3932],{"type":40,"tag":280,"props":3933,"children":3934},{"style":303},[3935],{"type":46,"value":3771},{"type":40,"tag":55,"props":3937,"children":3939},{"id":3938},"_6-checkout",[3940],{"type":46,"value":3941},"6. Checkout",{"type":40,"tag":743,"props":3943,"children":3945},{"id":3944},"option-a-checkout-links-simplest",[3946],{"type":46,"value":3947},"Option A: Checkout Links (Simplest)",{"type":40,"tag":49,"props":3949,"children":3950},{},[3951,3953,3959,3961,3967],{"type":46,"value":3952},"Create a plan, redirect to ",{"type":40,"tag":101,"props":3954,"children":3956},{"className":3955},[],[3957],{"type":46,"value":3958},"plan.purchase_url",{"type":46,"value":3960},". Sandbox: ",{"type":40,"tag":101,"props":3962,"children":3964},{"className":3963},[],[3965],{"type":46,"value":3966},"https:\u002F\u002Fsandbox.whop.com\u002Fcheckout\u002F{plan.id}",{"type":46,"value":407},{"type":40,"tag":743,"props":3969,"children":3971},{"id":3970},"option-b-embedded-checkout-custom-ui",[3972],{"type":46,"value":3973},"Option B: Embedded Checkout (Custom UI)",{"type":40,"tag":49,"props":3975,"children":3976},{},[3977],{"type":40,"tag":783,"props":3978,"children":3979},{},[3980],{"type":46,"value":3981},"Server — create checkout configuration:",{"type":40,"tag":269,"props":3983,"children":3985},{"className":271,"code":3984,"language":273,"meta":274,"style":274},"const config = await client.checkoutConfigurations.create({\n  company_id: \"biz_xxx\",\n  mode: \"payment\",\n  redirect_url: \"https:\u002F\u002Fyoursite.com\u002Fcomplete\",\n  plan: {\n    company_id: \"biz_xxx\",\n    product_id: \"prod_xxx\",\n    initial_price: 1000,\n    plan_type: \"one_time\",\n    currency: \"usd\",\n    visibility: \"hidden\",\n    release_method: \"buy_now\",\n    application_fee_amount: 100, \u002F\u002F optional platform fee\n  },\n  metadata: { order_id: \"order_123\" },\n});\n\u002F\u002F config.id = sessionId for client\n\u002F\u002F config.purchase_url = direct link\n\u002F\u002F config.plan.id = created plan ID\n",[3986],{"type":40,"tag":101,"props":3987,"children":3988},{"__ignoreMap":274},[3989,4037,4064,4091,4119,4134,4161,4189,4209,4237,4265,4292,4320,4344,4351,4390,4405,4413,4421],{"type":40,"tag":280,"props":3990,"children":3991},{"class":282,"line":24},[3992,3996,4001,4005,4009,4013,4017,4021,4025,4029,4033],{"type":40,"tag":280,"props":3993,"children":3994},{"style":348},[3995],{"type":46,"value":351},{"type":40,"tag":280,"props":3997,"children":3998},{"style":292},[3999],{"type":46,"value":4000}," config ",{"type":40,"tag":280,"props":4002,"children":4003},{"style":303},[4004],{"type":46,"value":361},{"type":40,"tag":280,"props":4006,"children":4007},{"style":286},[4008],{"type":46,"value":970},{"type":40,"tag":280,"props":4010,"children":4011},{"style":292},[4012],{"type":46,"value":975},{"type":40,"tag":280,"props":4014,"children":4015},{"style":303},[4016],{"type":46,"value":407},{"type":40,"tag":280,"props":4018,"children":4019},{"style":292},[4020],{"type":46,"value":1433},{"type":40,"tag":280,"props":4022,"children":4023},{"style":303},[4024],{"type":46,"value":407},{"type":40,"tag":280,"props":4026,"children":4027},{"style":369},[4028],{"type":46,"value":1240},{"type":40,"tag":280,"props":4030,"children":4031},{"style":292},[4032],{"type":46,"value":377},{"type":40,"tag":280,"props":4034,"children":4035},{"style":303},[4036],{"type":46,"value":382},{"type":40,"tag":280,"props":4038,"children":4039},{"class":282,"line":324},[4040,4044,4048,4052,4056,4060],{"type":40,"tag":280,"props":4041,"children":4042},{"style":389},[4043],{"type":46,"value":1457},{"type":40,"tag":280,"props":4045,"children":4046},{"style":303},[4047],{"type":46,"value":397},{"type":40,"tag":280,"props":4049,"children":4050},{"style":303},[4051],{"type":46,"value":306},{"type":40,"tag":280,"props":4053,"children":4054},{"style":309},[4055],{"type":46,"value":2447},{"type":40,"tag":280,"props":4057,"children":4058},{"style":303},[4059],{"type":46,"value":316},{"type":40,"tag":280,"props":4061,"children":4062},{"style":303},[4063],{"type":46,"value":426},{"type":40,"tag":280,"props":4065,"children":4066},{"class":282,"line":334},[4067,4071,4075,4079,4083,4087],{"type":40,"tag":280,"props":4068,"children":4069},{"style":389},[4070],{"type":46,"value":1487},{"type":40,"tag":280,"props":4072,"children":4073},{"style":303},[4074],{"type":46,"value":397},{"type":40,"tag":280,"props":4076,"children":4077},{"style":303},[4078],{"type":46,"value":306},{"type":40,"tag":280,"props":4080,"children":4081},{"style":309},[4082],{"type":46,"value":1500},{"type":40,"tag":280,"props":4084,"children":4085},{"style":303},[4086],{"type":46,"value":316},{"type":40,"tag":280,"props":4088,"children":4089},{"style":303},[4090],{"type":46,"value":426},{"type":40,"tag":280,"props":4092,"children":4093},{"class":282,"line":344},[4094,4098,4102,4106,4111,4115],{"type":40,"tag":280,"props":4095,"children":4096},{"style":389},[4097],{"type":46,"value":1516},{"type":40,"tag":280,"props":4099,"children":4100},{"style":303},[4101],{"type":46,"value":397},{"type":40,"tag":280,"props":4103,"children":4104},{"style":303},[4105],{"type":46,"value":306},{"type":40,"tag":280,"props":4107,"children":4108},{"style":309},[4109],{"type":46,"value":4110},"https:\u002F\u002Fyoursite.com\u002Fcomplete",{"type":40,"tag":280,"props":4112,"children":4113},{"style":303},[4114],{"type":46,"value":316},{"type":40,"tag":280,"props":4116,"children":4117},{"style":303},[4118],{"type":46,"value":426},{"type":40,"tag":280,"props":4120,"children":4121},{"class":282,"line":385},[4122,4126,4130],{"type":40,"tag":280,"props":4123,"children":4124},{"style":389},[4125],{"type":46,"value":1545},{"type":40,"tag":280,"props":4127,"children":4128},{"style":303},[4129],{"type":46,"value":397},{"type":40,"tag":280,"props":4131,"children":4132},{"style":303},[4133],{"type":46,"value":1554},{"type":40,"tag":280,"props":4135,"children":4136},{"class":282,"line":429},[4137,4141,4145,4149,4153,4157],{"type":40,"tag":280,"props":4138,"children":4139},{"style":389},[4140],{"type":46,"value":1562},{"type":40,"tag":280,"props":4142,"children":4143},{"style":303},[4144],{"type":46,"value":397},{"type":40,"tag":280,"props":4146,"children":4147},{"style":303},[4148],{"type":46,"value":306},{"type":40,"tag":280,"props":4150,"children":4151},{"style":309},[4152],{"type":46,"value":2447},{"type":40,"tag":280,"props":4154,"children":4155},{"style":303},[4156],{"type":46,"value":316},{"type":40,"tag":280,"props":4158,"children":4159},{"style":303},[4160],{"type":46,"value":426},{"type":40,"tag":280,"props":4162,"children":4163},{"class":282,"line":438},[4164,4169,4173,4177,4181,4185],{"type":40,"tag":280,"props":4165,"children":4166},{"style":389},[4167],{"type":46,"value":4168},"    product_id",{"type":40,"tag":280,"props":4170,"children":4171},{"style":303},[4172],{"type":46,"value":397},{"type":40,"tag":280,"props":4174,"children":4175},{"style":303},[4176],{"type":46,"value":306},{"type":40,"tag":280,"props":4178,"children":4179},{"style":309},[4180],{"type":46,"value":1600},{"type":40,"tag":280,"props":4182,"children":4183},{"style":303},[4184],{"type":46,"value":316},{"type":40,"tag":280,"props":4186,"children":4187},{"style":303},[4188],{"type":46,"value":426},{"type":40,"tag":280,"props":4190,"children":4191},{"class":282,"line":456},[4192,4196,4200,4205],{"type":40,"tag":280,"props":4193,"children":4194},{"style":389},[4195],{"type":46,"value":1617},{"type":40,"tag":280,"props":4197,"children":4198},{"style":303},[4199],{"type":46,"value":397},{"type":40,"tag":280,"props":4201,"children":4202},{"style":1624},[4203],{"type":46,"value":4204}," 1000",{"type":40,"tag":280,"props":4206,"children":4207},{"style":303},[4208],{"type":46,"value":426},{"type":40,"tag":280,"props":4210,"children":4211},{"class":282,"line":464},[4212,4217,4221,4225,4229,4233],{"type":40,"tag":280,"props":4213,"children":4214},{"style":389},[4215],{"type":46,"value":4216},"    plan_type",{"type":40,"tag":280,"props":4218,"children":4219},{"style":303},[4220],{"type":46,"value":397},{"type":40,"tag":280,"props":4222,"children":4223},{"style":303},[4224],{"type":46,"value":306},{"type":40,"tag":280,"props":4226,"children":4227},{"style":309},[4228],{"type":46,"value":1649},{"type":40,"tag":280,"props":4230,"children":4231},{"style":303},[4232],{"type":46,"value":316},{"type":40,"tag":280,"props":4234,"children":4235},{"style":303},[4236],{"type":46,"value":426},{"type":40,"tag":280,"props":4238,"children":4239},{"class":282,"line":473},[4240,4245,4249,4253,4257,4261],{"type":40,"tag":280,"props":4241,"children":4242},{"style":389},[4243],{"type":46,"value":4244},"    currency",{"type":40,"tag":280,"props":4246,"children":4247},{"style":303},[4248],{"type":46,"value":397},{"type":40,"tag":280,"props":4250,"children":4251},{"style":303},[4252],{"type":46,"value":306},{"type":40,"tag":280,"props":4254,"children":4255},{"style":309},[4256],{"type":46,"value":1675},{"type":40,"tag":280,"props":4258,"children":4259},{"style":303},[4260],{"type":46,"value":316},{"type":40,"tag":280,"props":4262,"children":4263},{"style":303},[4264],{"type":46,"value":426},{"type":40,"tag":280,"props":4266,"children":4267},{"class":282,"line":506},[4268,4272,4276,4280,4284,4288],{"type":40,"tag":280,"props":4269,"children":4270},{"style":389},[4271],{"type":46,"value":1692},{"type":40,"tag":280,"props":4273,"children":4274},{"style":303},[4275],{"type":46,"value":397},{"type":40,"tag":280,"props":4277,"children":4278},{"style":303},[4279],{"type":46,"value":306},{"type":40,"tag":280,"props":4281,"children":4282},{"style":309},[4283],{"type":46,"value":1705},{"type":40,"tag":280,"props":4285,"children":4286},{"style":303},[4287],{"type":46,"value":316},{"type":40,"tag":280,"props":4289,"children":4290},{"style":303},[4291],{"type":46,"value":426},{"type":40,"tag":280,"props":4293,"children":4294},{"class":282,"line":542},[4295,4300,4304,4308,4312,4316],{"type":40,"tag":280,"props":4296,"children":4297},{"style":389},[4298],{"type":46,"value":4299},"    release_method",{"type":40,"tag":280,"props":4301,"children":4302},{"style":303},[4303],{"type":46,"value":397},{"type":40,"tag":280,"props":4305,"children":4306},{"style":303},[4307],{"type":46,"value":306},{"type":40,"tag":280,"props":4309,"children":4310},{"style":309},[4311],{"type":46,"value":1731},{"type":40,"tag":280,"props":4313,"children":4314},{"style":303},[4315],{"type":46,"value":316},{"type":40,"tag":280,"props":4317,"children":4318},{"style":303},[4319],{"type":46,"value":426},{"type":40,"tag":280,"props":4321,"children":4322},{"class":282,"line":572},[4323,4327,4331,4335,4339],{"type":40,"tag":280,"props":4324,"children":4325},{"style":389},[4326],{"type":46,"value":1748},{"type":40,"tag":280,"props":4328,"children":4329},{"style":303},[4330],{"type":46,"value":397},{"type":40,"tag":280,"props":4332,"children":4333},{"style":1624},[4334],{"type":46,"value":3525},{"type":40,"tag":280,"props":4336,"children":4337},{"style":303},[4338],{"type":46,"value":1003},{"type":40,"tag":280,"props":4340,"children":4341},{"style":338},[4342],{"type":46,"value":4343}," \u002F\u002F optional platform fee\n",{"type":40,"tag":280,"props":4345,"children":4346},{"class":282,"line":1611},[4347],{"type":40,"tag":280,"props":4348,"children":4349},{"style":303},[4350],{"type":46,"value":1775},{"type":40,"tag":280,"props":4352,"children":4353},{"class":282,"line":1686},[4354,4358,4362,4366,4370,4374,4378,4382,4386],{"type":40,"tag":280,"props":4355,"children":4356},{"style":389},[4357],{"type":46,"value":1343},{"type":40,"tag":280,"props":4359,"children":4360},{"style":303},[4361],{"type":46,"value":397},{"type":40,"tag":280,"props":4363,"children":4364},{"style":303},[4365],{"type":46,"value":1008},{"type":40,"tag":280,"props":4367,"children":4368},{"style":389},[4369],{"type":46,"value":2226},{"type":40,"tag":280,"props":4371,"children":4372},{"style":303},[4373],{"type":46,"value":397},{"type":40,"tag":280,"props":4375,"children":4376},{"style":303},[4377],{"type":46,"value":306},{"type":40,"tag":280,"props":4379,"children":4380},{"style":309},[4381],{"type":46,"value":2239},{"type":40,"tag":280,"props":4383,"children":4384},{"style":303},[4385],{"type":46,"value":316},{"type":40,"tag":280,"props":4387,"children":4388},{"style":303},[4389],{"type":46,"value":1378},{"type":40,"tag":280,"props":4391,"children":4392},{"class":282,"line":1742},[4393,4397,4401],{"type":40,"tag":280,"props":4394,"children":4395},{"style":303},[4396],{"type":46,"value":444},{"type":40,"tag":280,"props":4398,"children":4399},{"style":292},[4400],{"type":46,"value":449},{"type":40,"tag":280,"props":4402,"children":4403},{"style":303},[4404],{"type":46,"value":321},{"type":40,"tag":280,"props":4406,"children":4407},{"class":282,"line":1769},[4408],{"type":40,"tag":280,"props":4409,"children":4410},{"style":338},[4411],{"type":46,"value":4412},"\u002F\u002F config.id = sessionId for client\n",{"type":40,"tag":280,"props":4414,"children":4415},{"class":282,"line":1778},[4416],{"type":40,"tag":280,"props":4417,"children":4418},{"style":338},[4419],{"type":46,"value":4420},"\u002F\u002F config.purchase_url = direct link\n",{"type":40,"tag":280,"props":4422,"children":4423},{"class":282,"line":1794},[4424],{"type":40,"tag":280,"props":4425,"children":4426},{"style":338},[4427],{"type":46,"value":4428},"\u002F\u002F config.plan.id = created plan ID\n",{"type":40,"tag":49,"props":4430,"children":4431},{},[4432],{"type":40,"tag":783,"props":4433,"children":4434},{},[4435],{"type":46,"value":4436},"Client — render embed:",{"type":40,"tag":269,"props":4438,"children":4442},{"className":4439,"code":4440,"language":4441,"meta":274,"style":274},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { WhopCheckoutEmbed } from \"@whop\u002Fcheckout\u002Freact\";\n\n\u003CWhopCheckoutEmbed\n  sessionId={config.id}\n  returnUrl=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n  environment=\"production\"  \u002F\u002F or \"sandbox\"\n  themeOptions={{ accentColor: \"#FF6243\", highContrast: true }}\n  onComplete={(paymentId) => console.log(\"Paid:\", paymentId)}\n\u002F>\n","tsx",[4443],{"type":40,"tag":101,"props":4444,"children":4445},{"__ignoreMap":274},[4446,4488,4495,4509,4539,4564,4594,4653,4724],{"type":40,"tag":280,"props":4447,"children":4448},{"class":282,"line":24},[4449,4453,4457,4462,4466,4471,4475,4480,4484],{"type":40,"tag":280,"props":4450,"children":4451},{"style":286},[4452],{"type":46,"value":289},{"type":40,"tag":280,"props":4454,"children":4455},{"style":303},[4456],{"type":46,"value":1008},{"type":40,"tag":280,"props":4458,"children":4459},{"style":292},[4460],{"type":46,"value":4461}," WhopCheckoutEmbed",{"type":40,"tag":280,"props":4463,"children":4464},{"style":303},[4465],{"type":46,"value":2571},{"type":40,"tag":280,"props":4467,"children":4468},{"style":286},[4469],{"type":46,"value":4470}," from",{"type":40,"tag":280,"props":4472,"children":4473},{"style":303},[4474],{"type":46,"value":306},{"type":40,"tag":280,"props":4476,"children":4477},{"style":309},[4478],{"type":46,"value":4479},"@whop\u002Fcheckout\u002Freact",{"type":40,"tag":280,"props":4481,"children":4482},{"style":303},[4483],{"type":46,"value":316},{"type":40,"tag":280,"props":4485,"children":4486},{"style":303},[4487],{"type":46,"value":321},{"type":40,"tag":280,"props":4489,"children":4490},{"class":282,"line":324},[4491],{"type":40,"tag":280,"props":4492,"children":4493},{"emptyLinePlaceholder":328},[4494],{"type":46,"value":331},{"type":40,"tag":280,"props":4496,"children":4497},{"class":282,"line":334},[4498,4503],{"type":40,"tag":280,"props":4499,"children":4500},{"style":303},[4501],{"type":46,"value":4502},"\u003C",{"type":40,"tag":280,"props":4504,"children":4506},{"style":4505},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[4507],{"type":46,"value":4508},"WhopCheckoutEmbed\n",{"type":40,"tag":280,"props":4510,"children":4511},{"class":282,"line":344},[4512,4517,4522,4527,4531,4535],{"type":40,"tag":280,"props":4513,"children":4514},{"style":348},[4515],{"type":46,"value":4516},"  sessionId",{"type":40,"tag":280,"props":4518,"children":4519},{"style":303},[4520],{"type":46,"value":4521},"={",{"type":40,"tag":280,"props":4523,"children":4524},{"style":292},[4525],{"type":46,"value":4526},"config",{"type":40,"tag":280,"props":4528,"children":4529},{"style":303},[4530],{"type":46,"value":407},{"type":40,"tag":280,"props":4532,"children":4533},{"style":292},[4534],{"type":46,"value":1475},{"type":40,"tag":280,"props":4536,"children":4537},{"style":303},[4538],{"type":46,"value":3771},{"type":40,"tag":280,"props":4540,"children":4541},{"class":282,"line":385},[4542,4547,4551,4555,4559],{"type":40,"tag":280,"props":4543,"children":4544},{"style":348},[4545],{"type":46,"value":4546},"  returnUrl",{"type":40,"tag":280,"props":4548,"children":4549},{"style":303},[4550],{"type":46,"value":361},{"type":40,"tag":280,"props":4552,"children":4553},{"style":303},[4554],{"type":46,"value":316},{"type":40,"tag":280,"props":4556,"children":4557},{"style":309},[4558],{"type":46,"value":4110},{"type":40,"tag":280,"props":4560,"children":4561},{"style":303},[4562],{"type":46,"value":4563},"\"\n",{"type":40,"tag":280,"props":4565,"children":4566},{"class":282,"line":429},[4567,4572,4576,4580,4585,4589],{"type":40,"tag":280,"props":4568,"children":4569},{"style":348},[4570],{"type":46,"value":4571},"  environment",{"type":40,"tag":280,"props":4573,"children":4574},{"style":303},[4575],{"type":46,"value":361},{"type":40,"tag":280,"props":4577,"children":4578},{"style":303},[4579],{"type":46,"value":316},{"type":40,"tag":280,"props":4581,"children":4582},{"style":309},[4583],{"type":46,"value":4584},"production",{"type":40,"tag":280,"props":4586,"children":4587},{"style":303},[4588],{"type":46,"value":316},{"type":40,"tag":280,"props":4590,"children":4591},{"style":338},[4592],{"type":46,"value":4593},"  \u002F\u002F or \"sandbox\"\n",{"type":40,"tag":280,"props":4595,"children":4596},{"class":282,"line":438},[4597,4602,4607,4612,4616,4620,4625,4629,4633,4638,4642,4648],{"type":40,"tag":280,"props":4598,"children":4599},{"style":348},[4600],{"type":46,"value":4601},"  themeOptions",{"type":40,"tag":280,"props":4603,"children":4604},{"style":303},[4605],{"type":46,"value":4606},"={{",{"type":40,"tag":280,"props":4608,"children":4609},{"style":389},[4610],{"type":46,"value":4611}," accentColor",{"type":40,"tag":280,"props":4613,"children":4614},{"style":303},[4615],{"type":46,"value":397},{"type":40,"tag":280,"props":4617,"children":4618},{"style":303},[4619],{"type":46,"value":306},{"type":40,"tag":280,"props":4621,"children":4622},{"style":309},[4623],{"type":46,"value":4624},"#FF6243",{"type":40,"tag":280,"props":4626,"children":4627},{"style":303},[4628],{"type":46,"value":316},{"type":40,"tag":280,"props":4630,"children":4631},{"style":303},[4632],{"type":46,"value":1003},{"type":40,"tag":280,"props":4634,"children":4635},{"style":389},[4636],{"type":46,"value":4637}," highContrast",{"type":40,"tag":280,"props":4639,"children":4640},{"style":303},[4641],{"type":46,"value":397},{"type":40,"tag":280,"props":4643,"children":4645},{"style":4644},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4646],{"type":46,"value":4647}," true",{"type":40,"tag":280,"props":4649,"children":4650},{"style":303},[4651],{"type":46,"value":4652}," }}\n",{"type":40,"tag":280,"props":4654,"children":4655},{"class":282,"line":456},[4656,4661,4666,4672,4676,4681,4686,4690,4694,4698,4702,4707,4711,4715,4720],{"type":40,"tag":280,"props":4657,"children":4658},{"style":348},[4659],{"type":46,"value":4660},"  onComplete",{"type":40,"tag":280,"props":4662,"children":4663},{"style":303},[4664],{"type":46,"value":4665},"={(",{"type":40,"tag":280,"props":4667,"children":4669},{"style":4668},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[4670],{"type":46,"value":4671},"paymentId",{"type":40,"tag":280,"props":4673,"children":4674},{"style":303},[4675],{"type":46,"value":449},{"type":40,"tag":280,"props":4677,"children":4678},{"style":348},[4679],{"type":46,"value":4680}," =>",{"type":40,"tag":280,"props":4682,"children":4683},{"style":292},[4684],{"type":46,"value":4685}," console",{"type":40,"tag":280,"props":4687,"children":4688},{"style":303},[4689],{"type":46,"value":407},{"type":40,"tag":280,"props":4691,"children":4692},{"style":369},[4693],{"type":46,"value":3576},{"type":40,"tag":280,"props":4695,"children":4696},{"style":292},[4697],{"type":46,"value":377},{"type":40,"tag":280,"props":4699,"children":4700},{"style":303},[4701],{"type":46,"value":316},{"type":40,"tag":280,"props":4703,"children":4704},{"style":309},[4705],{"type":46,"value":4706},"Paid:",{"type":40,"tag":280,"props":4708,"children":4709},{"style":303},[4710],{"type":46,"value":316},{"type":40,"tag":280,"props":4712,"children":4713},{"style":303},[4714],{"type":46,"value":1003},{"type":40,"tag":280,"props":4716,"children":4717},{"style":292},[4718],{"type":46,"value":4719}," paymentId)",{"type":40,"tag":280,"props":4721,"children":4722},{"style":303},[4723],{"type":46,"value":3771},{"type":40,"tag":280,"props":4725,"children":4726},{"class":282,"line":464},[4727],{"type":40,"tag":280,"props":4728,"children":4729},{"style":303},[4730],{"type":46,"value":4731},"\u002F>\n",{"type":40,"tag":49,"props":4733,"children":4734},{},[4735,4737,4743],{"type":46,"value":4736},"In production, ",{"type":40,"tag":101,"props":4738,"children":4740},{"className":4739},[],[4741],{"type":46,"value":4742},"redirect_url",{"type":46,"value":4744}," must be HTTPS. Localhost (HTTP) works in sandbox but will be rejected in production.",{"type":40,"tag":49,"props":4746,"children":4747},{},[4748,4750,4756],{"type":46,"value":4749},"Or use ",{"type":40,"tag":101,"props":4751,"children":4753},{"className":4752},[],[4754],{"type":46,"value":4755},"planId",{"type":46,"value":4757}," directly (no server config needed):",{"type":40,"tag":269,"props":4759,"children":4761},{"className":4439,"code":4760,"language":4441,"meta":274,"style":274},"\u003CWhopCheckoutEmbed\n  planId=\"plan_xxx\"\n  returnUrl=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n  environment=\"sandbox\"\n\u002F>\n",[4762],{"type":40,"tag":101,"props":4763,"children":4764},{"__ignoreMap":274},[4765,4776,4801,4824,4848],{"type":40,"tag":280,"props":4766,"children":4767},{"class":282,"line":24},[4768,4772],{"type":40,"tag":280,"props":4769,"children":4770},{"style":303},[4771],{"type":46,"value":4502},{"type":40,"tag":280,"props":4773,"children":4774},{"style":4505},[4775],{"type":46,"value":4508},{"type":40,"tag":280,"props":4777,"children":4778},{"class":282,"line":324},[4779,4784,4788,4792,4797],{"type":40,"tag":280,"props":4780,"children":4781},{"style":348},[4782],{"type":46,"value":4783},"  planId",{"type":40,"tag":280,"props":4785,"children":4786},{"style":303},[4787],{"type":46,"value":361},{"type":40,"tag":280,"props":4789,"children":4790},{"style":303},[4791],{"type":46,"value":316},{"type":40,"tag":280,"props":4793,"children":4794},{"style":309},[4795],{"type":46,"value":4796},"plan_xxx",{"type":40,"tag":280,"props":4798,"children":4799},{"style":303},[4800],{"type":46,"value":4563},{"type":40,"tag":280,"props":4802,"children":4803},{"class":282,"line":334},[4804,4808,4812,4816,4820],{"type":40,"tag":280,"props":4805,"children":4806},{"style":348},[4807],{"type":46,"value":4546},{"type":40,"tag":280,"props":4809,"children":4810},{"style":303},[4811],{"type":46,"value":361},{"type":40,"tag":280,"props":4813,"children":4814},{"style":303},[4815],{"type":46,"value":316},{"type":40,"tag":280,"props":4817,"children":4818},{"style":309},[4819],{"type":46,"value":4110},{"type":40,"tag":280,"props":4821,"children":4822},{"style":303},[4823],{"type":46,"value":4563},{"type":40,"tag":280,"props":4825,"children":4826},{"class":282,"line":344},[4827,4831,4835,4839,4844],{"type":40,"tag":280,"props":4828,"children":4829},{"style":348},[4830],{"type":46,"value":4571},{"type":40,"tag":280,"props":4832,"children":4833},{"style":303},[4834],{"type":46,"value":361},{"type":40,"tag":280,"props":4836,"children":4837},{"style":303},[4838],{"type":46,"value":316},{"type":40,"tag":280,"props":4840,"children":4841},{"style":309},[4842],{"type":46,"value":4843},"sandbox",{"type":40,"tag":280,"props":4845,"children":4846},{"style":303},[4847],{"type":46,"value":4563},{"type":40,"tag":280,"props":4849,"children":4850},{"class":282,"line":385},[4851],{"type":40,"tag":280,"props":4852,"children":4853},{"style":303},[4854],{"type":46,"value":4731},{"type":40,"tag":743,"props":4856,"children":4858},{"id":4857},"option-c-aggregated-cart-checkout",[4859],{"type":46,"value":4860},"Option C: Aggregated Cart Checkout",{"type":40,"tag":49,"props":4862,"children":4863},{},[4864,4866,4872],{"type":46,"value":4865},"Aggregate cart total into one checkout, serialize items in ",{"type":40,"tag":101,"props":4867,"children":4869},{"className":4868},[],[4870],{"type":46,"value":4871},"metadata.cart",{"type":46,"value":397},{"type":40,"tag":269,"props":4874,"children":4876},{"className":271,"code":4875,"language":273,"meta":274,"style":274},"const total = cartItems.reduce((sum, i) => sum + i.price * i.qty, 0);\nconst config = await client.checkoutConfigurations.create({\n  company_id: \"biz_xxx\",\n  plan: { initial_price: total, plan_type: \"one_time\" },\n  metadata: { cart: JSON.stringify(cartItems) },\n});\n",[4877],{"type":40,"tag":101,"props":4878,"children":4879},{"__ignoreMap":274},[4880,4998,5045,5072,5128,5174],{"type":40,"tag":280,"props":4881,"children":4882},{"class":282,"line":24},[4883,4887,4892,4896,4901,4905,4910,4914,4918,4923,4927,4932,4936,4940,4945,4950,4954,4958,4963,4968,4972,4976,4981,4985,4990,4994],{"type":40,"tag":280,"props":4884,"children":4885},{"style":348},[4886],{"type":46,"value":351},{"type":40,"tag":280,"props":4888,"children":4889},{"style":292},[4890],{"type":46,"value":4891}," total ",{"type":40,"tag":280,"props":4893,"children":4894},{"style":303},[4895],{"type":46,"value":361},{"type":40,"tag":280,"props":4897,"children":4898},{"style":292},[4899],{"type":46,"value":4900}," cartItems",{"type":40,"tag":280,"props":4902,"children":4903},{"style":303},[4904],{"type":46,"value":407},{"type":40,"tag":280,"props":4906,"children":4907},{"style":369},[4908],{"type":46,"value":4909},"reduce",{"type":40,"tag":280,"props":4911,"children":4912},{"style":292},[4913],{"type":46,"value":377},{"type":40,"tag":280,"props":4915,"children":4916},{"style":303},[4917],{"type":46,"value":377},{"type":40,"tag":280,"props":4919,"children":4920},{"style":4668},[4921],{"type":46,"value":4922},"sum",{"type":40,"tag":280,"props":4924,"children":4925},{"style":303},[4926],{"type":46,"value":1003},{"type":40,"tag":280,"props":4928,"children":4929},{"style":4668},[4930],{"type":46,"value":4931}," i",{"type":40,"tag":280,"props":4933,"children":4934},{"style":303},[4935],{"type":46,"value":449},{"type":40,"tag":280,"props":4937,"children":4938},{"style":348},[4939],{"type":46,"value":4680},{"type":40,"tag":280,"props":4941,"children":4942},{"style":292},[4943],{"type":46,"value":4944}," sum ",{"type":40,"tag":280,"props":4946,"children":4947},{"style":303},[4948],{"type":46,"value":4949},"+",{"type":40,"tag":280,"props":4951,"children":4952},{"style":292},[4953],{"type":46,"value":4931},{"type":40,"tag":280,"props":4955,"children":4956},{"style":303},[4957],{"type":46,"value":407},{"type":40,"tag":280,"props":4959,"children":4960},{"style":292},[4961],{"type":46,"value":4962},"price ",{"type":40,"tag":280,"props":4964,"children":4965},{"style":303},[4966],{"type":46,"value":4967},"*",{"type":40,"tag":280,"props":4969,"children":4970},{"style":292},[4971],{"type":46,"value":4931},{"type":40,"tag":280,"props":4973,"children":4974},{"style":303},[4975],{"type":46,"value":407},{"type":40,"tag":280,"props":4977,"children":4978},{"style":292},[4979],{"type":46,"value":4980},"qty",{"type":40,"tag":280,"props":4982,"children":4983},{"style":303},[4984],{"type":46,"value":1003},{"type":40,"tag":280,"props":4986,"children":4987},{"style":1624},[4988],{"type":46,"value":4989}," 0",{"type":40,"tag":280,"props":4991,"children":4992},{"style":292},[4993],{"type":46,"value":449},{"type":40,"tag":280,"props":4995,"children":4996},{"style":303},[4997],{"type":46,"value":321},{"type":40,"tag":280,"props":4999,"children":5000},{"class":282,"line":324},[5001,5005,5009,5013,5017,5021,5025,5029,5033,5037,5041],{"type":40,"tag":280,"props":5002,"children":5003},{"style":348},[5004],{"type":46,"value":351},{"type":40,"tag":280,"props":5006,"children":5007},{"style":292},[5008],{"type":46,"value":4000},{"type":40,"tag":280,"props":5010,"children":5011},{"style":303},[5012],{"type":46,"value":361},{"type":40,"tag":280,"props":5014,"children":5015},{"style":286},[5016],{"type":46,"value":970},{"type":40,"tag":280,"props":5018,"children":5019},{"style":292},[5020],{"type":46,"value":975},{"type":40,"tag":280,"props":5022,"children":5023},{"style":303},[5024],{"type":46,"value":407},{"type":40,"tag":280,"props":5026,"children":5027},{"style":292},[5028],{"type":46,"value":1433},{"type":40,"tag":280,"props":5030,"children":5031},{"style":303},[5032],{"type":46,"value":407},{"type":40,"tag":280,"props":5034,"children":5035},{"style":369},[5036],{"type":46,"value":1240},{"type":40,"tag":280,"props":5038,"children":5039},{"style":292},[5040],{"type":46,"value":377},{"type":40,"tag":280,"props":5042,"children":5043},{"style":303},[5044],{"type":46,"value":382},{"type":40,"tag":280,"props":5046,"children":5047},{"class":282,"line":334},[5048,5052,5056,5060,5064,5068],{"type":40,"tag":280,"props":5049,"children":5050},{"style":389},[5051],{"type":46,"value":1457},{"type":40,"tag":280,"props":5053,"children":5054},{"style":303},[5055],{"type":46,"value":397},{"type":40,"tag":280,"props":5057,"children":5058},{"style":303},[5059],{"type":46,"value":306},{"type":40,"tag":280,"props":5061,"children":5062},{"style":309},[5063],{"type":46,"value":2447},{"type":40,"tag":280,"props":5065,"children":5066},{"style":303},[5067],{"type":46,"value":316},{"type":40,"tag":280,"props":5069,"children":5070},{"style":303},[5071],{"type":46,"value":426},{"type":40,"tag":280,"props":5073,"children":5074},{"class":282,"line":344},[5075,5079,5083,5087,5091,5095,5100,5104,5108,5112,5116,5120,5124],{"type":40,"tag":280,"props":5076,"children":5077},{"style":389},[5078],{"type":46,"value":1545},{"type":40,"tag":280,"props":5080,"children":5081},{"style":303},[5082],{"type":46,"value":397},{"type":40,"tag":280,"props":5084,"children":5085},{"style":303},[5086],{"type":46,"value":1008},{"type":40,"tag":280,"props":5088,"children":5089},{"style":389},[5090],{"type":46,"value":1920},{"type":40,"tag":280,"props":5092,"children":5093},{"style":303},[5094],{"type":46,"value":397},{"type":40,"tag":280,"props":5096,"children":5097},{"style":292},[5098],{"type":46,"value":5099}," total",{"type":40,"tag":280,"props":5101,"children":5102},{"style":303},[5103],{"type":46,"value":1003},{"type":40,"tag":280,"props":5105,"children":5106},{"style":389},[5107],{"type":46,"value":1636},{"type":40,"tag":280,"props":5109,"children":5110},{"style":303},[5111],{"type":46,"value":397},{"type":40,"tag":280,"props":5113,"children":5114},{"style":303},[5115],{"type":46,"value":306},{"type":40,"tag":280,"props":5117,"children":5118},{"style":309},[5119],{"type":46,"value":1649},{"type":40,"tag":280,"props":5121,"children":5122},{"style":303},[5123],{"type":46,"value":316},{"type":40,"tag":280,"props":5125,"children":5126},{"style":303},[5127],{"type":46,"value":1378},{"type":40,"tag":280,"props":5129,"children":5130},{"class":282,"line":385},[5131,5135,5139,5143,5148,5152,5156,5160,5164,5169],{"type":40,"tag":280,"props":5132,"children":5133},{"style":389},[5134],{"type":46,"value":1343},{"type":40,"tag":280,"props":5136,"children":5137},{"style":303},[5138],{"type":46,"value":397},{"type":40,"tag":280,"props":5140,"children":5141},{"style":303},[5142],{"type":46,"value":1008},{"type":40,"tag":280,"props":5144,"children":5145},{"style":389},[5146],{"type":46,"value":5147}," cart",{"type":40,"tag":280,"props":5149,"children":5150},{"style":303},[5151],{"type":46,"value":397},{"type":40,"tag":280,"props":5153,"children":5154},{"style":292},[5155],{"type":46,"value":2500},{"type":40,"tag":280,"props":5157,"children":5158},{"style":303},[5159],{"type":46,"value":407},{"type":40,"tag":280,"props":5161,"children":5162},{"style":369},[5163],{"type":46,"value":2509},{"type":40,"tag":280,"props":5165,"children":5166},{"style":292},[5167],{"type":46,"value":5168},"(cartItems) ",{"type":40,"tag":280,"props":5170,"children":5171},{"style":303},[5172],{"type":46,"value":5173},"},\n",{"type":40,"tag":280,"props":5175,"children":5176},{"class":282,"line":429},[5177,5181,5185],{"type":40,"tag":280,"props":5178,"children":5179},{"style":303},[5180],{"type":46,"value":444},{"type":40,"tag":280,"props":5182,"children":5183},{"style":292},[5184],{"type":46,"value":449},{"type":40,"tag":280,"props":5186,"children":5187},{"style":303},[5188],{"type":46,"value":321},{"type":40,"tag":743,"props":5190,"children":5192},{"id":5191},"option-d-vanilla-js-checkout",[5193],{"type":46,"value":5194},"Option D: Vanilla JS Checkout",{"type":40,"tag":269,"props":5196,"children":5200},{"className":5197,"code":5198,"language":5199,"meta":274,"style":274},"language-html shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript async defer src=\"https:\u002F\u002Fjs.whop.com\u002Fstatic\u002Fcheckout\u002Floader.js\">\u003C\u002Fscript>\n\u003Cdiv\n  data-whop-checkout-plan-id=\"plan_xxx\"\n  data-whop-checkout-return-url=\"https:\u002F\u002Fyoursite.com\u002Fcomplete\"\n>\u003C\u002Fdiv>\n","html",[5201],{"type":40,"tag":101,"props":5202,"children":5203},{"__ignoreMap":274},[5204,5262,5274,5298,5322],{"type":40,"tag":280,"props":5205,"children":5206},{"class":282,"line":24},[5207,5211,5216,5221,5226,5231,5235,5239,5244,5248,5253,5257],{"type":40,"tag":280,"props":5208,"children":5209},{"style":303},[5210],{"type":46,"value":4502},{"type":40,"tag":280,"props":5212,"children":5213},{"style":389},[5214],{"type":46,"value":5215},"script",{"type":40,"tag":280,"props":5217,"children":5218},{"style":348},[5219],{"type":46,"value":5220}," async",{"type":40,"tag":280,"props":5222,"children":5223},{"style":348},[5224],{"type":46,"value":5225}," defer",{"type":40,"tag":280,"props":5227,"children":5228},{"style":348},[5229],{"type":46,"value":5230}," src",{"type":40,"tag":280,"props":5232,"children":5233},{"style":303},[5234],{"type":46,"value":361},{"type":40,"tag":280,"props":5236,"children":5237},{"style":303},[5238],{"type":46,"value":316},{"type":40,"tag":280,"props":5240,"children":5241},{"style":309},[5242],{"type":46,"value":5243},"https:\u002F\u002Fjs.whop.com\u002Fstatic\u002Fcheckout\u002Floader.js",{"type":40,"tag":280,"props":5245,"children":5246},{"style":303},[5247],{"type":46,"value":316},{"type":40,"tag":280,"props":5249,"children":5250},{"style":303},[5251],{"type":46,"value":5252},">\u003C\u002F",{"type":40,"tag":280,"props":5254,"children":5255},{"style":389},[5256],{"type":46,"value":5215},{"type":40,"tag":280,"props":5258,"children":5259},{"style":303},[5260],{"type":46,"value":5261},">\n",{"type":40,"tag":280,"props":5263,"children":5264},{"class":282,"line":324},[5265,5269],{"type":40,"tag":280,"props":5266,"children":5267},{"style":303},[5268],{"type":46,"value":4502},{"type":40,"tag":280,"props":5270,"children":5271},{"style":389},[5272],{"type":46,"value":5273},"div\n",{"type":40,"tag":280,"props":5275,"children":5276},{"class":282,"line":334},[5277,5282,5286,5290,5294],{"type":40,"tag":280,"props":5278,"children":5279},{"style":348},[5280],{"type":46,"value":5281},"  data-whop-checkout-plan-id",{"type":40,"tag":280,"props":5283,"children":5284},{"style":303},[5285],{"type":46,"value":361},{"type":40,"tag":280,"props":5287,"children":5288},{"style":303},[5289],{"type":46,"value":316},{"type":40,"tag":280,"props":5291,"children":5292},{"style":309},[5293],{"type":46,"value":4796},{"type":40,"tag":280,"props":5295,"children":5296},{"style":303},[5297],{"type":46,"value":4563},{"type":40,"tag":280,"props":5299,"children":5300},{"class":282,"line":344},[5301,5306,5310,5314,5318],{"type":40,"tag":280,"props":5302,"children":5303},{"style":348},[5304],{"type":46,"value":5305},"  data-whop-checkout-return-url",{"type":40,"tag":280,"props":5307,"children":5308},{"style":303},[5309],{"type":46,"value":361},{"type":40,"tag":280,"props":5311,"children":5312},{"style":303},[5313],{"type":46,"value":316},{"type":40,"tag":280,"props":5315,"children":5316},{"style":309},[5317],{"type":46,"value":4110},{"type":40,"tag":280,"props":5319,"children":5320},{"style":303},[5321],{"type":46,"value":4563},{"type":40,"tag":280,"props":5323,"children":5324},{"class":282,"line":385},[5325,5329,5334],{"type":40,"tag":280,"props":5326,"children":5327},{"style":303},[5328],{"type":46,"value":5252},{"type":40,"tag":280,"props":5330,"children":5331},{"style":389},[5332],{"type":46,"value":5333},"div",{"type":40,"tag":280,"props":5335,"children":5336},{"style":303},[5337],{"type":46,"value":5261},{"type":40,"tag":49,"props":5339,"children":5340},{},[5341,5343,5349],{"type":46,"value":5342},"See ",{"type":40,"tag":101,"props":5344,"children":5346},{"className":5345},[],[5347],{"type":46,"value":5348},"references\u002Fcheckout-embed.md",{"type":46,"value":5350}," for full prop reference, programmatic controls, and sandbox testing.",{"type":40,"tag":55,"props":5352,"children":5354},{"id":5353},"_7-connected-accounts",[5355],{"type":46,"value":5356},"7. Connected Accounts",{"type":40,"tag":269,"props":5358,"children":5360},{"className":271,"code":5359,"language":273,"meta":274,"style":274},"\u002F\u002F Create\nconst company = await client.companies.create({\n  parent_company_id: \"biz_yourplatform\",\n  email: \"creator@example.com\", title: \"Creator Store\",\n  metadata: { tier: \"free\" },\n});\n\u002F\u002F List (async iterator)\nfor await (const co of await client.companies.list({ parent_company_id: \"biz_yourplatform\" })) {\n  console.log(co.id, co.title);\n}\n\u002F\u002F Update metadata (SDK typing gap — use type cast)\nawait (client.companies as any).update(company.id, { metadata: { tier: \"premium\" } });\n",[5361],{"type":40,"tag":101,"props":5362,"children":5363},{"__ignoreMap":274},[5364,5372,5419,5446,5499,5540,5555,5563,5655,5712,5719,5727],{"type":40,"tag":280,"props":5365,"children":5366},{"class":282,"line":24},[5367],{"type":40,"tag":280,"props":5368,"children":5369},{"style":338},[5370],{"type":46,"value":5371},"\u002F\u002F Create\n",{"type":40,"tag":280,"props":5373,"children":5374},{"class":282,"line":324},[5375,5379,5383,5387,5391,5395,5399,5403,5407,5411,5415],{"type":40,"tag":280,"props":5376,"children":5377},{"style":348},[5378],{"type":46,"value":351},{"type":40,"tag":280,"props":5380,"children":5381},{"style":292},[5382],{"type":46,"value":3802},{"type":40,"tag":280,"props":5384,"children":5385},{"style":303},[5386],{"type":46,"value":361},{"type":40,"tag":280,"props":5388,"children":5389},{"style":286},[5390],{"type":46,"value":970},{"type":40,"tag":280,"props":5392,"children":5393},{"style":292},[5394],{"type":46,"value":975},{"type":40,"tag":280,"props":5396,"children":5397},{"style":303},[5398],{"type":46,"value":407},{"type":40,"tag":280,"props":5400,"children":5401},{"style":292},[5402],{"type":46,"value":1231},{"type":40,"tag":280,"props":5404,"children":5405},{"style":303},[5406],{"type":46,"value":407},{"type":40,"tag":280,"props":5408,"children":5409},{"style":369},[5410],{"type":46,"value":1240},{"type":40,"tag":280,"props":5412,"children":5413},{"style":292},[5414],{"type":46,"value":377},{"type":40,"tag":280,"props":5416,"children":5417},{"style":303},[5418],{"type":46,"value":382},{"type":40,"tag":280,"props":5420,"children":5421},{"class":282,"line":334},[5422,5426,5430,5434,5438,5442],{"type":40,"tag":280,"props":5423,"children":5424},{"style":389},[5425],{"type":46,"value":1256},{"type":40,"tag":280,"props":5427,"children":5428},{"style":303},[5429],{"type":46,"value":397},{"type":40,"tag":280,"props":5431,"children":5432},{"style":303},[5433],{"type":46,"value":306},{"type":40,"tag":280,"props":5435,"children":5436},{"style":309},[5437],{"type":46,"value":1269},{"type":40,"tag":280,"props":5439,"children":5440},{"style":303},[5441],{"type":46,"value":316},{"type":40,"tag":280,"props":5443,"children":5444},{"style":303},[5445],{"type":46,"value":426},{"type":40,"tag":280,"props":5447,"children":5448},{"class":282,"line":344},[5449,5453,5457,5461,5466,5470,5474,5478,5482,5486,5491,5495],{"type":40,"tag":280,"props":5450,"children":5451},{"style":389},[5452],{"type":46,"value":1285},{"type":40,"tag":280,"props":5454,"children":5455},{"style":303},[5456],{"type":46,"value":397},{"type":40,"tag":280,"props":5458,"children":5459},{"style":303},[5460],{"type":46,"value":306},{"type":40,"tag":280,"props":5462,"children":5463},{"style":309},[5464],{"type":46,"value":5465},"creator@example.com",{"type":40,"tag":280,"props":5467,"children":5468},{"style":303},[5469],{"type":46,"value":316},{"type":40,"tag":280,"props":5471,"children":5472},{"style":303},[5473],{"type":46,"value":1003},{"type":40,"tag":280,"props":5475,"children":5476},{"style":389},[5477],{"type":46,"value":2688},{"type":40,"tag":280,"props":5479,"children":5480},{"style":303},[5481],{"type":46,"value":397},{"type":40,"tag":280,"props":5483,"children":5484},{"style":303},[5485],{"type":46,"value":306},{"type":40,"tag":280,"props":5487,"children":5488},{"style":309},[5489],{"type":46,"value":5490},"Creator Store",{"type":40,"tag":280,"props":5492,"children":5493},{"style":303},[5494],{"type":46,"value":316},{"type":40,"tag":280,"props":5496,"children":5497},{"style":303},[5498],{"type":46,"value":426},{"type":40,"tag":280,"props":5500,"children":5501},{"class":282,"line":385},[5502,5506,5510,5514,5519,5523,5527,5532,5536],{"type":40,"tag":280,"props":5503,"children":5504},{"style":389},[5505],{"type":46,"value":1343},{"type":40,"tag":280,"props":5507,"children":5508},{"style":303},[5509],{"type":46,"value":397},{"type":40,"tag":280,"props":5511,"children":5512},{"style":303},[5513],{"type":46,"value":1008},{"type":40,"tag":280,"props":5515,"children":5516},{"style":389},[5517],{"type":46,"value":5518}," tier",{"type":40,"tag":280,"props":5520,"children":5521},{"style":303},[5522],{"type":46,"value":397},{"type":40,"tag":280,"props":5524,"children":5525},{"style":303},[5526],{"type":46,"value":306},{"type":40,"tag":280,"props":5528,"children":5529},{"style":309},[5530],{"type":46,"value":5531},"free",{"type":40,"tag":280,"props":5533,"children":5534},{"style":303},[5535],{"type":46,"value":316},{"type":40,"tag":280,"props":5537,"children":5538},{"style":303},[5539],{"type":46,"value":1378},{"type":40,"tag":280,"props":5541,"children":5542},{"class":282,"line":429},[5543,5547,5551],{"type":40,"tag":280,"props":5544,"children":5545},{"style":303},[5546],{"type":46,"value":444},{"type":40,"tag":280,"props":5548,"children":5549},{"style":292},[5550],{"type":46,"value":449},{"type":40,"tag":280,"props":5552,"children":5553},{"style":303},[5554],{"type":46,"value":321},{"type":40,"tag":280,"props":5556,"children":5557},{"class":282,"line":438},[5558],{"type":40,"tag":280,"props":5559,"children":5560},{"style":338},[5561],{"type":46,"value":5562},"\u002F\u002F List (async iterator)\n",{"type":40,"tag":280,"props":5564,"children":5565},{"class":282,"line":456},[5566,5570,5574,5578,5582,5587,5591,5595,5599,5603,5607,5611,5615,5619,5623,5627,5631,5635,5639,5643,5647,5651],{"type":40,"tag":280,"props":5567,"children":5568},{"style":286},[5569],{"type":46,"value":3634},{"type":40,"tag":280,"props":5571,"children":5572},{"style":286},[5573],{"type":46,"value":970},{"type":40,"tag":280,"props":5575,"children":5576},{"style":292},[5577],{"type":46,"value":3643},{"type":40,"tag":280,"props":5579,"children":5580},{"style":348},[5581],{"type":46,"value":351},{"type":40,"tag":280,"props":5583,"children":5584},{"style":292},[5585],{"type":46,"value":5586}," co ",{"type":40,"tag":280,"props":5588,"children":5589},{"style":303},[5590],{"type":46,"value":3656},{"type":40,"tag":280,"props":5592,"children":5593},{"style":286},[5594],{"type":46,"value":970},{"type":40,"tag":280,"props":5596,"children":5597},{"style":292},[5598],{"type":46,"value":975},{"type":40,"tag":280,"props":5600,"children":5601},{"style":303},[5602],{"type":46,"value":407},{"type":40,"tag":280,"props":5604,"children":5605},{"style":292},[5606],{"type":46,"value":1231},{"type":40,"tag":280,"props":5608,"children":5609},{"style":303},[5610],{"type":46,"value":407},{"type":40,"tag":280,"props":5612,"children":5613},{"style":369},[5614],{"type":46,"value":2758},{"type":40,"tag":280,"props":5616,"children":5617},{"style":292},[5618],{"type":46,"value":377},{"type":40,"tag":280,"props":5620,"children":5621},{"style":303},[5622],{"type":46,"value":2518},{"type":40,"tag":280,"props":5624,"children":5625},{"style":389},[5626],{"type":46,"value":3843},{"type":40,"tag":280,"props":5628,"children":5629},{"style":303},[5630],{"type":46,"value":397},{"type":40,"tag":280,"props":5632,"children":5633},{"style":303},[5634],{"type":46,"value":306},{"type":40,"tag":280,"props":5636,"children":5637},{"style":309},[5638],{"type":46,"value":1269},{"type":40,"tag":280,"props":5640,"children":5641},{"style":303},[5642],{"type":46,"value":316},{"type":40,"tag":280,"props":5644,"children":5645},{"style":303},[5646],{"type":46,"value":2571},{"type":40,"tag":280,"props":5648,"children":5649},{"style":292},[5650],{"type":46,"value":3717},{"type":40,"tag":280,"props":5652,"children":5653},{"style":303},[5654],{"type":46,"value":382},{"type":40,"tag":280,"props":5656,"children":5657},{"class":282,"line":464},[5658,5662,5666,5670,5674,5679,5683,5687,5691,5696,5700,5704,5708],{"type":40,"tag":280,"props":5659,"children":5660},{"style":292},[5661],{"type":46,"value":3729},{"type":40,"tag":280,"props":5663,"children":5664},{"style":303},[5665],{"type":46,"value":407},{"type":40,"tag":280,"props":5667,"children":5668},{"style":369},[5669],{"type":46,"value":3576},{"type":40,"tag":280,"props":5671,"children":5672},{"style":389},[5673],{"type":46,"value":377},{"type":40,"tag":280,"props":5675,"children":5676},{"style":292},[5677],{"type":46,"value":5678},"co",{"type":40,"tag":280,"props":5680,"children":5681},{"style":303},[5682],{"type":46,"value":407},{"type":40,"tag":280,"props":5684,"children":5685},{"style":292},[5686],{"type":46,"value":1475},{"type":40,"tag":280,"props":5688,"children":5689},{"style":303},[5690],{"type":46,"value":1003},{"type":40,"tag":280,"props":5692,"children":5693},{"style":292},[5694],{"type":46,"value":5695}," co",{"type":40,"tag":280,"props":5697,"children":5698},{"style":303},[5699],{"type":46,"value":407},{"type":40,"tag":280,"props":5701,"children":5702},{"style":292},[5703],{"type":46,"value":3755},{"type":40,"tag":280,"props":5705,"children":5706},{"style":389},[5707],{"type":46,"value":449},{"type":40,"tag":280,"props":5709,"children":5710},{"style":303},[5711],{"type":46,"value":321},{"type":40,"tag":280,"props":5713,"children":5714},{"class":282,"line":473},[5715],{"type":40,"tag":280,"props":5716,"children":5717},{"style":303},[5718],{"type":46,"value":3771},{"type":40,"tag":280,"props":5720,"children":5721},{"class":282,"line":506},[5722],{"type":40,"tag":280,"props":5723,"children":5724},{"style":338},[5725],{"type":46,"value":5726},"\u002F\u002F Update metadata (SDK typing gap — use type cast)\n",{"type":40,"tag":280,"props":5728,"children":5729},{"class":282,"line":542},[5730,5734,5739,5743,5748,5753,5758,5762,5766,5770,5775,5779,5783,5787,5791,5796,5800,5804,5808,5812,5816,5821,5825,5829,5833,5837],{"type":40,"tag":280,"props":5731,"children":5732},{"style":286},[5733],{"type":46,"value":2641},{"type":40,"tag":280,"props":5735,"children":5736},{"style":292},[5737],{"type":46,"value":5738}," (client",{"type":40,"tag":280,"props":5740,"children":5741},{"style":303},[5742],{"type":46,"value":407},{"type":40,"tag":280,"props":5744,"children":5745},{"style":292},[5746],{"type":46,"value":5747},"companies ",{"type":40,"tag":280,"props":5749,"children":5750},{"style":286},[5751],{"type":46,"value":5752},"as",{"type":40,"tag":280,"props":5754,"children":5755},{"style":4505},[5756],{"type":46,"value":5757}," any",{"type":40,"tag":280,"props":5759,"children":5760},{"style":292},[5761],{"type":46,"value":449},{"type":40,"tag":280,"props":5763,"children":5764},{"style":303},[5765],{"type":46,"value":407},{"type":40,"tag":280,"props":5767,"children":5768},{"style":369},[5769],{"type":46,"value":2662},{"type":40,"tag":280,"props":5771,"children":5772},{"style":292},[5773],{"type":46,"value":5774},"(company",{"type":40,"tag":280,"props":5776,"children":5777},{"style":303},[5778],{"type":46,"value":407},{"type":40,"tag":280,"props":5780,"children":5781},{"style":292},[5782],{"type":46,"value":1475},{"type":40,"tag":280,"props":5784,"children":5785},{"style":303},[5786],{"type":46,"value":1003},{"type":40,"tag":280,"props":5788,"children":5789},{"style":303},[5790],{"type":46,"value":1008},{"type":40,"tag":280,"props":5792,"children":5793},{"style":389},[5794],{"type":46,"value":5795}," metadata",{"type":40,"tag":280,"props":5797,"children":5798},{"style":303},[5799],{"type":46,"value":397},{"type":40,"tag":280,"props":5801,"children":5802},{"style":303},[5803],{"type":46,"value":1008},{"type":40,"tag":280,"props":5805,"children":5806},{"style":389},[5807],{"type":46,"value":5518},{"type":40,"tag":280,"props":5809,"children":5810},{"style":303},[5811],{"type":46,"value":397},{"type":40,"tag":280,"props":5813,"children":5814},{"style":303},[5815],{"type":46,"value":306},{"type":40,"tag":280,"props":5817,"children":5818},{"style":309},[5819],{"type":46,"value":5820},"premium",{"type":40,"tag":280,"props":5822,"children":5823},{"style":303},[5824],{"type":46,"value":316},{"type":40,"tag":280,"props":5826,"children":5827},{"style":303},[5828],{"type":46,"value":2571},{"type":40,"tag":280,"props":5830,"children":5831},{"style":303},[5832],{"type":46,"value":2571},{"type":40,"tag":280,"props":5834,"children":5835},{"style":292},[5836],{"type":46,"value":449},{"type":40,"tag":280,"props":5838,"children":5839},{"style":303},[5840],{"type":46,"value":321},{"type":40,"tag":743,"props":5842,"children":5844},{"id":5843},"account-onboarding-kyc",[5845],{"type":46,"value":5846},"Account Onboarding & KYC",{"type":40,"tag":269,"props":5848,"children":5850},{"className":271,"code":5849,"language":273,"meta":274,"style":274},"\u002F\u002F use_case: \"hosted_kyc\" | \"hosted_payouts\" | \"account_onboarding\"\nconst link = await client.accountLinks.create({\n  company_id: \"biz_xxx\", use_case: \"hosted_kyc\",\n  return_url: \"https:\u002F\u002Fyourplatform.com\u002Fdashboard\",\n  refresh_url: \"https:\u002F\u002Fyourplatform.com\u002Frefresh\",\n});\n\u002F\u002F Redirect to link.url\n",[5851],{"type":40,"tag":101,"props":5852,"children":5853},{"__ignoreMap":274},[5854,5862,5911,5964,5993,6022,6037],{"type":40,"tag":280,"props":5855,"children":5856},{"class":282,"line":24},[5857],{"type":40,"tag":280,"props":5858,"children":5859},{"style":338},[5860],{"type":46,"value":5861},"\u002F\u002F use_case: \"hosted_kyc\" | \"hosted_payouts\" | \"account_onboarding\"\n",{"type":40,"tag":280,"props":5863,"children":5864},{"class":282,"line":324},[5865,5869,5874,5878,5882,5886,5890,5895,5899,5903,5907],{"type":40,"tag":280,"props":5866,"children":5867},{"style":348},[5868],{"type":46,"value":351},{"type":40,"tag":280,"props":5870,"children":5871},{"style":292},[5872],{"type":46,"value":5873}," link ",{"type":40,"tag":280,"props":5875,"children":5876},{"style":303},[5877],{"type":46,"value":361},{"type":40,"tag":280,"props":5879,"children":5880},{"style":286},[5881],{"type":46,"value":970},{"type":40,"tag":280,"props":5883,"children":5884},{"style":292},[5885],{"type":46,"value":975},{"type":40,"tag":280,"props":5887,"children":5888},{"style":303},[5889],{"type":46,"value":407},{"type":40,"tag":280,"props":5891,"children":5892},{"style":292},[5893],{"type":46,"value":5894},"accountLinks",{"type":40,"tag":280,"props":5896,"children":5897},{"style":303},[5898],{"type":46,"value":407},{"type":40,"tag":280,"props":5900,"children":5901},{"style":369},[5902],{"type":46,"value":1240},{"type":40,"tag":280,"props":5904,"children":5905},{"style":292},[5906],{"type":46,"value":377},{"type":40,"tag":280,"props":5908,"children":5909},{"style":303},[5910],{"type":46,"value":382},{"type":40,"tag":280,"props":5912,"children":5913},{"class":282,"line":334},[5914,5918,5922,5926,5930,5934,5938,5943,5947,5951,5956,5960],{"type":40,"tag":280,"props":5915,"children":5916},{"style":389},[5917],{"type":46,"value":1457},{"type":40,"tag":280,"props":5919,"children":5920},{"style":303},[5921],{"type":46,"value":397},{"type":40,"tag":280,"props":5923,"children":5924},{"style":303},[5925],{"type":46,"value":306},{"type":40,"tag":280,"props":5927,"children":5928},{"style":309},[5929],{"type":46,"value":2447},{"type":40,"tag":280,"props":5931,"children":5932},{"style":303},[5933],{"type":46,"value":316},{"type":40,"tag":280,"props":5935,"children":5936},{"style":303},[5937],{"type":46,"value":1003},{"type":40,"tag":280,"props":5939,"children":5940},{"style":389},[5941],{"type":46,"value":5942}," use_case",{"type":40,"tag":280,"props":5944,"children":5945},{"style":303},[5946],{"type":46,"value":397},{"type":40,"tag":280,"props":5948,"children":5949},{"style":303},[5950],{"type":46,"value":306},{"type":40,"tag":280,"props":5952,"children":5953},{"style":309},[5954],{"type":46,"value":5955},"hosted_kyc",{"type":40,"tag":280,"props":5957,"children":5958},{"style":303},[5959],{"type":46,"value":316},{"type":40,"tag":280,"props":5961,"children":5962},{"style":303},[5963],{"type":46,"value":426},{"type":40,"tag":280,"props":5965,"children":5966},{"class":282,"line":344},[5967,5972,5976,5980,5985,5989],{"type":40,"tag":280,"props":5968,"children":5969},{"style":389},[5970],{"type":46,"value":5971},"  return_url",{"type":40,"tag":280,"props":5973,"children":5974},{"style":303},[5975],{"type":46,"value":397},{"type":40,"tag":280,"props":5977,"children":5978},{"style":303},[5979],{"type":46,"value":306},{"type":40,"tag":280,"props":5981,"children":5982},{"style":309},[5983],{"type":46,"value":5984},"https:\u002F\u002Fyourplatform.com\u002Fdashboard",{"type":40,"tag":280,"props":5986,"children":5987},{"style":303},[5988],{"type":46,"value":316},{"type":40,"tag":280,"props":5990,"children":5991},{"style":303},[5992],{"type":46,"value":426},{"type":40,"tag":280,"props":5994,"children":5995},{"class":282,"line":385},[5996,6001,6005,6009,6014,6018],{"type":40,"tag":280,"props":5997,"children":5998},{"style":389},[5999],{"type":46,"value":6000},"  refresh_url",{"type":40,"tag":280,"props":6002,"children":6003},{"style":303},[6004],{"type":46,"value":397},{"type":40,"tag":280,"props":6006,"children":6007},{"style":303},[6008],{"type":46,"value":306},{"type":40,"tag":280,"props":6010,"children":6011},{"style":309},[6012],{"type":46,"value":6013},"https:\u002F\u002Fyourplatform.com\u002Frefresh",{"type":40,"tag":280,"props":6015,"children":6016},{"style":303},[6017],{"type":46,"value":316},{"type":40,"tag":280,"props":6019,"children":6020},{"style":303},[6021],{"type":46,"value":426},{"type":40,"tag":280,"props":6023,"children":6024},{"class":282,"line":429},[6025,6029,6033],{"type":40,"tag":280,"props":6026,"children":6027},{"style":303},[6028],{"type":46,"value":444},{"type":40,"tag":280,"props":6030,"children":6031},{"style":292},[6032],{"type":46,"value":449},{"type":40,"tag":280,"props":6034,"children":6035},{"style":303},[6036],{"type":46,"value":321},{"type":40,"tag":280,"props":6038,"children":6039},{"class":282,"line":438},[6040],{"type":40,"tag":280,"props":6041,"children":6042},{"style":338},[6043],{"type":46,"value":6044},"\u002F\u002F Redirect to link.url\n",{"type":40,"tag":743,"props":6046,"children":6048},{"id":6047},"ledger-verification-await-clientledgeraccountsretrievebiz_xxx-returns-balances-kyc-status-payments_approval_status",[6049,6051,6057],{"type":46,"value":6050},"Ledger & Verification: ",{"type":40,"tag":101,"props":6052,"children":6054},{"className":6053},[],[6055],{"type":46,"value":6056},"await client.ledgerAccounts.retrieve(\"biz_xxx\")",{"type":46,"value":6058}," — returns balances, KYC status, payments_approval_status.",{"type":40,"tag":55,"props":6060,"children":6062},{"id":6061},"_8-payouts",[6063],{"type":46,"value":6064},"8. Payouts",{"type":40,"tag":743,"props":6066,"children":6068},{"id":6067},"funding-your-platform-balance-top-ups",[6069],{"type":46,"value":6070},"Funding Your Platform Balance (Top-ups)",{"type":40,"tag":49,"props":6072,"children":6073},{},[6074,6076],{"type":46,"value":6075},"Before you can send transfers to connected accounts, your platform needs a positive balance. Use the Top-ups API to add funds by charging a saved payment method. ",{"type":40,"tag":783,"props":6077,"children":6078},{},[6079],{"type":46,"value":6080},"Top-ups have no fees.",{"type":40,"tag":269,"props":6082,"children":6084},{"className":271,"code":6083,"language":273,"meta":274,"style":274},"\u002F\u002F 1. First, save a payment method via the Whop Dashboard (Settings > Payment Methods)\n\u002F\u002F 2. Then top up programmatically:\nconst topup = await client.topups.create({\n  company_id: \"biz_your_platform\",\n  amount: 50000, \u002F\u002F $500.00 in cents\n  currency: \"usd\",\n  payment_method_id: \"pm_saved_method_id\",\n});\n\u002F\u002F Listen for payment.succeeded webhook to confirm\n",[6085],{"type":40,"tag":101,"props":6086,"children":6087},{"__ignoreMap":274},[6088,6096,6104,6153,6181,6206,6233,6262,6277],{"type":40,"tag":280,"props":6089,"children":6090},{"class":282,"line":24},[6091],{"type":40,"tag":280,"props":6092,"children":6093},{"style":338},[6094],{"type":46,"value":6095},"\u002F\u002F 1. First, save a payment method via the Whop Dashboard (Settings > Payment Methods)\n",{"type":40,"tag":280,"props":6097,"children":6098},{"class":282,"line":324},[6099],{"type":40,"tag":280,"props":6100,"children":6101},{"style":338},[6102],{"type":46,"value":6103},"\u002F\u002F 2. Then top up programmatically:\n",{"type":40,"tag":280,"props":6105,"children":6106},{"class":282,"line":334},[6107,6111,6116,6120,6124,6128,6132,6137,6141,6145,6149],{"type":40,"tag":280,"props":6108,"children":6109},{"style":348},[6110],{"type":46,"value":351},{"type":40,"tag":280,"props":6112,"children":6113},{"style":292},[6114],{"type":46,"value":6115}," topup ",{"type":40,"tag":280,"props":6117,"children":6118},{"style":303},[6119],{"type":46,"value":361},{"type":40,"tag":280,"props":6121,"children":6122},{"style":286},[6123],{"type":46,"value":970},{"type":40,"tag":280,"props":6125,"children":6126},{"style":292},[6127],{"type":46,"value":975},{"type":40,"tag":280,"props":6129,"children":6130},{"style":303},[6131],{"type":46,"value":407},{"type":40,"tag":280,"props":6133,"children":6134},{"style":292},[6135],{"type":46,"value":6136},"topups",{"type":40,"tag":280,"props":6138,"children":6139},{"style":303},[6140],{"type":46,"value":407},{"type":40,"tag":280,"props":6142,"children":6143},{"style":369},[6144],{"type":46,"value":1240},{"type":40,"tag":280,"props":6146,"children":6147},{"style":292},[6148],{"type":46,"value":377},{"type":40,"tag":280,"props":6150,"children":6151},{"style":303},[6152],{"type":46,"value":382},{"type":40,"tag":280,"props":6154,"children":6155},{"class":282,"line":344},[6156,6160,6164,6168,6173,6177],{"type":40,"tag":280,"props":6157,"children":6158},{"style":389},[6159],{"type":46,"value":1457},{"type":40,"tag":280,"props":6161,"children":6162},{"style":303},[6163],{"type":46,"value":397},{"type":40,"tag":280,"props":6165,"children":6166},{"style":303},[6167],{"type":46,"value":306},{"type":40,"tag":280,"props":6169,"children":6170},{"style":309},[6171],{"type":46,"value":6172},"biz_your_platform",{"type":40,"tag":280,"props":6174,"children":6175},{"style":303},[6176],{"type":46,"value":316},{"type":40,"tag":280,"props":6178,"children":6179},{"style":303},[6180],{"type":46,"value":426},{"type":40,"tag":280,"props":6182,"children":6183},{"class":282,"line":385},[6184,6188,6192,6197,6201],{"type":40,"tag":280,"props":6185,"children":6186},{"style":389},[6187],{"type":46,"value":2110},{"type":40,"tag":280,"props":6189,"children":6190},{"style":303},[6191],{"type":46,"value":397},{"type":40,"tag":280,"props":6193,"children":6194},{"style":1624},[6195],{"type":46,"value":6196}," 50000",{"type":40,"tag":280,"props":6198,"children":6199},{"style":303},[6200],{"type":46,"value":1003},{"type":40,"tag":280,"props":6202,"children":6203},{"style":338},[6204],{"type":46,"value":6205}," \u002F\u002F $500.00 in cents\n",{"type":40,"tag":280,"props":6207,"children":6208},{"class":282,"line":429},[6209,6213,6217,6221,6225,6229],{"type":40,"tag":280,"props":6210,"children":6211},{"style":389},[6212],{"type":46,"value":2986},{"type":40,"tag":280,"props":6214,"children":6215},{"style":303},[6216],{"type":46,"value":397},{"type":40,"tag":280,"props":6218,"children":6219},{"style":303},[6220],{"type":46,"value":306},{"type":40,"tag":280,"props":6222,"children":6223},{"style":309},[6224],{"type":46,"value":1675},{"type":40,"tag":280,"props":6226,"children":6227},{"style":303},[6228],{"type":46,"value":316},{"type":40,"tag":280,"props":6230,"children":6231},{"style":303},[6232],{"type":46,"value":426},{"type":40,"tag":280,"props":6234,"children":6235},{"class":282,"line":438},[6236,6241,6245,6249,6254,6258],{"type":40,"tag":280,"props":6237,"children":6238},{"style":389},[6239],{"type":46,"value":6240},"  payment_method_id",{"type":40,"tag":280,"props":6242,"children":6243},{"style":303},[6244],{"type":46,"value":397},{"type":40,"tag":280,"props":6246,"children":6247},{"style":303},[6248],{"type":46,"value":306},{"type":40,"tag":280,"props":6250,"children":6251},{"style":309},[6252],{"type":46,"value":6253},"pm_saved_method_id",{"type":40,"tag":280,"props":6255,"children":6256},{"style":303},[6257],{"type":46,"value":316},{"type":40,"tag":280,"props":6259,"children":6260},{"style":303},[6261],{"type":46,"value":426},{"type":40,"tag":280,"props":6263,"children":6264},{"class":282,"line":456},[6265,6269,6273],{"type":40,"tag":280,"props":6266,"children":6267},{"style":303},[6268],{"type":46,"value":444},{"type":40,"tag":280,"props":6270,"children":6271},{"style":292},[6272],{"type":46,"value":449},{"type":40,"tag":280,"props":6274,"children":6275},{"style":303},[6276],{"type":46,"value":321},{"type":40,"tag":280,"props":6278,"children":6279},{"class":282,"line":464},[6280],{"type":40,"tag":280,"props":6281,"children":6282},{"style":338},[6283],{"type":46,"value":6284},"\u002F\u002F Listen for payment.succeeded webhook to confirm\n",{"type":40,"tag":49,"props":6286,"children":6287},{},[6288],{"type":40,"tag":783,"props":6289,"children":6290},{},[6291],{"type":46,"value":6292},"Three ways money enters a platform:",{"type":40,"tag":6294,"props":6295,"children":6296},"ol",{},[6297,6308,6325],{"type":40,"tag":6298,"props":6299,"children":6300},"li",{},[6301,6306],{"type":40,"tag":783,"props":6302,"children":6303},{},[6304],{"type":46,"value":6305},"Top-ups",{"type":46,"value":6307}," — charge a saved payment method (ACH, card). Best for platforms that collect funds externally (wire, invoice) and need to fund their Whop balance for payouts.",{"type":40,"tag":6298,"props":6309,"children":6310},{},[6311,6316,6318,6323],{"type":40,"tag":783,"props":6312,"children":6313},{},[6314],{"type":46,"value":6315},"Direct charges",{"type":46,"value":6317}," — customers pay connected accounts directly, platform takes an ",{"type":40,"tag":101,"props":6319,"children":6321},{"className":6320},[],[6322],{"type":46,"value":1189},{"type":46,"value":6324},". Money flows through checkout.",{"type":40,"tag":6298,"props":6326,"children":6327},{},[6328,6333,6335,6341],{"type":40,"tag":783,"props":6329,"children":6330},{},[6331],{"type":46,"value":6332},"Transfers model",{"type":46,"value":6334}," — customers pay the platform via checkout, platform distributes to connected accounts via ",{"type":40,"tag":101,"props":6336,"children":6338},{"className":6337},[],[6339],{"type":46,"value":6340},"transfers.create()",{"type":46,"value":407},{"type":40,"tag":49,"props":6343,"children":6344},{},[6345,6346,6355],{"type":46,"value":5342},{"type":40,"tag":6347,"props":6348,"children":6352},"a",{"href":6349,"rel":6350},"https:\u002F\u002Fdocs.whop.com\u002Fdeveloper\u002Fplatforms\u002Fadd-funds-to-your-balance",[6351],"nofollow",[6353],{"type":46,"value":6354},"Add funds to your balance",{"type":46,"value":6356}," for full guide.",{"type":40,"tag":743,"props":6358,"children":6360},{"id":6359},"embedded-payout-components-react",[6361],{"type":46,"value":6362},"Embedded Payout Components (React)",{"type":40,"tag":269,"props":6364,"children":6366},{"className":4439,"code":6365,"language":4441,"meta":274,"style":274},"import { PayoutsSession, VerifyElement, AddPayoutMethodElement } from \"@whop\u002Fembedded-components-react-js\";\nimport { loadWhopElements } from \"@whop\u002Fembedded-components-vanilla-js\";\n\nconst elements = loadWhopElements({ environment: \"production\" }); \u002F\u002F or \"sandbox\"\n\u002F\u002F Server: const token = await client.accessTokens.create({ company_id: \"biz_vendor\" });\n\nfunction VendorPayouts({ token, companyId }: { token: string; companyId: string }) {\n  return (\n    \u003CPayoutsSession token={token} companyId={companyId} redirectUrl=\"\u002Fdashboard\">\n      \u003CVerifyElement \u002F>\n      \u003CAddPayoutMethodElement \u002F>\n      {\u002F* Also: BalanceElement, WithdrawElement, PayoutMethodsElement *\u002F}\n    \u003C\u002FPayoutsSession>\n  );\n}\n",[6367],{"type":40,"tag":101,"props":6368,"children":6369},{"__ignoreMap":274},[6370,6428,6468,6475,6541,6549,6556,6635,6648,6722,6740,6756,6773,6789,6801],{"type":40,"tag":280,"props":6371,"children":6372},{"class":282,"line":24},[6373,6377,6381,6386,6390,6395,6399,6404,6408,6412,6416,6420,6424],{"type":40,"tag":280,"props":6374,"children":6375},{"style":286},[6376],{"type":46,"value":289},{"type":40,"tag":280,"props":6378,"children":6379},{"style":303},[6380],{"type":46,"value":1008},{"type":40,"tag":280,"props":6382,"children":6383},{"style":292},[6384],{"type":46,"value":6385}," PayoutsSession",{"type":40,"tag":280,"props":6387,"children":6388},{"style":303},[6389],{"type":46,"value":1003},{"type":40,"tag":280,"props":6391,"children":6392},{"style":292},[6393],{"type":46,"value":6394}," VerifyElement",{"type":40,"tag":280,"props":6396,"children":6397},{"style":303},[6398],{"type":46,"value":1003},{"type":40,"tag":280,"props":6400,"children":6401},{"style":292},[6402],{"type":46,"value":6403}," AddPayoutMethodElement",{"type":40,"tag":280,"props":6405,"children":6406},{"style":303},[6407],{"type":46,"value":2571},{"type":40,"tag":280,"props":6409,"children":6410},{"style":286},[6411],{"type":46,"value":4470},{"type":40,"tag":280,"props":6413,"children":6414},{"style":303},[6415],{"type":46,"value":306},{"type":40,"tag":280,"props":6417,"children":6418},{"style":309},[6419],{"type":46,"value":210},{"type":40,"tag":280,"props":6421,"children":6422},{"style":303},[6423],{"type":46,"value":316},{"type":40,"tag":280,"props":6425,"children":6426},{"style":303},[6427],{"type":46,"value":321},{"type":40,"tag":280,"props":6429,"children":6430},{"class":282,"line":324},[6431,6435,6439,6444,6448,6452,6456,6460,6464],{"type":40,"tag":280,"props":6432,"children":6433},{"style":286},[6434],{"type":46,"value":289},{"type":40,"tag":280,"props":6436,"children":6437},{"style":303},[6438],{"type":46,"value":1008},{"type":40,"tag":280,"props":6440,"children":6441},{"style":292},[6442],{"type":46,"value":6443}," loadWhopElements",{"type":40,"tag":280,"props":6445,"children":6446},{"style":303},[6447],{"type":46,"value":2571},{"type":40,"tag":280,"props":6449,"children":6450},{"style":286},[6451],{"type":46,"value":4470},{"type":40,"tag":280,"props":6453,"children":6454},{"style":303},[6455],{"type":46,"value":306},{"type":40,"tag":280,"props":6457,"children":6458},{"style":309},[6459],{"type":46,"value":236},{"type":40,"tag":280,"props":6461,"children":6462},{"style":303},[6463],{"type":46,"value":316},{"type":40,"tag":280,"props":6465,"children":6466},{"style":303},[6467],{"type":46,"value":321},{"type":40,"tag":280,"props":6469,"children":6470},{"class":282,"line":334},[6471],{"type":40,"tag":280,"props":6472,"children":6473},{"emptyLinePlaceholder":328},[6474],{"type":46,"value":331},{"type":40,"tag":280,"props":6476,"children":6477},{"class":282,"line":344},[6478,6482,6487,6491,6495,6499,6503,6508,6512,6516,6520,6524,6528,6532,6536],{"type":40,"tag":280,"props":6479,"children":6480},{"style":348},[6481],{"type":46,"value":351},{"type":40,"tag":280,"props":6483,"children":6484},{"style":292},[6485],{"type":46,"value":6486}," elements ",{"type":40,"tag":280,"props":6488,"children":6489},{"style":303},[6490],{"type":46,"value":361},{"type":40,"tag":280,"props":6492,"children":6493},{"style":369},[6494],{"type":46,"value":6443},{"type":40,"tag":280,"props":6496,"children":6497},{"style":292},[6498],{"type":46,"value":377},{"type":40,"tag":280,"props":6500,"children":6501},{"style":303},[6502],{"type":46,"value":2518},{"type":40,"tag":280,"props":6504,"children":6505},{"style":389},[6506],{"type":46,"value":6507}," environment",{"type":40,"tag":280,"props":6509,"children":6510},{"style":303},[6511],{"type":46,"value":397},{"type":40,"tag":280,"props":6513,"children":6514},{"style":303},[6515],{"type":46,"value":306},{"type":40,"tag":280,"props":6517,"children":6518},{"style":309},[6519],{"type":46,"value":4584},{"type":40,"tag":280,"props":6521,"children":6522},{"style":303},[6523],{"type":46,"value":316},{"type":40,"tag":280,"props":6525,"children":6526},{"style":303},[6527],{"type":46,"value":2571},{"type":40,"tag":280,"props":6529,"children":6530},{"style":292},[6531],{"type":46,"value":449},{"type":40,"tag":280,"props":6533,"children":6534},{"style":303},[6535],{"type":46,"value":3595},{"type":40,"tag":280,"props":6537,"children":6538},{"style":338},[6539],{"type":46,"value":6540}," \u002F\u002F or \"sandbox\"\n",{"type":40,"tag":280,"props":6542,"children":6543},{"class":282,"line":385},[6544],{"type":40,"tag":280,"props":6545,"children":6546},{"style":338},[6547],{"type":46,"value":6548},"\u002F\u002F Server: const token = await client.accessTokens.create({ company_id: \"biz_vendor\" });\n",{"type":40,"tag":280,"props":6550,"children":6551},{"class":282,"line":429},[6552],{"type":40,"tag":280,"props":6553,"children":6554},{"emptyLinePlaceholder":328},[6555],{"type":46,"value":331},{"type":40,"tag":280,"props":6557,"children":6558},{"class":282,"line":438},[6559,6564,6569,6574,6579,6583,6588,6593,6597,6601,6605,6610,6614,6618,6622,6626,6631],{"type":40,"tag":280,"props":6560,"children":6561},{"style":348},[6562],{"type":46,"value":6563},"function",{"type":40,"tag":280,"props":6565,"children":6566},{"style":369},[6567],{"type":46,"value":6568}," VendorPayouts",{"type":40,"tag":280,"props":6570,"children":6571},{"style":303},[6572],{"type":46,"value":6573},"({",{"type":40,"tag":280,"props":6575,"children":6576},{"style":4668},[6577],{"type":46,"value":6578}," token",{"type":40,"tag":280,"props":6580,"children":6581},{"style":303},[6582],{"type":46,"value":1003},{"type":40,"tag":280,"props":6584,"children":6585},{"style":4668},[6586],{"type":46,"value":6587}," companyId",{"type":40,"tag":280,"props":6589,"children":6590},{"style":303},[6591],{"type":46,"value":6592}," }:",{"type":40,"tag":280,"props":6594,"children":6595},{"style":303},[6596],{"type":46,"value":1008},{"type":40,"tag":280,"props":6598,"children":6599},{"style":389},[6600],{"type":46,"value":6578},{"type":40,"tag":280,"props":6602,"children":6603},{"style":303},[6604],{"type":46,"value":397},{"type":40,"tag":280,"props":6606,"children":6607},{"style":4505},[6608],{"type":46,"value":6609}," string",{"type":40,"tag":280,"props":6611,"children":6612},{"style":303},[6613],{"type":46,"value":3595},{"type":40,"tag":280,"props":6615,"children":6616},{"style":389},[6617],{"type":46,"value":6587},{"type":40,"tag":280,"props":6619,"children":6620},{"style":303},[6621],{"type":46,"value":397},{"type":40,"tag":280,"props":6623,"children":6624},{"style":4505},[6625],{"type":46,"value":6609},{"type":40,"tag":280,"props":6627,"children":6628},{"style":303},[6629],{"type":46,"value":6630}," })",{"type":40,"tag":280,"props":6632,"children":6633},{"style":303},[6634],{"type":46,"value":1554},{"type":40,"tag":280,"props":6636,"children":6637},{"class":282,"line":456},[6638,6643],{"type":40,"tag":280,"props":6639,"children":6640},{"style":286},[6641],{"type":46,"value":6642},"  return",{"type":40,"tag":280,"props":6644,"children":6645},{"style":389},[6646],{"type":46,"value":6647}," (\n",{"type":40,"tag":280,"props":6649,"children":6650},{"class":282,"line":464},[6651,6656,6661,6665,6669,6674,6679,6684,6688,6692,6696,6701,6705,6709,6714,6718],{"type":40,"tag":280,"props":6652,"children":6653},{"style":303},[6654],{"type":46,"value":6655},"    \u003C",{"type":40,"tag":280,"props":6657,"children":6658},{"style":4505},[6659],{"type":46,"value":6660},"PayoutsSession",{"type":40,"tag":280,"props":6662,"children":6663},{"style":348},[6664],{"type":46,"value":6578},{"type":40,"tag":280,"props":6666,"children":6667},{"style":303},[6668],{"type":46,"value":4521},{"type":40,"tag":280,"props":6670,"children":6671},{"style":292},[6672],{"type":46,"value":6673},"token",{"type":40,"tag":280,"props":6675,"children":6676},{"style":303},[6677],{"type":46,"value":6678},"} ",{"type":40,"tag":280,"props":6680,"children":6681},{"style":348},[6682],{"type":46,"value":6683},"companyId",{"type":40,"tag":280,"props":6685,"children":6686},{"style":303},[6687],{"type":46,"value":4521},{"type":40,"tag":280,"props":6689,"children":6690},{"style":292},[6691],{"type":46,"value":6683},{"type":40,"tag":280,"props":6693,"children":6694},{"style":303},[6695],{"type":46,"value":6678},{"type":40,"tag":280,"props":6697,"children":6698},{"style":348},[6699],{"type":46,"value":6700},"redirectUrl",{"type":40,"tag":280,"props":6702,"children":6703},{"style":303},[6704],{"type":46,"value":361},{"type":40,"tag":280,"props":6706,"children":6707},{"style":303},[6708],{"type":46,"value":316},{"type":40,"tag":280,"props":6710,"children":6711},{"style":309},[6712],{"type":46,"value":6713},"\u002Fdashboard",{"type":40,"tag":280,"props":6715,"children":6716},{"style":303},[6717],{"type":46,"value":316},{"type":40,"tag":280,"props":6719,"children":6720},{"style":303},[6721],{"type":46,"value":5261},{"type":40,"tag":280,"props":6723,"children":6724},{"class":282,"line":473},[6725,6730,6735],{"type":40,"tag":280,"props":6726,"children":6727},{"style":303},[6728],{"type":46,"value":6729},"      \u003C",{"type":40,"tag":280,"props":6731,"children":6732},{"style":4505},[6733],{"type":46,"value":6734},"VerifyElement",{"type":40,"tag":280,"props":6736,"children":6737},{"style":303},[6738],{"type":46,"value":6739}," \u002F>\n",{"type":40,"tag":280,"props":6741,"children":6742},{"class":282,"line":506},[6743,6747,6752],{"type":40,"tag":280,"props":6744,"children":6745},{"style":303},[6746],{"type":46,"value":6729},{"type":40,"tag":280,"props":6748,"children":6749},{"style":4505},[6750],{"type":46,"value":6751},"AddPayoutMethodElement",{"type":40,"tag":280,"props":6753,"children":6754},{"style":303},[6755],{"type":46,"value":6739},{"type":40,"tag":280,"props":6757,"children":6758},{"class":282,"line":542},[6759,6764,6769],{"type":40,"tag":280,"props":6760,"children":6761},{"style":303},[6762],{"type":46,"value":6763},"      {",{"type":40,"tag":280,"props":6765,"children":6766},{"style":338},[6767],{"type":46,"value":6768},"\u002F* Also: BalanceElement, WithdrawElement, PayoutMethodsElement *\u002F",{"type":40,"tag":280,"props":6770,"children":6771},{"style":303},[6772],{"type":46,"value":3771},{"type":40,"tag":280,"props":6774,"children":6775},{"class":282,"line":572},[6776,6781,6785],{"type":40,"tag":280,"props":6777,"children":6778},{"style":303},[6779],{"type":46,"value":6780},"    \u003C\u002F",{"type":40,"tag":280,"props":6782,"children":6783},{"style":4505},[6784],{"type":46,"value":6660},{"type":40,"tag":280,"props":6786,"children":6787},{"style":303},[6788],{"type":46,"value":5261},{"type":40,"tag":280,"props":6790,"children":6791},{"class":282,"line":1611},[6792,6797],{"type":40,"tag":280,"props":6793,"children":6794},{"style":389},[6795],{"type":46,"value":6796},"  )",{"type":40,"tag":280,"props":6798,"children":6799},{"style":303},[6800],{"type":46,"value":321},{"type":40,"tag":280,"props":6802,"children":6803},{"class":282,"line":1686},[6804],{"type":40,"tag":280,"props":6805,"children":6806},{"style":303},[6807],{"type":46,"value":3771},{"type":40,"tag":743,"props":6809,"children":6811},{"id":6810},"check-payout-method",[6812],{"type":46,"value":6813},"Check Payout Method",{"type":40,"tag":269,"props":6815,"children":6817},{"className":271,"code":6816,"language":273,"meta":274,"style":274},"const methods = await client.payoutMethods.list({ company_id: \"biz_xxx\" });\nconst hasDefault = methods.some((m: any) => m.is_default);\n",[6818],{"type":40,"tag":101,"props":6819,"children":6820},{"__ignoreMap":274},[6821,6902],{"type":40,"tag":280,"props":6822,"children":6823},{"class":282,"line":24},[6824,6828,6833,6837,6841,6845,6849,6854,6858,6862,6866,6870,6874,6878,6882,6886,6890,6894,6898],{"type":40,"tag":280,"props":6825,"children":6826},{"style":348},[6827],{"type":46,"value":351},{"type":40,"tag":280,"props":6829,"children":6830},{"style":292},[6831],{"type":46,"value":6832}," methods ",{"type":40,"tag":280,"props":6834,"children":6835},{"style":303},[6836],{"type":46,"value":361},{"type":40,"tag":280,"props":6838,"children":6839},{"style":286},[6840],{"type":46,"value":970},{"type":40,"tag":280,"props":6842,"children":6843},{"style":292},[6844],{"type":46,"value":975},{"type":40,"tag":280,"props":6846,"children":6847},{"style":303},[6848],{"type":46,"value":407},{"type":40,"tag":280,"props":6850,"children":6851},{"style":292},[6852],{"type":46,"value":6853},"payoutMethods",{"type":40,"tag":280,"props":6855,"children":6856},{"style":303},[6857],{"type":46,"value":407},{"type":40,"tag":280,"props":6859,"children":6860},{"style":369},[6861],{"type":46,"value":2758},{"type":40,"tag":280,"props":6863,"children":6864},{"style":292},[6865],{"type":46,"value":377},{"type":40,"tag":280,"props":6867,"children":6868},{"style":303},[6869],{"type":46,"value":2518},{"type":40,"tag":280,"props":6871,"children":6872},{"style":389},[6873],{"type":46,"value":2771},{"type":40,"tag":280,"props":6875,"children":6876},{"style":303},[6877],{"type":46,"value":397},{"type":40,"tag":280,"props":6879,"children":6880},{"style":303},[6881],{"type":46,"value":306},{"type":40,"tag":280,"props":6883,"children":6884},{"style":309},[6885],{"type":46,"value":2447},{"type":40,"tag":280,"props":6887,"children":6888},{"style":303},[6889],{"type":46,"value":316},{"type":40,"tag":280,"props":6891,"children":6892},{"style":303},[6893],{"type":46,"value":2571},{"type":40,"tag":280,"props":6895,"children":6896},{"style":292},[6897],{"type":46,"value":449},{"type":40,"tag":280,"props":6899,"children":6900},{"style":303},[6901],{"type":46,"value":321},{"type":40,"tag":280,"props":6903,"children":6904},{"class":282,"line":324},[6905,6909,6914,6918,6923,6927,6932,6936,6940,6945,6949,6953,6957,6961,6966,6970,6975],{"type":40,"tag":280,"props":6906,"children":6907},{"style":348},[6908],{"type":46,"value":351},{"type":40,"tag":280,"props":6910,"children":6911},{"style":292},[6912],{"type":46,"value":6913}," hasDefault ",{"type":40,"tag":280,"props":6915,"children":6916},{"style":303},[6917],{"type":46,"value":361},{"type":40,"tag":280,"props":6919,"children":6920},{"style":292},[6921],{"type":46,"value":6922}," methods",{"type":40,"tag":280,"props":6924,"children":6925},{"style":303},[6926],{"type":46,"value":407},{"type":40,"tag":280,"props":6928,"children":6929},{"style":369},[6930],{"type":46,"value":6931},"some",{"type":40,"tag":280,"props":6933,"children":6934},{"style":292},[6935],{"type":46,"value":377},{"type":40,"tag":280,"props":6937,"children":6938},{"style":303},[6939],{"type":46,"value":377},{"type":40,"tag":280,"props":6941,"children":6942},{"style":4668},[6943],{"type":46,"value":6944},"m",{"type":40,"tag":280,"props":6946,"children":6947},{"style":303},[6948],{"type":46,"value":397},{"type":40,"tag":280,"props":6950,"children":6951},{"style":4505},[6952],{"type":46,"value":5757},{"type":40,"tag":280,"props":6954,"children":6955},{"style":303},[6956],{"type":46,"value":449},{"type":40,"tag":280,"props":6958,"children":6959},{"style":348},[6960],{"type":46,"value":4680},{"type":40,"tag":280,"props":6962,"children":6963},{"style":292},[6964],{"type":46,"value":6965}," m",{"type":40,"tag":280,"props":6967,"children":6968},{"style":303},[6969],{"type":46,"value":407},{"type":40,"tag":280,"props":6971,"children":6972},{"style":292},[6973],{"type":46,"value":6974},"is_default)",{"type":40,"tag":280,"props":6976,"children":6977},{"style":303},[6978],{"type":46,"value":321},{"type":40,"tag":743,"props":6980,"children":6982},{"id":6981},"transfers-cents-withdrawals-dollars",[6983],{"type":46,"value":6984},"Transfers (cents) & Withdrawals (dollars)",{"type":40,"tag":269,"props":6986,"children":6988},{"className":271,"code":6987,"language":273,"meta":274,"style":274},"\u002F\u002F Transfers — amount in CENTS\nawait client.transfers.create({\n  amount: 4500, currency: \"usd\",\n  origin_id: \"biz_platform\", destination_id: \"biz_vendor\",\n  metadata: { order_id: \"order_123\" }, notes: \"Weekly payout\",\n  idempotence_key: \"payout_week12_vendor456\",\n});\n\u002F\u002F Withdrawals — amount in DOLLARS (different!)\nawait client.withdrawals.create({ company_id: \"biz_xxx\", amount: 45.00 });\n",[6989],{"type":40,"tag":101,"props":6990,"children":6991},{"__ignoreMap":274},[6992,7000,7035,7078,7130,7194,7222,7237,7245],{"type":40,"tag":280,"props":6993,"children":6994},{"class":282,"line":24},[6995],{"type":40,"tag":280,"props":6996,"children":6997},{"style":338},[6998],{"type":46,"value":6999},"\u002F\u002F Transfers — amount in CENTS\n",{"type":40,"tag":280,"props":7001,"children":7002},{"class":282,"line":324},[7003,7007,7011,7015,7019,7023,7027,7031],{"type":40,"tag":280,"props":7004,"children":7005},{"style":286},[7006],{"type":46,"value":2641},{"type":40,"tag":280,"props":7008,"children":7009},{"style":292},[7010],{"type":46,"value":975},{"type":40,"tag":280,"props":7012,"children":7013},{"style":303},[7014],{"type":46,"value":407},{"type":40,"tag":280,"props":7016,"children":7017},{"style":292},[7018],{"type":46,"value":2086},{"type":40,"tag":280,"props":7020,"children":7021},{"style":303},[7022],{"type":46,"value":407},{"type":40,"tag":280,"props":7024,"children":7025},{"style":369},[7026],{"type":46,"value":1240},{"type":40,"tag":280,"props":7028,"children":7029},{"style":292},[7030],{"type":46,"value":377},{"type":40,"tag":280,"props":7032,"children":7033},{"style":303},[7034],{"type":46,"value":382},{"type":40,"tag":280,"props":7036,"children":7037},{"class":282,"line":334},[7038,7042,7046,7050,7054,7058,7062,7066,7070,7074],{"type":40,"tag":280,"props":7039,"children":7040},{"style":389},[7041],{"type":46,"value":2110},{"type":40,"tag":280,"props":7043,"children":7044},{"style":303},[7045],{"type":46,"value":397},{"type":40,"tag":280,"props":7047,"children":7048},{"style":1624},[7049],{"type":46,"value":2119},{"type":40,"tag":280,"props":7051,"children":7052},{"style":303},[7053],{"type":46,"value":1003},{"type":40,"tag":280,"props":7055,"children":7056},{"style":389},[7057],{"type":46,"value":1662},{"type":40,"tag":280,"props":7059,"children":7060},{"style":303},[7061],{"type":46,"value":397},{"type":40,"tag":280,"props":7063,"children":7064},{"style":303},[7065],{"type":46,"value":306},{"type":40,"tag":280,"props":7067,"children":7068},{"style":309},[7069],{"type":46,"value":1675},{"type":40,"tag":280,"props":7071,"children":7072},{"style":303},[7073],{"type":46,"value":316},{"type":40,"tag":280,"props":7075,"children":7076},{"style":303},[7077],{"type":46,"value":426},{"type":40,"tag":280,"props":7079,"children":7080},{"class":282,"line":344},[7081,7085,7089,7093,7098,7102,7106,7110,7114,7118,7122,7126],{"type":40,"tag":280,"props":7082,"children":7083},{"style":389},[7084],{"type":46,"value":2160},{"type":40,"tag":280,"props":7086,"children":7087},{"style":303},[7088],{"type":46,"value":397},{"type":40,"tag":280,"props":7090,"children":7091},{"style":303},[7092],{"type":46,"value":306},{"type":40,"tag":280,"props":7094,"children":7095},{"style":309},[7096],{"type":46,"value":7097},"biz_platform",{"type":40,"tag":280,"props":7099,"children":7100},{"style":303},[7101],{"type":46,"value":316},{"type":40,"tag":280,"props":7103,"children":7104},{"style":303},[7105],{"type":46,"value":1003},{"type":40,"tag":280,"props":7107,"children":7108},{"style":389},[7109],{"type":46,"value":2185},{"type":40,"tag":280,"props":7111,"children":7112},{"style":303},[7113],{"type":46,"value":397},{"type":40,"tag":280,"props":7115,"children":7116},{"style":303},[7117],{"type":46,"value":306},{"type":40,"tag":280,"props":7119,"children":7120},{"style":309},[7121],{"type":46,"value":2198},{"type":40,"tag":280,"props":7123,"children":7124},{"style":303},[7125],{"type":46,"value":316},{"type":40,"tag":280,"props":7127,"children":7128},{"style":303},[7129],{"type":46,"value":426},{"type":40,"tag":280,"props":7131,"children":7132},{"class":282,"line":385},[7133,7137,7141,7145,7149,7153,7157,7161,7165,7169,7173,7177,7181,7186,7190],{"type":40,"tag":280,"props":7134,"children":7135},{"style":389},[7136],{"type":46,"value":1343},{"type":40,"tag":280,"props":7138,"children":7139},{"style":303},[7140],{"type":46,"value":397},{"type":40,"tag":280,"props":7142,"children":7143},{"style":303},[7144],{"type":46,"value":1008},{"type":40,"tag":280,"props":7146,"children":7147},{"style":389},[7148],{"type":46,"value":2226},{"type":40,"tag":280,"props":7150,"children":7151},{"style":303},[7152],{"type":46,"value":397},{"type":40,"tag":280,"props":7154,"children":7155},{"style":303},[7156],{"type":46,"value":306},{"type":40,"tag":280,"props":7158,"children":7159},{"style":309},[7160],{"type":46,"value":2239},{"type":40,"tag":280,"props":7162,"children":7163},{"style":303},[7164],{"type":46,"value":316},{"type":40,"tag":280,"props":7166,"children":7167},{"style":303},[7168],{"type":46,"value":2248},{"type":40,"tag":280,"props":7170,"children":7171},{"style":389},[7172],{"type":46,"value":2253},{"type":40,"tag":280,"props":7174,"children":7175},{"style":303},[7176],{"type":46,"value":397},{"type":40,"tag":280,"props":7178,"children":7179},{"style":303},[7180],{"type":46,"value":306},{"type":40,"tag":280,"props":7182,"children":7183},{"style":309},[7184],{"type":46,"value":7185},"Weekly payout",{"type":40,"tag":280,"props":7187,"children":7188},{"style":303},[7189],{"type":46,"value":316},{"type":40,"tag":280,"props":7191,"children":7192},{"style":303},[7193],{"type":46,"value":426},{"type":40,"tag":280,"props":7195,"children":7196},{"class":282,"line":429},[7197,7201,7205,7209,7214,7218],{"type":40,"tag":280,"props":7198,"children":7199},{"style":389},[7200],{"type":46,"value":2282},{"type":40,"tag":280,"props":7202,"children":7203},{"style":303},[7204],{"type":46,"value":397},{"type":40,"tag":280,"props":7206,"children":7207},{"style":303},[7208],{"type":46,"value":306},{"type":40,"tag":280,"props":7210,"children":7211},{"style":309},[7212],{"type":46,"value":7213},"payout_week12_vendor456",{"type":40,"tag":280,"props":7215,"children":7216},{"style":303},[7217],{"type":46,"value":316},{"type":40,"tag":280,"props":7219,"children":7220},{"style":303},[7221],{"type":46,"value":426},{"type":40,"tag":280,"props":7223,"children":7224},{"class":282,"line":438},[7225,7229,7233],{"type":40,"tag":280,"props":7226,"children":7227},{"style":303},[7228],{"type":46,"value":444},{"type":40,"tag":280,"props":7230,"children":7231},{"style":292},[7232],{"type":46,"value":449},{"type":40,"tag":280,"props":7234,"children":7235},{"style":303},[7236],{"type":46,"value":321},{"type":40,"tag":280,"props":7238,"children":7239},{"class":282,"line":456},[7240],{"type":40,"tag":280,"props":7241,"children":7242},{"style":338},[7243],{"type":46,"value":7244},"\u002F\u002F Withdrawals — amount in DOLLARS (different!)\n",{"type":40,"tag":280,"props":7246,"children":7247},{"class":282,"line":464},[7248,7252,7256,7260,7265,7269,7273,7277,7281,7285,7289,7293,7297,7301,7305,7310,7314,7319,7323,7327],{"type":40,"tag":280,"props":7249,"children":7250},{"style":286},[7251],{"type":46,"value":2641},{"type":40,"tag":280,"props":7253,"children":7254},{"style":292},[7255],{"type":46,"value":975},{"type":40,"tag":280,"props":7257,"children":7258},{"style":303},[7259],{"type":46,"value":407},{"type":40,"tag":280,"props":7261,"children":7262},{"style":292},[7263],{"type":46,"value":7264},"withdrawals",{"type":40,"tag":280,"props":7266,"children":7267},{"style":303},[7268],{"type":46,"value":407},{"type":40,"tag":280,"props":7270,"children":7271},{"style":369},[7272],{"type":46,"value":1240},{"type":40,"tag":280,"props":7274,"children":7275},{"style":292},[7276],{"type":46,"value":377},{"type":40,"tag":280,"props":7278,"children":7279},{"style":303},[7280],{"type":46,"value":2518},{"type":40,"tag":280,"props":7282,"children":7283},{"style":389},[7284],{"type":46,"value":2771},{"type":40,"tag":280,"props":7286,"children":7287},{"style":303},[7288],{"type":46,"value":397},{"type":40,"tag":280,"props":7290,"children":7291},{"style":303},[7292],{"type":46,"value":306},{"type":40,"tag":280,"props":7294,"children":7295},{"style":309},[7296],{"type":46,"value":2447},{"type":40,"tag":280,"props":7298,"children":7299},{"style":303},[7300],{"type":46,"value":316},{"type":40,"tag":280,"props":7302,"children":7303},{"style":303},[7304],{"type":46,"value":1003},{"type":40,"tag":280,"props":7306,"children":7307},{"style":389},[7308],{"type":46,"value":7309}," amount",{"type":40,"tag":280,"props":7311,"children":7312},{"style":303},[7313],{"type":46,"value":397},{"type":40,"tag":280,"props":7315,"children":7316},{"style":1624},[7317],{"type":46,"value":7318}," 45.00",{"type":40,"tag":280,"props":7320,"children":7321},{"style":303},[7322],{"type":46,"value":2571},{"type":40,"tag":280,"props":7324,"children":7325},{"style":292},[7326],{"type":46,"value":449},{"type":40,"tag":280,"props":7328,"children":7329},{"style":303},[7330],{"type":46,"value":321},{"type":40,"tag":49,"props":7332,"children":7333},{},[7334,7335,7341],{"type":46,"value":5342},{"type":40,"tag":101,"props":7336,"children":7338},{"className":7337},[],[7339],{"type":46,"value":7340},"references\u002Fpayouts.md",{"type":46,"value":7342}," for hosted payouts, embedded wallet components, and the interactive playground.",{"type":40,"tag":55,"props":7344,"children":7346},{"id":7345},"_9-webhooks",[7347],{"type":46,"value":7348},"9. Webhooks",{"type":40,"tag":49,"props":7350,"children":7351},{},[7352,7357],{"type":40,"tag":783,"props":7353,"children":7354},{},[7355],{"type":46,"value":7356},"Setup:",{"type":46,"value":7358}," Dashboard > Developer > Create Webhook > select events > provide URL.",{"type":40,"tag":269,"props":7360,"children":7362},{"className":271,"code":7361,"language":273,"meta":274,"style":274},"import type { NextRequest } from \"next\u002Fserver\";\nimport { whopsdk } from \"@\u002Flib\u002Fwhop-sdk\";\n\nexport async function POST(request: NextRequest): Promise\u003CResponse> {\n  const body = await request.text();\n  const headers = Object.fromEntries(request.headers);\n  const webhookData = whopsdk.webhooks.unwrap(body, { headers });\n\n  \u002F\u002F GOTCHA: event field is `event`, not `type`\n  \u002F\u002F GOTCHA: events may arrive with underscores: \"membership_went_valid\"\n  const eventType = webhookData.event.replace(\u002F_\u002Fg, \".\"); \u002F\u002F normalize\n\n  switch (eventType) {\n    case \"payment.succeeded\":\n      \u002F\u002F handle payment\n      break;\n    case \"membership.went.valid\":\n      \u002F\u002F handle activation\n      break;\n  }\n\n  return new Response(\"OK\", { status: 200 }); \u002F\u002F return 2xx quickly!\n}\n",[7363],{"type":40,"tag":101,"props":7364,"children":7365},{"__ignoreMap":274},[7366,7412,7453,7460,7527,7571,7626,7696,7703,7711,7719,7809,7816,7842,7868,7876,7888,7912,7920,7931,7939,7946,8018],{"type":40,"tag":280,"props":7367,"children":7368},{"class":282,"line":24},[7369,7373,7378,7382,7387,7391,7395,7399,7404,7408],{"type":40,"tag":280,"props":7370,"children":7371},{"style":286},[7372],{"type":46,"value":289},{"type":40,"tag":280,"props":7374,"children":7375},{"style":286},[7376],{"type":46,"value":7377}," type",{"type":40,"tag":280,"props":7379,"children":7380},{"style":303},[7381],{"type":46,"value":1008},{"type":40,"tag":280,"props":7383,"children":7384},{"style":292},[7385],{"type":46,"value":7386}," NextRequest",{"type":40,"tag":280,"props":7388,"children":7389},{"style":303},[7390],{"type":46,"value":2571},{"type":40,"tag":280,"props":7392,"children":7393},{"style":286},[7394],{"type":46,"value":4470},{"type":40,"tag":280,"props":7396,"children":7397},{"style":303},[7398],{"type":46,"value":306},{"type":40,"tag":280,"props":7400,"children":7401},{"style":309},[7402],{"type":46,"value":7403},"next\u002Fserver",{"type":40,"tag":280,"props":7405,"children":7406},{"style":303},[7407],{"type":46,"value":316},{"type":40,"tag":280,"props":7409,"children":7410},{"style":303},[7411],{"type":46,"value":321},{"type":40,"tag":280,"props":7413,"children":7414},{"class":282,"line":324},[7415,7419,7423,7428,7432,7436,7440,7445,7449],{"type":40,"tag":280,"props":7416,"children":7417},{"style":286},[7418],{"type":46,"value":289},{"type":40,"tag":280,"props":7420,"children":7421},{"style":303},[7422],{"type":46,"value":1008},{"type":40,"tag":280,"props":7424,"children":7425},{"style":292},[7426],{"type":46,"value":7427}," whopsdk",{"type":40,"tag":280,"props":7429,"children":7430},{"style":303},[7431],{"type":46,"value":2571},{"type":40,"tag":280,"props":7433,"children":7434},{"style":286},[7435],{"type":46,"value":4470},{"type":40,"tag":280,"props":7437,"children":7438},{"style":303},[7439],{"type":46,"value":306},{"type":40,"tag":280,"props":7441,"children":7442},{"style":309},[7443],{"type":46,"value":7444},"@\u002Flib\u002Fwhop-sdk",{"type":40,"tag":280,"props":7446,"children":7447},{"style":303},[7448],{"type":46,"value":316},{"type":40,"tag":280,"props":7450,"children":7451},{"style":303},[7452],{"type":46,"value":321},{"type":40,"tag":280,"props":7454,"children":7455},{"class":282,"line":334},[7456],{"type":40,"tag":280,"props":7457,"children":7458},{"emptyLinePlaceholder":328},[7459],{"type":46,"value":331},{"type":40,"tag":280,"props":7461,"children":7462},{"class":282,"line":344},[7463,7468,7472,7477,7482,7486,7491,7495,7499,7504,7509,7513,7518,7523],{"type":40,"tag":280,"props":7464,"children":7465},{"style":286},[7466],{"type":46,"value":7467},"export",{"type":40,"tag":280,"props":7469,"children":7470},{"style":348},[7471],{"type":46,"value":5220},{"type":40,"tag":280,"props":7473,"children":7474},{"style":348},[7475],{"type":46,"value":7476}," function",{"type":40,"tag":280,"props":7478,"children":7479},{"style":369},[7480],{"type":46,"value":7481}," POST",{"type":40,"tag":280,"props":7483,"children":7484},{"style":303},[7485],{"type":46,"value":377},{"type":40,"tag":280,"props":7487,"children":7488},{"style":4668},[7489],{"type":46,"value":7490},"request",{"type":40,"tag":280,"props":7492,"children":7493},{"style":303},[7494],{"type":46,"value":397},{"type":40,"tag":280,"props":7496,"children":7497},{"style":4505},[7498],{"type":46,"value":7386},{"type":40,"tag":280,"props":7500,"children":7501},{"style":303},[7502],{"type":46,"value":7503},"):",{"type":40,"tag":280,"props":7505,"children":7506},{"style":4505},[7507],{"type":46,"value":7508}," Promise",{"type":40,"tag":280,"props":7510,"children":7511},{"style":303},[7512],{"type":46,"value":4502},{"type":40,"tag":280,"props":7514,"children":7515},{"style":4505},[7516],{"type":46,"value":7517},"Response",{"type":40,"tag":280,"props":7519,"children":7520},{"style":303},[7521],{"type":46,"value":7522},">",{"type":40,"tag":280,"props":7524,"children":7525},{"style":303},[7526],{"type":46,"value":1554},{"type":40,"tag":280,"props":7528,"children":7529},{"class":282,"line":385},[7530,7535,7540,7545,7549,7554,7558,7562,7567],{"type":40,"tag":280,"props":7531,"children":7532},{"style":348},[7533],{"type":46,"value":7534},"  const",{"type":40,"tag":280,"props":7536,"children":7537},{"style":292},[7538],{"type":46,"value":7539}," body",{"type":40,"tag":280,"props":7541,"children":7542},{"style":303},[7543],{"type":46,"value":7544}," =",{"type":40,"tag":280,"props":7546,"children":7547},{"style":286},[7548],{"type":46,"value":970},{"type":40,"tag":280,"props":7550,"children":7551},{"style":292},[7552],{"type":46,"value":7553}," request",{"type":40,"tag":280,"props":7555,"children":7556},{"style":303},[7557],{"type":46,"value":407},{"type":40,"tag":280,"props":7559,"children":7560},{"style":369},[7561],{"type":46,"value":46},{"type":40,"tag":280,"props":7563,"children":7564},{"style":389},[7565],{"type":46,"value":7566},"()",{"type":40,"tag":280,"props":7568,"children":7569},{"style":303},[7570],{"type":46,"value":321},{"type":40,"tag":280,"props":7572,"children":7573},{"class":282,"line":429},[7574,7578,7583,7587,7592,7596,7601,7605,7609,7613,7618,7622],{"type":40,"tag":280,"props":7575,"children":7576},{"style":348},[7577],{"type":46,"value":7534},{"type":40,"tag":280,"props":7579,"children":7580},{"style":292},[7581],{"type":46,"value":7582}," headers",{"type":40,"tag":280,"props":7584,"children":7585},{"style":303},[7586],{"type":46,"value":7544},{"type":40,"tag":280,"props":7588,"children":7589},{"style":292},[7590],{"type":46,"value":7591}," Object",{"type":40,"tag":280,"props":7593,"children":7594},{"style":303},[7595],{"type":46,"value":407},{"type":40,"tag":280,"props":7597,"children":7598},{"style":369},[7599],{"type":46,"value":7600},"fromEntries",{"type":40,"tag":280,"props":7602,"children":7603},{"style":389},[7604],{"type":46,"value":377},{"type":40,"tag":280,"props":7606,"children":7607},{"style":292},[7608],{"type":46,"value":7490},{"type":40,"tag":280,"props":7610,"children":7611},{"style":303},[7612],{"type":46,"value":407},{"type":40,"tag":280,"props":7614,"children":7615},{"style":292},[7616],{"type":46,"value":7617},"headers",{"type":40,"tag":280,"props":7619,"children":7620},{"style":389},[7621],{"type":46,"value":449},{"type":40,"tag":280,"props":7623,"children":7624},{"style":303},[7625],{"type":46,"value":321},{"type":40,"tag":280,"props":7627,"children":7628},{"class":282,"line":438},[7629,7633,7638,7642,7646,7650,7654,7658,7663,7667,7672,7676,7680,7684,7688,7692],{"type":40,"tag":280,"props":7630,"children":7631},{"style":348},[7632],{"type":46,"value":7534},{"type":40,"tag":280,"props":7634,"children":7635},{"style":292},[7636],{"type":46,"value":7637}," webhookData",{"type":40,"tag":280,"props":7639,"children":7640},{"style":303},[7641],{"type":46,"value":7544},{"type":40,"tag":280,"props":7643,"children":7644},{"style":292},[7645],{"type":46,"value":7427},{"type":40,"tag":280,"props":7647,"children":7648},{"style":303},[7649],{"type":46,"value":407},{"type":40,"tag":280,"props":7651,"children":7652},{"style":292},[7653],{"type":46,"value":23},{"type":40,"tag":280,"props":7655,"children":7656},{"style":303},[7657],{"type":46,"value":407},{"type":40,"tag":280,"props":7659,"children":7660},{"style":369},[7661],{"type":46,"value":7662},"unwrap",{"type":40,"tag":280,"props":7664,"children":7665},{"style":389},[7666],{"type":46,"value":377},{"type":40,"tag":280,"props":7668,"children":7669},{"style":292},[7670],{"type":46,"value":7671},"body",{"type":40,"tag":280,"props":7673,"children":7674},{"style":303},[7675],{"type":46,"value":1003},{"type":40,"tag":280,"props":7677,"children":7678},{"style":303},[7679],{"type":46,"value":1008},{"type":40,"tag":280,"props":7681,"children":7682},{"style":292},[7683],{"type":46,"value":7582},{"type":40,"tag":280,"props":7685,"children":7686},{"style":303},[7687],{"type":46,"value":2571},{"type":40,"tag":280,"props":7689,"children":7690},{"style":389},[7691],{"type":46,"value":449},{"type":40,"tag":280,"props":7693,"children":7694},{"style":303},[7695],{"type":46,"value":321},{"type":40,"tag":280,"props":7697,"children":7698},{"class":282,"line":456},[7699],{"type":40,"tag":280,"props":7700,"children":7701},{"emptyLinePlaceholder":328},[7702],{"type":46,"value":331},{"type":40,"tag":280,"props":7704,"children":7705},{"class":282,"line":464},[7706],{"type":40,"tag":280,"props":7707,"children":7708},{"style":338},[7709],{"type":46,"value":7710},"  \u002F\u002F GOTCHA: event field is `event`, not `type`\n",{"type":40,"tag":280,"props":7712,"children":7713},{"class":282,"line":473},[7714],{"type":40,"tag":280,"props":7715,"children":7716},{"style":338},[7717],{"type":46,"value":7718},"  \u002F\u002F GOTCHA: events may arrive with underscores: \"membership_went_valid\"\n",{"type":40,"tag":280,"props":7720,"children":7721},{"class":282,"line":506},[7722,7726,7731,7735,7739,7743,7748,7752,7757,7761,7766,7771,7775,7780,7784,7788,7792,7796,7800,7804],{"type":40,"tag":280,"props":7723,"children":7724},{"style":348},[7725],{"type":46,"value":7534},{"type":40,"tag":280,"props":7727,"children":7728},{"style":292},[7729],{"type":46,"value":7730}," eventType",{"type":40,"tag":280,"props":7732,"children":7733},{"style":303},[7734],{"type":46,"value":7544},{"type":40,"tag":280,"props":7736,"children":7737},{"style":292},[7738],{"type":46,"value":7637},{"type":40,"tag":280,"props":7740,"children":7741},{"style":303},[7742],{"type":46,"value":407},{"type":40,"tag":280,"props":7744,"children":7745},{"style":292},[7746],{"type":46,"value":7747},"event",{"type":40,"tag":280,"props":7749,"children":7750},{"style":303},[7751],{"type":46,"value":407},{"type":40,"tag":280,"props":7753,"children":7754},{"style":369},[7755],{"type":46,"value":7756},"replace",{"type":40,"tag":280,"props":7758,"children":7759},{"style":389},[7760],{"type":46,"value":377},{"type":40,"tag":280,"props":7762,"children":7763},{"style":303},[7764],{"type":46,"value":7765},"\u002F",{"type":40,"tag":280,"props":7767,"children":7768},{"style":309},[7769],{"type":46,"value":7770},"_",{"type":40,"tag":280,"props":7772,"children":7773},{"style":303},[7774],{"type":46,"value":7765},{"type":40,"tag":280,"props":7776,"children":7777},{"style":1624},[7778],{"type":46,"value":7779},"g",{"type":40,"tag":280,"props":7781,"children":7782},{"style":303},[7783],{"type":46,"value":1003},{"type":40,"tag":280,"props":7785,"children":7786},{"style":303},[7787],{"type":46,"value":306},{"type":40,"tag":280,"props":7789,"children":7790},{"style":309},[7791],{"type":46,"value":407},{"type":40,"tag":280,"props":7793,"children":7794},{"style":303},[7795],{"type":46,"value":316},{"type":40,"tag":280,"props":7797,"children":7798},{"style":389},[7799],{"type":46,"value":449},{"type":40,"tag":280,"props":7801,"children":7802},{"style":303},[7803],{"type":46,"value":3595},{"type":40,"tag":280,"props":7805,"children":7806},{"style":338},[7807],{"type":46,"value":7808}," \u002F\u002F normalize\n",{"type":40,"tag":280,"props":7810,"children":7811},{"class":282,"line":542},[7812],{"type":40,"tag":280,"props":7813,"children":7814},{"emptyLinePlaceholder":328},[7815],{"type":46,"value":331},{"type":40,"tag":280,"props":7817,"children":7818},{"class":282,"line":572},[7819,7824,7828,7833,7838],{"type":40,"tag":280,"props":7820,"children":7821},{"style":286},[7822],{"type":46,"value":7823},"  switch",{"type":40,"tag":280,"props":7825,"children":7826},{"style":389},[7827],{"type":46,"value":3643},{"type":40,"tag":280,"props":7829,"children":7830},{"style":292},[7831],{"type":46,"value":7832},"eventType",{"type":40,"tag":280,"props":7834,"children":7835},{"style":389},[7836],{"type":46,"value":7837},") ",{"type":40,"tag":280,"props":7839,"children":7840},{"style":303},[7841],{"type":46,"value":382},{"type":40,"tag":280,"props":7843,"children":7844},{"class":282,"line":1611},[7845,7850,7854,7859,7863],{"type":40,"tag":280,"props":7846,"children":7847},{"style":286},[7848],{"type":46,"value":7849},"    case",{"type":40,"tag":280,"props":7851,"children":7852},{"style":303},[7853],{"type":46,"value":306},{"type":40,"tag":280,"props":7855,"children":7856},{"style":309},[7857],{"type":46,"value":7858},"payment.succeeded",{"type":40,"tag":280,"props":7860,"children":7861},{"style":303},[7862],{"type":46,"value":316},{"type":40,"tag":280,"props":7864,"children":7865},{"style":303},[7866],{"type":46,"value":7867},":\n",{"type":40,"tag":280,"props":7869,"children":7870},{"class":282,"line":1686},[7871],{"type":40,"tag":280,"props":7872,"children":7873},{"style":338},[7874],{"type":46,"value":7875},"      \u002F\u002F handle payment\n",{"type":40,"tag":280,"props":7877,"children":7878},{"class":282,"line":1742},[7879,7884],{"type":40,"tag":280,"props":7880,"children":7881},{"style":286},[7882],{"type":46,"value":7883},"      break",{"type":40,"tag":280,"props":7885,"children":7886},{"style":303},[7887],{"type":46,"value":321},{"type":40,"tag":280,"props":7889,"children":7890},{"class":282,"line":1769},[7891,7895,7899,7904,7908],{"type":40,"tag":280,"props":7892,"children":7893},{"style":286},[7894],{"type":46,"value":7849},{"type":40,"tag":280,"props":7896,"children":7897},{"style":303},[7898],{"type":46,"value":306},{"type":40,"tag":280,"props":7900,"children":7901},{"style":309},[7902],{"type":46,"value":7903},"membership.went.valid",{"type":40,"tag":280,"props":7905,"children":7906},{"style":303},[7907],{"type":46,"value":316},{"type":40,"tag":280,"props":7909,"children":7910},{"style":303},[7911],{"type":46,"value":7867},{"type":40,"tag":280,"props":7913,"children":7914},{"class":282,"line":1778},[7915],{"type":40,"tag":280,"props":7916,"children":7917},{"style":338},[7918],{"type":46,"value":7919},"      \u002F\u002F handle activation\n",{"type":40,"tag":280,"props":7921,"children":7922},{"class":282,"line":1794},[7923,7927],{"type":40,"tag":280,"props":7924,"children":7925},{"style":286},[7926],{"type":46,"value":7883},{"type":40,"tag":280,"props":7928,"children":7929},{"style":303},[7930],{"type":46,"value":321},{"type":40,"tag":280,"props":7932,"children":7933},{"class":282,"line":3295},[7934],{"type":40,"tag":280,"props":7935,"children":7936},{"style":303},[7937],{"type":46,"value":7938},"  }\n",{"type":40,"tag":280,"props":7940,"children":7941},{"class":282,"line":3323},[7942],{"type":40,"tag":280,"props":7943,"children":7944},{"emptyLinePlaceholder":328},[7945],{"type":46,"value":331},{"type":40,"tag":280,"props":7947,"children":7948},{"class":282,"line":3339},[7949,7953,7957,7962,7966,7970,7975,7979,7983,7987,7992,7996,8001,8005,8009,8013],{"type":40,"tag":280,"props":7950,"children":7951},{"style":286},[7952],{"type":46,"value":6642},{"type":40,"tag":280,"props":7954,"children":7955},{"style":303},[7956],{"type":46,"value":366},{"type":40,"tag":280,"props":7958,"children":7959},{"style":369},[7960],{"type":46,"value":7961}," Response",{"type":40,"tag":280,"props":7963,"children":7964},{"style":389},[7965],{"type":46,"value":377},{"type":40,"tag":280,"props":7967,"children":7968},{"style":303},[7969],{"type":46,"value":316},{"type":40,"tag":280,"props":7971,"children":7972},{"style":309},[7973],{"type":46,"value":7974},"OK",{"type":40,"tag":280,"props":7976,"children":7977},{"style":303},[7978],{"type":46,"value":316},{"type":40,"tag":280,"props":7980,"children":7981},{"style":303},[7982],{"type":46,"value":1003},{"type":40,"tag":280,"props":7984,"children":7985},{"style":303},[7986],{"type":46,"value":1008},{"type":40,"tag":280,"props":7988,"children":7989},{"style":389},[7990],{"type":46,"value":7991}," status",{"type":40,"tag":280,"props":7993,"children":7994},{"style":303},[7995],{"type":46,"value":397},{"type":40,"tag":280,"props":7997,"children":7998},{"style":1624},[7999],{"type":46,"value":8000}," 200",{"type":40,"tag":280,"props":8002,"children":8003},{"style":303},[8004],{"type":46,"value":2571},{"type":40,"tag":280,"props":8006,"children":8007},{"style":389},[8008],{"type":46,"value":449},{"type":40,"tag":280,"props":8010,"children":8011},{"style":303},[8012],{"type":46,"value":3595},{"type":40,"tag":280,"props":8014,"children":8015},{"style":338},[8016],{"type":46,"value":8017}," \u002F\u002F return 2xx quickly!\n",{"type":40,"tag":280,"props":8019,"children":8020},{"class":282,"line":3347},[8021],{"type":40,"tag":280,"props":8022,"children":8023},{"style":303},[8024],{"type":46,"value":3771},{"type":40,"tag":49,"props":8026,"children":8027},{},[8028,8029,8035],{"type":46,"value":5342},{"type":40,"tag":101,"props":8030,"children":8032},{"className":8031},[],[8033],{"type":46,"value":8034},"references\u002Fwebhooks.md",{"type":46,"value":8036}," for all events, company vs app webhooks, and validation.",{"type":40,"tag":55,"props":8038,"children":8040},{"id":8039},"_10-notifications",[8041],{"type":46,"value":8042},"10. Notifications",{"type":40,"tag":49,"props":8044,"children":8045},{},[8046],{"type":46,"value":8047},"Send push notifications to users with deep linking:",{"type":40,"tag":269,"props":8049,"children":8051},{"className":271,"code":8050,"language":273,"meta":274,"style":274},"await client.notifications.create({\n  company_id: \"biz_xxx\",\n  user_id: \"user_xxx\",\n  title: \"Your order shipped!\",\n  content: \"Track your order in the app.\",\n  rest_path: \"\u002Forders\u002Forder_123\", \u002F\u002F deep link path within your app\n});\n",[8052],{"type":40,"tag":101,"props":8053,"children":8054},{"__ignoreMap":274},[8055,8091,8118,8147,8175,8204,8238],{"type":40,"tag":280,"props":8056,"children":8057},{"class":282,"line":24},[8058,8062,8066,8070,8075,8079,8083,8087],{"type":40,"tag":280,"props":8059,"children":8060},{"style":286},[8061],{"type":46,"value":2641},{"type":40,"tag":280,"props":8063,"children":8064},{"style":292},[8065],{"type":46,"value":975},{"type":40,"tag":280,"props":8067,"children":8068},{"style":303},[8069],{"type":46,"value":407},{"type":40,"tag":280,"props":8071,"children":8072},{"style":292},[8073],{"type":46,"value":8074},"notifications",{"type":40,"tag":280,"props":8076,"children":8077},{"style":303},[8078],{"type":46,"value":407},{"type":40,"tag":280,"props":8080,"children":8081},{"style":369},[8082],{"type":46,"value":1240},{"type":40,"tag":280,"props":8084,"children":8085},{"style":292},[8086],{"type":46,"value":377},{"type":40,"tag":280,"props":8088,"children":8089},{"style":303},[8090],{"type":46,"value":382},{"type":40,"tag":280,"props":8092,"children":8093},{"class":282,"line":324},[8094,8098,8102,8106,8110,8114],{"type":40,"tag":280,"props":8095,"children":8096},{"style":389},[8097],{"type":46,"value":1457},{"type":40,"tag":280,"props":8099,"children":8100},{"style":303},[8101],{"type":46,"value":397},{"type":40,"tag":280,"props":8103,"children":8104},{"style":303},[8105],{"type":46,"value":306},{"type":40,"tag":280,"props":8107,"children":8108},{"style":309},[8109],{"type":46,"value":2447},{"type":40,"tag":280,"props":8111,"children":8112},{"style":303},[8113],{"type":46,"value":316},{"type":40,"tag":280,"props":8115,"children":8116},{"style":303},[8117],{"type":46,"value":426},{"type":40,"tag":280,"props":8119,"children":8120},{"class":282,"line":334},[8121,8126,8130,8134,8139,8143],{"type":40,"tag":280,"props":8122,"children":8123},{"style":389},[8124],{"type":46,"value":8125},"  user_id",{"type":40,"tag":280,"props":8127,"children":8128},{"style":303},[8129],{"type":46,"value":397},{"type":40,"tag":280,"props":8131,"children":8132},{"style":303},[8133],{"type":46,"value":306},{"type":40,"tag":280,"props":8135,"children":8136},{"style":309},[8137],{"type":46,"value":8138},"user_xxx",{"type":40,"tag":280,"props":8140,"children":8141},{"style":303},[8142],{"type":46,"value":316},{"type":40,"tag":280,"props":8144,"children":8145},{"style":303},[8146],{"type":46,"value":426},{"type":40,"tag":280,"props":8148,"children":8149},{"class":282,"line":344},[8150,8154,8158,8162,8167,8171],{"type":40,"tag":280,"props":8151,"children":8152},{"style":389},[8153],{"type":46,"value":1314},{"type":40,"tag":280,"props":8155,"children":8156},{"style":303},[8157],{"type":46,"value":397},{"type":40,"tag":280,"props":8159,"children":8160},{"style":303},[8161],{"type":46,"value":306},{"type":40,"tag":280,"props":8163,"children":8164},{"style":309},[8165],{"type":46,"value":8166},"Your order shipped!",{"type":40,"tag":280,"props":8168,"children":8169},{"style":303},[8170],{"type":46,"value":316},{"type":40,"tag":280,"props":8172,"children":8173},{"style":303},[8174],{"type":46,"value":426},{"type":40,"tag":280,"props":8176,"children":8177},{"class":282,"line":385},[8178,8183,8187,8191,8196,8200],{"type":40,"tag":280,"props":8179,"children":8180},{"style":389},[8181],{"type":46,"value":8182},"  content",{"type":40,"tag":280,"props":8184,"children":8185},{"style":303},[8186],{"type":46,"value":397},{"type":40,"tag":280,"props":8188,"children":8189},{"style":303},[8190],{"type":46,"value":306},{"type":40,"tag":280,"props":8192,"children":8193},{"style":309},[8194],{"type":46,"value":8195},"Track your order in the app.",{"type":40,"tag":280,"props":8197,"children":8198},{"style":303},[8199],{"type":46,"value":316},{"type":40,"tag":280,"props":8201,"children":8202},{"style":303},[8203],{"type":46,"value":426},{"type":40,"tag":280,"props":8205,"children":8206},{"class":282,"line":429},[8207,8212,8216,8220,8225,8229,8233],{"type":40,"tag":280,"props":8208,"children":8209},{"style":389},[8210],{"type":46,"value":8211},"  rest_path",{"type":40,"tag":280,"props":8213,"children":8214},{"style":303},[8215],{"type":46,"value":397},{"type":40,"tag":280,"props":8217,"children":8218},{"style":303},[8219],{"type":46,"value":306},{"type":40,"tag":280,"props":8221,"children":8222},{"style":309},[8223],{"type":46,"value":8224},"\u002Forders\u002Forder_123",{"type":40,"tag":280,"props":8226,"children":8227},{"style":303},[8228],{"type":46,"value":316},{"type":40,"tag":280,"props":8230,"children":8231},{"style":303},[8232],{"type":46,"value":1003},{"type":40,"tag":280,"props":8234,"children":8235},{"style":338},[8236],{"type":46,"value":8237}," \u002F\u002F deep link path within your app\n",{"type":40,"tag":280,"props":8239,"children":8240},{"class":282,"line":438},[8241,8245,8249],{"type":40,"tag":280,"props":8242,"children":8243},{"style":303},[8244],{"type":46,"value":444},{"type":40,"tag":280,"props":8246,"children":8247},{"style":292},[8248],{"type":46,"value":449},{"type":40,"tag":280,"props":8250,"children":8251},{"style":303},[8252],{"type":46,"value":321},{"type":40,"tag":55,"props":8254,"children":8256},{"id":8255},"_11-chat-sdk",[8257],{"type":46,"value":8258},"11. Chat SDK",{"type":40,"tag":49,"props":8260,"children":8261},{},[8262,8264,8270,8272,8278,8280,8286,8288,8294],{"type":46,"value":8263},"Embed real-time chat via ",{"type":40,"tag":101,"props":8265,"children":8267},{"className":8266},[],[8268],{"type":46,"value":8269},"ChatElement",{"type":46,"value":8271}," inside ",{"type":40,"tag":101,"props":8273,"children":8275},{"className":8274},[],[8276],{"type":46,"value":8277},"ChatSession",{"type":46,"value":8279}," + ",{"type":40,"tag":101,"props":8281,"children":8283},{"className":8282},[],[8284],{"type":46,"value":8285},"Elements",{"type":46,"value":8287}," wrappers. See ",{"type":40,"tag":101,"props":8289,"children":8291},{"className":8290},[],[8292],{"type":46,"value":8293},"references\u002Fchat-sdk.md",{"type":46,"value":8295}," for React, Vanilla JS, and Swift examples.",{"type":40,"tag":55,"props":8297,"children":8299},{"id":8298},"_12-common-gotchas",[8300],{"type":46,"value":8301},"12. Common Gotchas",{"type":40,"tag":6294,"props":8303,"children":8304},{},[8305,8331,8346,8382,8413,8429,8454,8472,8482,8499,8516,8540,8556,8578,8596,8606,8624],{"type":40,"tag":6298,"props":8306,"children":8307},{},[8308,8313,8315,8321,8323,8329],{"type":40,"tag":783,"props":8309,"children":8310},{},[8311],{"type":46,"value":8312},"Transfers use cents, Withdrawals use dollars",{"type":46,"value":8314}," — ",{"type":40,"tag":101,"props":8316,"children":8318},{"className":8317},[],[8319],{"type":46,"value":8320},"transfers.create({ amount: 4500 })",{"type":46,"value":8322}," = $45.00, but ",{"type":40,"tag":101,"props":8324,"children":8326},{"className":8325},[],[8327],{"type":46,"value":8328},"withdrawals.create({ amount: 45 })",{"type":46,"value":8330}," = $45.00.",{"type":40,"tag":6298,"props":8332,"children":8333},{},[8334,8344],{"type":40,"tag":783,"props":8335,"children":8336},{},[8337,8342],{"type":40,"tag":101,"props":8338,"children":8340},{"className":8339},[],[8341],{"type":46,"value":1189},{"type":46,"value":8343}," must be > 0 AND \u003C total price",{"type":46,"value":8345}," — zero or equal-to-total will error.",{"type":40,"tag":6298,"props":8347,"children":8348},{},[8349,8367,8369,8374,8376,8381],{"type":40,"tag":783,"props":8350,"children":8351},{},[8352,8354,8359,8361],{"type":46,"value":8353},"Webhook ",{"type":40,"tag":101,"props":8355,"children":8357},{"className":8356},[],[8358],{"type":46,"value":7747},{"type":46,"value":8360}," field, not ",{"type":40,"tag":101,"props":8362,"children":8364},{"className":8363},[],[8365],{"type":46,"value":8366},"type",{"type":46,"value":8368}," — The webhook body uses ",{"type":40,"tag":101,"props":8370,"children":8372},{"className":8371},[],[8373],{"type":46,"value":7747},{"type":46,"value":8375}," as the key. Some docs incorrectly show ",{"type":40,"tag":101,"props":8377,"children":8379},{"className":8378},[],[8380],{"type":46,"value":8366},{"type":46,"value":407},{"type":40,"tag":6298,"props":8383,"children":8384},{},[8385,8390,8391,8397,8399,8404,8406,8412],{"type":40,"tag":783,"props":8386,"children":8387},{},[8388],{"type":46,"value":8389},"Webhook events may use underscores",{"type":46,"value":8314},{"type":40,"tag":101,"props":8392,"children":8394},{"className":8393},[],[8395],{"type":46,"value":8396},"membership_went_valid",{"type":46,"value":8398}," instead of ",{"type":40,"tag":101,"props":8400,"children":8402},{"className":8401},[],[8403],{"type":46,"value":7903},{"type":46,"value":8405},". Normalize with ",{"type":40,"tag":101,"props":8407,"children":8409},{"className":8408},[],[8410],{"type":46,"value":8411},".replace(\u002F_\u002Fg, \".\")",{"type":46,"value":407},{"type":40,"tag":6298,"props":8414,"children":8415},{},[8416,8427],{"type":40,"tag":783,"props":8417,"children":8418},{},[8419,8425],{"type":40,"tag":101,"props":8420,"children":8422},{"className":8421},[],[8423],{"type":46,"value":8424},"returnUrl",{"type":46,"value":8426}," is required for external payment methods",{"type":46,"value":8428}," — Apple Pay, Google Pay, PayPal redirects fail without it.",{"type":40,"tag":6298,"props":8430,"children":8431},{},[8432,8437,8439,8445,8447,8453],{"type":40,"tag":783,"props":8433,"children":8434},{},[8435],{"type":46,"value":8436},"Webhook secret must be base64-encoded",{"type":46,"value":8438}," — Pass ",{"type":40,"tag":101,"props":8440,"children":8442},{"className":8441},[],[8443],{"type":46,"value":8444},"btoa(process.env.WHOP_WEBHOOK_SECRET)",{"type":46,"value":8446}," to SDK's ",{"type":40,"tag":101,"props":8448,"children":8450},{"className":8449},[],[8451],{"type":46,"value":8452},"webhookKey",{"type":46,"value":407},{"type":40,"tag":6298,"props":8455,"children":8456},{},[8457,8462,8464,8470],{"type":40,"tag":783,"props":8458,"children":8459},{},[8460],{"type":46,"value":8461},"Return 2xx quickly from webhooks",{"type":46,"value":8463}," — Whop retries on timeout. Use ",{"type":40,"tag":101,"props":8465,"children":8467},{"className":8466},[],[8468],{"type":46,"value":8469},"waitUntil()",{"type":46,"value":8471}," or background jobs for heavy processing.",{"type":40,"tag":6298,"props":8473,"children":8474},{},[8475,8480],{"type":40,"tag":783,"props":8476,"children":8477},{},[8478],{"type":46,"value":8479},"Access tokens expire",{"type":46,"value":8481}," — Default 1 hour, max 3 hours. Refresh before expiry for embedded components.",{"type":40,"tag":6298,"props":8483,"children":8484},{},[8485,8490,8492,8498],{"type":40,"tag":783,"props":8486,"children":8487},{},[8488],{"type":46,"value":8489},"Company metadata SDK typing gap",{"type":46,"value":8491}," — Update metadata via type cast: ",{"type":40,"tag":101,"props":8493,"children":8495},{"className":8494},[],[8496],{"type":46,"value":8497},"(client.companies as any).update(id, { metadata })",{"type":46,"value":407},{"type":40,"tag":6298,"props":8500,"children":8501},{},[8502,8507,8509,8515],{"type":40,"tag":783,"props":8503,"children":8504},{},[8505],{"type":46,"value":8506},"SDK init without appID is valid",{"type":46,"value":8508}," — Company API Keys don't need ",{"type":40,"tag":101,"props":8510,"children":8512},{"className":8511},[],[8513],{"type":46,"value":8514},"appID",{"type":46,"value":407},{"type":40,"tag":6298,"props":8517,"children":8518},{},[8519,8538],{"type":40,"tag":783,"props":8520,"children":8521},{},[8522,8524,8530,8532],{"type":46,"value":8523},"Checkout config response includes ",{"type":40,"tag":101,"props":8525,"children":8527},{"className":8526},[],[8528],{"type":46,"value":8529},"purchase_url",{"type":46,"value":8531}," and ",{"type":40,"tag":101,"props":8533,"children":8535},{"className":8534},[],[8536],{"type":46,"value":8537},"plan.id",{"type":46,"value":8539}," — Use these for redirect flows or plan references.",{"type":40,"tag":6298,"props":8541,"children":8542},{},[8543,8548,8549,8555],{"type":40,"tag":783,"props":8544,"children":8545},{},[8546],{"type":46,"value":8547},"Sandbox checkout URL",{"type":46,"value":8314},{"type":40,"tag":101,"props":8550,"children":8552},{"className":8551},[],[8553],{"type":46,"value":8554},"https:\u002F\u002Fsandbox.whop.com\u002Fcheckout\u002F{planId}",{"type":46,"value":407},{"type":40,"tag":6298,"props":8557,"children":8558},{},[8559,8568,8570,8576],{"type":40,"tag":783,"props":8560,"children":8561},{},[8562],{"type":40,"tag":101,"props":8563,"children":8565},{"className":8564},[],[8566],{"type":46,"value":8567},"setupFutureUsage: \"off_session\"",{"type":46,"value":8569}," — Required on checkout embed when you plan to charge the user later via ",{"type":40,"tag":101,"props":8571,"children":8573},{"className":8572},[],[8574],{"type":46,"value":8575},"chargeUser",{"type":46,"value":8577}," API.",{"type":40,"tag":6298,"props":8579,"children":8580},{},[8581,8586,8588,8594],{"type":40,"tag":783,"props":8582,"children":8583},{},[8584],{"type":46,"value":8585},"Permission re-approval",{"type":46,"value":8587}," — After adding new app permissions, API calls fail with ",{"type":40,"tag":101,"props":8589,"children":8591},{"className":8590},[],[8592],{"type":46,"value":8593},"403",{"type":46,"value":8595}," until the company re-approves.",{"type":40,"tag":6298,"props":8597,"children":8598},{},[8599,8604],{"type":40,"tag":783,"props":8600,"children":8601},{},[8602],{"type":46,"value":8603},"Always use idempotence keys",{"type":46,"value":8605}," — On transfers and any money-movement operation to prevent duplicates.",{"type":40,"tag":6298,"props":8607,"children":8608},{},[8609,8614,8616,8622],{"type":40,"tag":783,"props":8610,"children":8611},{},[8612],{"type":46,"value":8613},"Payout methods pagination duplicates",{"type":46,"value":8615}," — Payout methods list may return duplicates during pagination — deduplicate by ",{"type":40,"tag":101,"props":8617,"children":8619},{"className":8618},[],[8620],{"type":46,"value":8621},".id",{"type":46,"value":8623}," when consuming the full list.",{"type":40,"tag":6298,"props":8625,"children":8626},{},[8627,8632],{"type":40,"tag":783,"props":8628,"children":8629},{},[8630],{"type":46,"value":8631},"Auto-withdraw after transfer",{"type":46,"value":8633}," — After approving a transfer, consider auto-initiating a withdrawal to the recipient's default payout method so they don't have to manually withdraw. Note: transfers use cents, withdrawals use dollars.",{"type":40,"tag":55,"props":8635,"children":8637},{"id":8636},"_13-permissions-system",[8638],{"type":46,"value":8639},"13. Permissions System",{"type":40,"tag":49,"props":8641,"children":8642},{},[8643],{"type":46,"value":8644},"Apps must request permissions before accessing company data. Each API endpoint has required scopes.",{"type":40,"tag":49,"props":8646,"children":8647},{},[8648,8652],{"type":40,"tag":783,"props":8649,"children":8650},{},[8651],{"type":46,"value":7356},{"type":46,"value":8653}," Dashboard > Developer > App > Permissions tab > Add permissions with justification > Install app > Approve.",{"type":40,"tag":49,"props":8655,"children":8656},{},[8657,8659,8664],{"type":46,"value":8658},"When updating permissions, creators see a \"Re-approve\" button. Handle ",{"type":40,"tag":101,"props":8660,"children":8662},{"className":8661},[],[8663],{"type":46,"value":8593},{"type":46,"value":8665}," errors gracefully until re-approved.",{"type":40,"tag":55,"props":8667,"children":8669},{"id":8668},"_14-mcp-server-access",[8670],{"type":46,"value":8671},"14. MCP Server Access",{"type":40,"tag":62,"props":8673,"children":8674},{},[8675,8691],{"type":40,"tag":66,"props":8676,"children":8677},{},[8678],{"type":40,"tag":70,"props":8679,"children":8680},{},[8681,8686],{"type":40,"tag":74,"props":8682,"children":8683},{},[8684],{"type":46,"value":8685},"Transport",{"type":40,"tag":74,"props":8687,"children":8688},{},[8689],{"type":46,"value":8690},"URL",{"type":40,"tag":90,"props":8692,"children":8693},{},[8694,8711,8728],{"type":40,"tag":70,"props":8695,"children":8696},{},[8697,8702],{"type":40,"tag":97,"props":8698,"children":8699},{},[8700],{"type":46,"value":8701},"HTTP Streaming (Cursor)",{"type":40,"tag":97,"props":8703,"children":8704},{},[8705],{"type":40,"tag":101,"props":8706,"children":8708},{"className":8707},[],[8709],{"type":46,"value":8710},"https:\u002F\u002Fmcp.whop.com\u002Fmcp",{"type":40,"tag":70,"props":8712,"children":8713},{},[8714,8719],{"type":40,"tag":97,"props":8715,"children":8716},{},[8717],{"type":46,"value":8718},"SSE (Claude)",{"type":40,"tag":97,"props":8720,"children":8721},{},[8722],{"type":40,"tag":101,"props":8723,"children":8725},{"className":8724},[],[8726],{"type":46,"value":8727},"https:\u002F\u002Fmcp.whop.com\u002Fsse",{"type":40,"tag":70,"props":8729,"children":8730},{},[8731,8736],{"type":40,"tag":97,"props":8732,"children":8733},{},[8734],{"type":46,"value":8735},"Docs MCP",{"type":40,"tag":97,"props":8737,"children":8738},{},[8739],{"type":40,"tag":101,"props":8740,"children":8742},{"className":8741},[],[8743],{"type":46,"value":8744},"https:\u002F\u002Fdocs.whop.com\u002Fmcp",{"type":40,"tag":55,"props":8746,"children":8748},{"id":8747},"_15-reference-files",[8749],{"type":46,"value":8750},"15. Reference Files",{"type":40,"tag":62,"props":8752,"children":8753},{},[8754,8770],{"type":40,"tag":66,"props":8755,"children":8756},{},[8757],{"type":40,"tag":70,"props":8758,"children":8759},{},[8760,8765],{"type":40,"tag":74,"props":8761,"children":8762},{},[8763],{"type":46,"value":8764},"File",{"type":40,"tag":74,"props":8766,"children":8767},{},[8768],{"type":46,"value":8769},"Contents",{"type":40,"tag":90,"props":8771,"children":8772},{},[8773,8789,8805,8821,8838,8854],{"type":40,"tag":70,"props":8774,"children":8775},{},[8776,8784],{"type":40,"tag":97,"props":8777,"children":8778},{},[8779],{"type":40,"tag":101,"props":8780,"children":8782},{"className":8781},[],[8783],{"type":46,"value":5348},{"type":40,"tag":97,"props":8785,"children":8786},{},[8787],{"type":46,"value":8788},"Full prop reference, programmatic controls, Vanilla JS, sandbox, Apple Pay",{"type":40,"tag":70,"props":8790,"children":8791},{},[8792,8800],{"type":40,"tag":97,"props":8793,"children":8794},{},[8795],{"type":40,"tag":101,"props":8796,"children":8798},{"className":8797},[],[8799],{"type":46,"value":7340},{"type":40,"tag":97,"props":8801,"children":8802},{},[8803],{"type":46,"value":8804},"Embedded wallet components, hosted payouts, account links, playground",{"type":40,"tag":70,"props":8806,"children":8807},{},[8808,8816],{"type":40,"tag":97,"props":8809,"children":8810},{},[8811],{"type":40,"tag":101,"props":8812,"children":8814},{"className":8813},[],[8815],{"type":46,"value":8293},{"type":40,"tag":97,"props":8817,"children":8818},{},[8819],{"type":46,"value":8820},"Chat SDK for React, Vanilla JS, Swift with full examples",{"type":40,"tag":70,"props":8822,"children":8823},{},[8824,8833],{"type":40,"tag":97,"props":8825,"children":8826},{},[8827],{"type":40,"tag":101,"props":8828,"children":8830},{"className":8829},[],[8831],{"type":46,"value":8832},"references\u002Fapi-reference.md",{"type":40,"tag":97,"props":8834,"children":8835},{},[8836],{"type":46,"value":8837},"SDK initialization, key endpoints, MCP server setup",{"type":40,"tag":70,"props":8839,"children":8840},{},[8841,8849],{"type":40,"tag":97,"props":8842,"children":8843},{},[8844],{"type":40,"tag":101,"props":8845,"children":8847},{"className":8846},[],[8848],{"type":46,"value":8034},{"type":40,"tag":97,"props":8850,"children":8851},{},[8852],{"type":46,"value":8853},"Webhook events, validation, company vs app webhooks",{"type":40,"tag":70,"props":8855,"children":8856},{},[8857,8866],{"type":40,"tag":97,"props":8858,"children":8859},{},[8860],{"type":40,"tag":101,"props":8861,"children":8863},{"className":8862},[],[8864],{"type":46,"value":8865},"codebase-scan.md",{"type":40,"tag":97,"props":8867,"children":8868},{},[8869],{"type":46,"value":8870},"Prompt to analyze a client's codebase for Whop integration planning",{"type":40,"tag":8872,"props":8873,"children":8874},"style",{},[8875],{"type":46,"value":8876},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":8878,"total":24},[8879],{"slug":4,"name":4,"fn":5,"description":6,"org":8880,"tags":8881,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[8882,8883,8884,8885],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"items":8887,"total":24},[8888],{"slug":4,"name":4,"fn":5,"description":6,"org":8889,"tags":8890,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[8891,8892,8893,8894],{"name":18,"slug":19,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16}]