The flow
One Worker sits between Whop and everything downstream. It knows what was bought at the moment of the charge, so nothing after it has to guess.
payment.succeededTier, cart, funnel, affiliate cookie and all five UTMs were stamped on before the charge.POST /contacts/{id}/workflow/{id}. A bumped cart enters two — base tier and upgrade.GHL workflows no longer decide anything about the purchase.
They branched on order amount to work out the tier. There is no GHL order now, so those branches read nothing. Emails, SMS, waits and tag conditions all stay — they just stop guessing.
Affiliates
Sales reach FirstPromoter directly from the Worker. Eight GHL workflows are gone.
Capture
- FirstPromoter's tracking script is in the funnel head code and sets
_fprom_tid/_fprom_refongo.theuncommonbusiness.co. - The checkout block reads those cookies at load and sends them with the payment, so they arrive as Whop payment metadata and are reported with the sale.
- Cookies first,
?fpr=as fallback: the parameter only exists on the landing hop and is gone by the time most buyers reach checkout. - Same origin throughout, so the read works — provided FirstPromoter does not set those cookies
HttpOnly. Nothing can read an HttpOnly cookie from a page script. The live payment test is what proves this end to end, and it is the single most important thing that test checks.
Plan strings the Worker sends
FirstPromoter's plan is free text, not an ID: whatever string we POST has to already exist in FirstPromoter with a reward rate on it, or the sale lands against the promoter at no commission. The Worker now sends your strings, from the First Promoter Product column of the Price Points database — not an invented set.
| Sold as | plan string | In FirstPromoter |
|---|---|---|
| Early Bird $47 | bc_eb_47 | yes |
| General Admission $97 | bc_reg_97 | yes |
| VIP $197 | bc_vip_197 | yes |
| VIP $297 after Sep 20 | bc_vip_297 | yes |
| Platinum $397 | bc_platinum_397 | yes |
| Early Bird → VIP $150 | bc_ebvip_150 | yes |
| GA → VIP $100 | bc_vip_100 | yes |
| GA → VIP $200 after Sep 20 | bc_vip_200 | yes |
| Early Bird → VIP $250 after Sep 20 | bc_ebvip_250 | confirm |
| Early Bird → Platinum $350 | bc_ebplat_350 | confirm |
| GA → Platinum $300 | bc_gaplat_300 | confirm |
| VIP $197 → Platinum $200 | bc_vipplat_200 | confirm |
| VIP $297 → Platinum $100 | bc_vipplat_100 | confirm |
These thirteen strings are exactly what the Worker sends — verified in the code, not copied from a doc. The eight marked yes were matched against your Price Points database on 15 Aug.
The five marked confirm have never had affiliate tracking under any setup — no Price Points row, no GHL workflow, no FirstPromoter plan — and nobody has confirmed since whether they were created. Only Lisa can check. If a string does not exist in FirstPromoter the sale still lands against the promoter, but at no commission and with no error anywhere. Every bootcamp row in Price Points sets commission equal to price, so unless someone says otherwise these five should be 100% too.
Do not reuse bc_vip_200 or bc_vip_100 for the Platinum upgrades
- Those two are your GA→VIP upgrades. VIP→Platinum happens to cost $200 and $100 as well.
- Reusing them pays the right amount and reports the wrong product — every Platinum upgrade would show up as a VIP one, and nobody would notice until the numbers were queried.
The price is in the string on purpose. FirstPromoter sets reward rates per plan, so a price change has to be a distinct plan or the commission silently follows the old rate — which is why the Sep 20 step-ups get their own entries rather than inheriting.
On a cart with an order bump the bump wins: one payment reports one plan, and it is the upgrade rung, because that is the rung the commission is owed on.
Rules that are live now
- A comped seat pays no commission. A 100%-off code collects $0, and $0 sends nothing to FirstPromoter. TUB's call, 16 Aug. A partial discount reports what was actually collected, not list price.
- A retry cannot pay twice. Every sale carries the Whop payment ID as
event_id, which is how FirstPromoter dedupes. - On a bumped cart the bump wins. One payment reports one plan string, and it is the upgrade rung — the rung the commission is owed on.
Still open — refunds
- A refund in Whop is not fed back to FirstPromoter. The commission stays on the promoter's report until Lisa removes it by hand.
- Raised 18 Aug and unresolved. Either a refund webhook posts the reversal, or Lisa needs a Slack notification on every refund of a referred sale.
The affiliate tag
The Worker applies aieb-fall26_affiliate to the contact whenever the buyer arrived through a promoter link. This is the tag the old FirstPromoter BID is not empty branch used to apply, and it is applied on exactly the same condition the Worker uses to decide the sale is a referral — so the tag and the FirstPromoter POST can never disagree about whether one happened.
One difference from the old branch, deliberately: it fires on the tracking cookie or the ?fpr= parameter, not the cookie alone. A buyer who lands on a promoter link before the cookie is set is still an affiliate sale, and that is the case that used to disappear without trace.
Your side Tracking is on every funnel already and carries to checkout. Outstanding: the plan strings above, and add the bootcamp link to the promoter signup so promoters have one to share.
Attribution
Organic, ads and tripwire are one attribute on the page. No logic to build.
- Each block declares
data-funnel="organic" | "ads" | "tripwire". It rides the payment; the Worker turns it into a tag. - New funnel page = copy the block, change
data-tieranddata-funnel. Nothing else. - Declared, not inferred, because two bootcamp funnels share one page URL.
- The exact page slug also lands in
aieb_page, so GHL conditions can target one ad page without a code change. - Tripwire is a real third value. GHL only ever wired ads and organic.
- Confirmed 16 Aug:
/bootcamp-2026is the organic funnel,/ads-bootcamp-2026is paid. Only organic has to be live for Monday.
An upgrade never overwrites where the original sale came from.
What was there before. Every workflow ran an Ads / Organic / Tripwire block that read GHL's Funnel field and applied _organic or _ads. It ran on upgrade workflows too. So a buyer who came in through an ad and later upgraded on a page sitting in the organic funnel was re-tagged organic, and the ad lost the credit for a sale it had made.
What happens now. The Worker applies the funnel tag on a first purchase only, and skips it entirely when the offer is an upgrade. The original source survives. The upgrade is still fully recorded — aieb_page holds the exact page it was bought on, and the tier and path tags mark it as an upgrade — it just does not touch the attribution set on the first sale.
GHL changes
Tier workflows stay separate, one per tier. Each loses its payment trigger and its price branching, and keeps everything that speaks to the buyer.
The live set is the folder The AI Employee Bootcamp — WHOP: 1 — General Admission (Early Bird + GA), 2 - VIP, 2a — VIP upgrade, 3 - Platinum, 3a - Platinum upgrade, plus 4 - Bounce Email. All five are published and the Worker enters them by ID. The originals are untouched, kept only so the old build can be read side by side — sending a Whop buyer into one would re-run branches that read a GHL order amount that no longer exists.
Remove
- Every Payment received trigger — keys on a GHL order that no longer exists
- The price branch block and its tag nodes
- Ads / Organic / Tripwire, its three branches and two tag nodes
- The duplicate n8n webhook — keep one, on the main line
- Any Go to that only existed to rejoin a deleted branch
Keep
- Aevent, disable DND, the waits, Wisernotify
- Every SMS and email, and add-to-WF4
- The email-opened branch — engagement, not purchase
- Any branch reading a tag, prior purchase or contact state
- WF3's 180 / 195 Platinum seat notifications
Rule for anything ambiguous
Branch reads Amount, Workflow trigger or Funnel → delete. The Worker knows, and the branch now reads a value that never arrives.
Branch reads tags, prior purchases or email opens → keep. That is contact state and still works.
One addition per workflow: the n8n webhook's custom data gains whop_payment_id. It replaces ghl_order_id as the dedupe key and is the same value Supabase stores as processor_ref.
One exception: the Is Free? branch
- It reads Amount, so the rule says delete — but its output,
aieb-fall26_free, is how a free seat is identified downstream. The Worker now writes that tag itself at charge time, so the branch can go; what is still open is the$0GHL comp form, which never reaches Whop and so never reaches the Worker. - Unresolved until we know which route free seats take — a 100%-off Whop code is handled and tags the buyer; the $0 GHL comp form never reaches Whop, so it reaches nothing.
Fields & tags
Written to the contact on every purchase, before any workflow runs.
| Field | Holds |
|---|---|
| whop_payment_id | The Whop payment. The join key across GHL, n8n, Supabase and FirstPromoter. |
| aieb_tier | ga · vip · platinum |
| aieb_offer | The exact rung, e.g. ga-to-platinum |
| aieb_funnel | organic · ads · tripwire |
| aieb_page | The page slug they checked out on |
| aieb_cohort | fall26 |
| promo_code | The code the buyer entered, if any. Stamped on the payment so a free seat is explicable by which code, not just by the amount being zero. |
| fp_plan | FirstPromoter plan string, for plan-level reward rates |
| fp_amount_cents | Sale amount in cents, stamped at charge time |
| firstpromoter_bid | Referral tracking ID, when there is one |
| utm_source … utm_term | All five, carried from the landing page |
The tier map
Every rung that sells, what it costs, and the tags it leaves behind. This is the whole ladder — there is nothing else to sell.
General Admission
- Early Bird — $47 to 13 Sep →
_eb - General Admission — $97 13 Sep → close →
_ga
Nothing upgrades into GA. It is where almost everyone starts.
VIP
- VIP — $197 to 20 Sep
- VIP — $297 20 Sep → close
- EB → VIP — $150, then $250 after 20 Sep
- GA → VIP — $100, then $200 after 20 Sep
An upgrade adds the VIP tags and keeps the tag from the tier they started on.
Platinum
- Platinum — $397 all launch
- EB → Platinum — $350
- GA → Platinum — $300
- VIP → Platinum — $200
No seat cap — dropped 16 Aug rather than enforced. The VIP $297 → Platinum $100 rung is not built; nothing sells it before 20 Sep.
Tags that go on top
Hub gating reads the entitlement; the dashboard reads the trail. Prices, windows and plan IDs live in worker/src/plans.js — that file is the source, this map is the summary.
Checkout map
data-tier and data-funnel are the only two things that differ between one checkout and the next.
AI Employee Bootcamp — main funnel
| Page | Sells | data-tier | data-funnel |
|---|---|---|---|
| /general-admission-2026 | Early Bird $47 + 2 bumps | eb-ga,ga | organic |
| /vip-admission-2026 | VIP $197 + Platinum bump | vip | organic |
| /platinum-admission-2026 | Platinum $397 | platinum | organic |
| /vip-admission-upgrade | EB → VIP $150 | eb-ga-to-vip | organic |
| /platinum-admission-upgrade | EB → Platinum $350 | eb-ga-to-platinum | organic |
| /vip-platinum-admission-upgrade | VIP → Platinum $200 | vip197-to-platinum | organic |
| /bootcamp-2026-confirmation | Receipt block | — | — |
AI Employee Bootcamp Ads — rebuilt 15 Aug, new slugs
| Page | Sells | data-tier | data-funnel |
|---|---|---|---|
| /general-admission-2026-5280 | Early Bird $47 + 2 bumps | eb-ga,ga | ads |
| /vip-admission-2026-9281 | VIP $197 + Platinum bump | vip | ads |
| /platinum-admission-2026-9922 | Platinum $397 | platinum | ads |
| /vip-upgrade-eb-5042 | EB → VIP $150 | eb-ga-to-vip | ads |
| /vip-upgrade-g-2170 | GA → VIP $100 | ga-to-vip | ads |
| /bootcamp-2026-confirmation-2847 | Receipt block | — | — |
Source: live GHL funnel pull, 15 Aug 2026, 15:10 ET.
Two things to watch
Two ads funnels exist
- AI Employee Bootcamp Ads is the live one, rebuilt 15 Aug. 2026 - Bootcamp - ads has not been touched since May and still carries
/general-admission-2026-ads-checkout. Anything pointing at the old slugs is pointing at the wrong funnel.
Newsletter, advertorial, extended enrollment
- Still on the old checkout, so they sell nothing until a block is pasted. That is the tripwire route.
Pasted once, never again.
A page holds two lines — a <div> with its tier and funnel, and a script tag. Fields, bumps, summary, payment element, terms and button are all served by the Worker.
Wording and styling change in worker/src/copy.js, one wrangler deploy, all twelve checkouts at once. Prices, the terms link and the confirmation URL were already dynamic — all three changed today without touching a page.
The GHL page still owns the headline, body copy and images. Those stay editable in the page editor.
Editing the checkout
A checkout page holds two lines. Everything inside the block is served from one place, so a wording or styling change is one edit and one deploy — never twelve pages re-pasted.
What a page contains
| On the page | What it is |
|---|---|
| <div id="aieb-checkout" data-tier="…" data-funnel="…"> | Empty. Says which offer this page sells and which funnel it belongs to. The only thing that differs page to page. |
| <script src="…/embed.js" async> | Renders the whole block into that div: fields, bumps, order summary, payment element, terms, button, styling. |
Who edits what
Your team, in GHL — no deploy
- Headline, body copy, images, layout — everything around the block, edited in the page editor exactly as before
- Per-page wording overrides on the div:
data-cta,data-title,data-legend-order,data-legend-pay,data-terms-label,data-secure-note - Hide promo entry on one page with
data-promo="off". Hidden means not rendered — there is no field to type into and no code is sent.
Whop side — one deploy, all pages
- Wording inside the block, and the block's styling —
worker/src/copy.js - Hide promo entry on every page —
showPromo: falseincopy.js - Product names and bump labels —
worker/src/catalog.js - Prices, sale windows, plan IDs —
worker/src/plans.js
Three things were never on the page to begin with.
Prices, the terms link and the confirmation URL are all fetched from the Worker when the block loads. That is why the 13 Sep and 20 Sep price steps need no page edits at all, and why the terms link and confirmation URL both changed on 15 Aug without anyone opening a funnel.
Links
| What | Where |
|---|---|
| GHL workflows — the Whop set | The AI Employee Bootcamp — WHOP — all five rebuilt workflows plus WF4 |
| Main funnel | go.theuncommonbusiness.co/bootcamp-2026 — AI Employee Bootcamp, the one live on Monday |
| Ads funnel | go.theuncommonbusiness.co/ads-bootcamp-2026 — checkouts not swapped yet, due end of next week |
| Organic funnel — second | — to be confirmed |
| Tripwire funnel | — none named yet. The Worker supports the value the day a page declares it. |
| Cloudflare | dash.cloudflare.com — account Hello@theuncommonbusiness.co |
| Code | github.com/The-Uncommon-Business/aieb-checkout — private. Send GitHub usernames to be added as collaborators. |
Where it runs
Everything is on your own Cloudflare account — Hello@theuncommonbusiness.co, account 81ac8dfc3cfa5c403247c595aef3db16. Nothing is hosted by Whop, so it stays yours at handover.
| Thing | Name | What it does |
|---|---|---|
| Worker | aieb-fall26-checkout | Serves embed.js and receipt.js, prices every cart, creates the payment, receives the Whop webhook, writes to GHL and FirstPromoter |
| Pages | aieb-fall26-handoff | This document |
Getting to it: dash.cloudflare.com → Compute (Workers) → aieb-fall26-checkout. Login credentials live in your password manager, never on this page.
What the dashboard gives you
- Logs — live request stream. Every payment, webhook and error as it happens.
- Deployments — every version, timestamped. One click rolls back to any earlier one, which is the fastest fix if something ships broken.
- Metrics — requests, errors, CPU time.
- Settings → Variables — the names of the stored secrets. Values are write-only and cannot be read back, by anyone.
What it does not give you
- Editing the checkout. Wording and styling live in the repo, not the dashboard — changing them means an edit plus
wrangler deploy, which is a different credential from the Cloudflare login. - Cloudflare access is for watching and rolling back. Changing is a code change.
Source
github.com/The-Uncommon-Business/aieb-checkout — private. Send the GitHub usernames who need it and they will be added as collaborators.
Everything is in there: the Worker, the generated checkout blocks, the GHL inventory scripts and this document. No secrets — env/.env is gitignored and the Worker's credentials are stored in Cloudflare, write-only.
Deploying a change
| Step | Command |
|---|---|
| 1. Check | node scripts/check-embed.mjs — compiles the exact script the browser will receive |
| 2. Deploy | cd worker && npx wrangler deploy |
| 3. Confirm | node scripts/check-embed.mjs --live — checks what production is now serving |
Step 1 is not optional. embed.js is generated, so the source file can be valid while the string it produces is not — that took every checkout down silently on 15 Aug, with a blank space where the form should be and nothing in the console.
Running it yourselves
Added 24 Aug at Lex's ask. Who owns what, which jobs need a deploy and which do not, and how to drive the repo with Claude without taking the cart down.
Who owns what
| Person | Owns | Works in |
|---|---|---|
| Lex | Ops lead. Offers, prices and launch calls — anything that changes what a buyer pays goes through her. | GHL, Whop dashboard |
| Scott | The repo, the deploy, and the Supabase feed (a separate Whop webhook straight to Railway). The only person who ships to production. | GitHub, Cloudflare, Supabase |
| Abs | Promo codes, new products, domain and email verification, page content, customer look-ups. | Whop dashboard, GHL |
| Nikhil | GHL workflows, funnel pages, pixels and tracking, confirmation-page routing, split tests. | GHL |
| Lisa | Affiliates end to end: FirstPromoter campaigns, promoter links, plan strings, commission rates. | FirstPromoter |
| Chris | The money: payouts, sales tax categories, billing descriptor, processor connections, the Stripe → Whop migration audit. | Whop dashboard |
| Nick | Checkout and order-bump copy. | Slack → whoever holds the repo |
| Parisa, Ari, Madeline | Whop side: worker changes, platform bugs, account settings, migration support. | Whop, this repo |
Anyone not on this list has no system ownership recorded — say so and it gets added. Philip was named on the 14 Aug kickoff as the most dev-forward of the team and has not been in a thread since; if he is the one taking the repo, he needs the GitHub and Claude setup below.
Does this job need a deploy?
Most of the bottleneck is this question being unanswered. Almost nothing your team wants to do needs code.
| Job | Who | Where | Deploy? |
|---|---|---|---|
| Create a promo code | Abs | Whop dashboard | No |
| Limit that code to one tier | Abs asks → repo | worker/src/routes.js | Yes |
| Refund, cancel or look up a payment | Abs, Chris | Whop dashboard | No |
| Headline, images, body copy around the checkout | Nikhil, Abs | GHL page editor | No |
| A new funnel page selling a tier that already exists | Nikhil | GHL — copy the two lines, change data-tier / data-funnel | No |
| Emails, SMS, waits and tag conditions inside a workflow | Nikhil | GHL | No |
| Roll back a checkout that just broke | Anyone with the Cloudflare login | Cloudflare → Deployments | No — one click |
| Wording inside the checkout block, button text, secure note | repo | worker/src/copy.js | Yes |
| A price, a sale window, a new plan | repo | worker/src/plans.js | Yes |
| Have a purchase enter a new GHL workflow | repo | worker/src/index.js | Yes |
| A new product with its own checkout | Abs, or repo | Depends — see the runbook below | Sometimes |
Set up once
Everyone
- Whop dashboard. Chris or Lex invites you. Ask for the Operations role; ask for the Developer tab as well if you need to see webhooks.
- Cloudflare. Shared login
hello@theuncommonbusiness.co, in your password manager. Read the logs, roll a deploy back. Nothing here edits the checkout. - The ops channel. Where a new promo code or a new workflow ID gets posted. Skipping it is how a $397 seat went to $0 three times.
Only if you touch the repo
- A GitHub account, added to the
The-Uncommon-Businessorg by Scott. - Claude Code, signed in.
- The GitHub CLI, so Claude can open pull requests as you.
- Nobody needs this to create a coupon, refund a customer or edit a funnel page.
Claude, connected to the repo
Five commands, once. After this Claude can read every file in the worker, explain what a change would do, make it, and open a pull request — all from the folder on your machine.
| Step | What you do |
|---|---|
| 1. GitHub | Create an account, send Scott the username, get added to The-Uncommon-Business. |
| 2. Install Claude | npm install -g @anthropic-ai/claude-code, then run claude and /login. |
| 3. Install the GitHub CLI | brew install gh on a Mac, then gh auth login → GitHub.com → HTTPS → log in with a browser. This is the "connect Claude to GitHub" step — Claude uses that same login to push and to open PRs. |
| 4. Get the code | gh repo clone The-Uncommon-Business/aieb-checkout, then cd aieb-checkout. |
| 5. Start | claude, then ask: "Read README.md and CHECKLIST.md and tell me what this repo does." Everything it needs to know about the checkout is in the repo. |
For reporting rather than code, the Whop MCP connected to Claude will pull custom reports out of the account — payments, refunds, payouts — without anyone writing a query. It is being rebuilt on the Whop side, so check one number against the dashboard before a figure goes into a deck.
Asking Claude for the right thing
Works
- "Add
esgatoPROMO_TIERSas GA-only, runnode scripts/check-worker-invariants.mjs, and open a PR." - "The VIP price steps to $297 on 20 Sep. Show me exactly which lines in
plans.jschange, then open a PR. Do not deploy." - "Read
worker/src/index.jsand tell me which GHL workflows a VIP cart with the Platinum bump enters." - "Why did this checkout not tag the contact? Here is the payment ID."
Do not
- "Deploy this." Deploys are a GitHub Actions run Scott triggers. A laptop deploy is what reverted the launch fixes on 17 Aug.
- "Push straight to main." Every change goes through a pull request so the two checks run.
- Paste a secret into a prompt. The worker's credentials live in Cloudflare, write-only, and are not in the repo.
- Change GHL and the worker in one go. One system per change, so a rollback is one action.
Runbook — a coupon code
Abs. Steps 1–3 are yours alone and need nobody. Step 4 is the one that gets missed.
Creating one
- Whop dashboard → create the codePercentage or flat amount, and an expiry. Tick one per customer if it should be.
- Scope it to the product, never to plansWe charge an inline plan minted per payment, so a plan-scoped code matches nothing a buyer ever buys and Whop refuses it at the charge: "This promo code cannot be used on this pricing option." Product scope works. Unscoped works.
- Leave "new users only" and "existing memberships only" untickedThe checkout validates the code before charging and cannot see those conditions, so the code shows as applied, the summary shows the discount, and it dies at the till.
- Post the code and the tier it is for in the ops channelA code the worker has not been told about works on every tier — including a $397 Platinum seat at $0. This has happened three times: AFFVIP, then ESGA and ESVIP six hours after it was fixed. Nothing in the dashboard prompts for a tier, and Whop cannot express one for us, so the restriction can only live in the worker.
- One line, then a deployThe code and its tiers go into
PROMO_TIERSinworker/src/routes.js; Scott merges and deploys. Until it deploys, delete the code — a deleted code is refused instantly and needs no deploy. Deleting archives rather than erases, so you can recreate it exactly.
Three gotchas that have each cost an afternoon
- Percentage is a plain number.
100means 100% off;1means one percent off, not 100%. - A bare expiry date is read in European time.
2026-10-07becomes 6 Oct 22:00 UTC — seven hours early. Give a full date and time. - There is no edit. Changing a code means deleting and recreating it, which is why codes accumulate archived duplicates. Harmless; the live one is always the one used.
Runbook — a new product and its checkout
Abs, with Lex. One question decides the route: does the purchase have to reach GHL?
Money only — no code, ten minutes
- Whop dashboard → product → plan → checkout link → set the redirect to your thank-you page. Paste the link on the button.
- Right for a standalone ticket, a deposit, an ad-hoc invoice.
- What you give up: nothing lands in GHL — no fields, no tags, no workflow, no FirstPromoter commission — and the buyer's email comes from their Whop account rather than your form, which quietly creates a second GHL contact.
Part of the machine — needs a deploy
- The checkout block, exactly like the bootcamp: two lines on the page, everything else served by the worker.
- Needs plans, a catalog entry and a deploy. Roughly half a day once the page exists and whoever builds it can see the page's code.
- The middle path: a checkout link created through the API can carry metadata and a redirect — the dashboard simply does not show that field. That is how a hosted checkout can still land in GHL.
Runbook — purchase → tag → workflow
Nikhil. The worker writes 17 fields and the whole tag set onto the contact before any workflow runs, so nothing downstream has to work out what was bought.
| You want | Do this |
|---|---|
| A workflow to fire on a purchase | Trigger on the tag — aieb-fall26_purchased_vip and the rest, listed under Fields & tags. Never trigger on Payment received: there is no GHL order any more, so it fires for nobody. |
| A branch on tier, funnel or page | Read the field — aieb_tier, aieb_funnel, aieb_page. Never branch on amount. |
| A purchase to enter a new workflow | Send the workflow ID. The worker enters workflows by ID — one line each. |
| A new field written at purchase | Create the custom field in GHL first. Unrecognised keys are dropped silently on upsert with no error — that is why five fields flagged on 14 Aug still are not landing. |
Deploying — the only sanctioned path
This supersedes the local wrangler deploy in Editing the checkout above. A laptop deploy from stale source is exactly what reverted the 3-D Secure and Apple Pay fixes on 17 Aug, twenty-five minutes after they went in.
mainBoth checks run automatically on every PR: the embed compiles as the browser will receive it, and the launch-QC fixes are still present.deploy to confirm. Manual on purpose — merging never ships anything by itself.If something ships broken: Cloudflare → Compute (Workers) → aieb-fall26-checkout → Deployments → roll back to the previous version. One click, no code, faster than any fix.
Three rules that are not negotiable
- Never deploy from a laptop. The Actions run is the only path that checks anything.
- A dashboard promo code is live on every tier until the worker says otherwise. Post it in the channel the moment you make it.
- The Whop payments bundle we load is unpinned, so an upstream change can alter the checkout with no deploy from anyone. That is what took the cart down on 23 Aug — found and fixed the same afternoon. If checkouts break and nobody shipped, check that first.
Supabase
Scott's own Whop webhook writes the purchase into Postgres from Railway. It subscribes to Whop directly, so nothing of ours sits between — and it keeps recording sales even if our Worker does not.
- That keeps
salesprivate — reaching it over the API would have meant exposing all 17 tables for one insert. - Rows land as
processor = 'whop',processor_ref= the Whop payment ID — the same shape as the 25,000 GHL rows, so reporting spans both.
One payment can hold two products
A plan is one product at one price — that never changes. But an order bump is one payment carrying two of them: Early Bird $47 plus the VIP upgrade $150, charged once as $197.
Whop's payments API takes a single plan with a single price and has no line-item array, so the parts cannot be expressed as plan IDs on the charge itself. They ride in the payment metadata instead, as three parallel comma-separated lists in line order, base first:
| Metadata key | Example — Early Bird with the VIP bump |
|---|---|
| plan_ids | plan_NWlCLuu4NotNr,plan_GzR4MwQNIv42l |
| plan_keys | eb-ga,eb-ga-to-vip |
| line_amounts | 4700,15000 — cents |
| offer | eb-ga+eb-ga-to-vip — the whole cart as one string |
| tier | vip — what they ended up entitled to |
| promo_code | The code used, if any. Identifies a comp seat by which code rather than by the amount being zero. |
One row per entry, resolved by plan ID. That is the same two-row shape a GHL multi-line order already produces against one processor_ref — the 539 pairs already in purchases. A single-item cart is a list of one, so it stays one code path. The idempotency key needs to include the plan ID to keep both rows.
Other webhooks
Only payment.succeeded is subscribed today. Refunds, failed payments, cancellations and disputes each have their own event at dev.whop.com. Refunds are the one that matters before launch — without it a refunded seat still counts as sold.