Architecture now in use: Stripe Payments + hosted Checkout + Connect Accounts v2. Best Networks Inc. is the legal entity and LensChicago is its product line. Actual transaction expenses and the fixed operating expense are deducted first; ordinary net proceeds are then split 75% photographer / 25% Best Networks. UNO fundraiser net proceeds are allocated 100% to UNO.
Current integration status · August 22, 2026
Built in test mode, but not ready to process a complete purchase.
Architecture and safety lock
Payments, hosted Checkout, Connect Accounts v2, separate charges and transfers, 75/25 allocation records, nonprofit allocation records, and database tables are designed. The site is locked to test mode and live payments remain unapproved.
Checkout and signed webhooks
The server can create a test Checkout Session and has signature verification plus basic handlers for completed checkout, refunds, and disputes. These paths cannot run until the protected Stripe credential and webhook signing secret are installed.
Photographer onboarding
A Stripe-hosted Connect onboarding endpoint exists and the database can store connected-account status. The Photographer Studio button is still informational and must be connected to that endpoint, then tested with two sandbox photographers.
Transfers, payouts, and delivery
The site does not yet create recipient transfers, reconcile payouts or reversals, generate a usable customer download token, send the secure-download email, or deliver purchased originals end to end.
Current blocker: the Site has APP_BASE_URL, STRIPE_LIVEMODE=false, and LIVE_PAYMENTS_APPROVED=false. It does not yet have STRIPE_RESTRICTED_KEY or STRIPE_WEBHOOK_SECRET. Stripe is connected to the Best Networks Inc sandbox for administrative work, but that connection does not automatically provide credentials to the LensChicago application.
Next three actions
- Create and install the restricted Stripe sandbox key.
- Register
https://lenschicago.com/api/stripe/webhook, install its test signing secret, and send a verified test event. - Connect the Studio onboarding button and complete two sandbox photographer accounts before testing a multi-photographer cart.
Confirm the Stripe account is in test mode
- Sign in to the Stripe Dashboard ↗ using the Best Networks account.
- Select Best Networks Inc sandbox and confirm the Dashboard indicates test or sandbox mode.
- Open Settings → Connect and confirm Connect is enabled.
- Keep Payments, Checkout, and Connect as the core products. Use Invoicing only for separately billed corporate assignments.
- Require a passkey or authenticator app for every Stripe administrator.
Create a restricted test API key
- Open Developers → API keys in test mode ↗.
- Create a restricted key for LensChicago rather than installing the general secret key.
- Name it
LensChicago Sites — Test. - Grant only the permissions needed for Checkout Sessions, PaymentIntents, Connect Accounts v2, onboarding links, transfers, refunds, disputes, events, and balance/reconciliation reads.
- Copy the key once and store it in a password manager. Never paste it into email, site content, source code, screenshots, tickets, or chat.
- In the LensChicago Site settings, add it as a protected secret named
STRIPE_RESTRICTED_KEY. Confirm it is a test restricted key—not a live key.
Stop condition: if the key has “live” in its prefix or the Dashboard is not in test mode, do not install it.
Register the signed test webhook
- Open Developers → Webhooks in test mode ↗ and choose Add destination.
- Use
https://lenschicago.com/api/stripe/webhook. - Subscribe to checkout completion and failure, payment failure, refunds, disputes, transfers, transfer reversals, payouts, and relevant Connect account/capability updates.
- Reveal the endpoint signing secret and store it as the protected LensChicago secret
STRIPE_WEBHOOK_SECRET. - Use separate signing secrets for test and live modes. Never reuse or publish one.
- Send a test event. A valid signed event should succeed; an altered or unsigned request must be rejected.
Confirm the safety settings
| Setting | Required test value |
|---|---|
APP_BASE_URL | https://lenschicago.com |
STRIPE_LIVEMODE | false |
LIVE_PAYMENTS_APPROVED | false |
The last two settings are the live-payment safety lock. They remain false throughout testing.
Onboard two test photographers
- Create or sign in to two approved LensChicago photographer profiles.
- From each private studio, start Connect test payouts.
- Complete Stripe-hosted onboarding with test data. LensChicago stores only the connected-account ID and status—not bank numbers or identity documents.
- Confirm each account has the Express dashboard and recipient configuration.
- Confirm the recipient transfer capability is active before attempting a transfer.
- Use two photographers because a one-photographer test cannot prove a multi-photographer split.
Prepare three controlled test carts
| Cart | Purpose | Expected allocation |
|---|---|---|
| A | One ordinary photo from photographer 1 | 75% photographer / 25% Best Networks |
| B | Ordinary photos from photographers 1 and 2 | Each item allocated to its photographer; one customer charge |
| C | One designated UNO nonprofit-benefit image | Recorded nonprofit allocation; ordinary split is not applied automatically |
Write down the expected cents before paying. Tax, processing fees, refunds, disputes, and chargebacks are separate ledger entries.
Run the successful purchase and download test
- Add Cart A and enter an email address you can access.
- Continue to Stripe test Checkout and use Stripe’s successful test-card details.
- Confirm the customer returns to the LensChicago success page.
- In Stripe, confirm the Checkout Session and PaymentIntent are in test mode and contain the LensChicago order metadata and transfer group.
- Confirm the signed webhook—not the browser return—marks the order paid.
- Confirm secure-download authorization is created only after the verified paid event.
- Confirm the link delivers the licensed original rather than the marked preview, then verify expiry and authorization.
- Repeat with Carts B and C.
Test failures, refunds, and disputes
- Decline: no paid order, transfer, or download may be created.
- Repeated webhook: resend the same event; financial entries must not duplicate.
- Partial refund: verify the customer refund, allocation adjustment, transfer reversal, and download eligibility.
- Full refund: verify the order and all related balances adjust exactly once.
- Dispute: verify the order is frozen, the disputed amount is recorded, and recovery follows the agreement.
- Failed payout: verify the photographer sees remediation—not a false “paid” status.
- Disabled photographer: deactivate a recipient capability and confirm the transfer is blocked.
Reconcile every test order to the cent
- Compare customer total, photo subtotal, nonprofit allocation, photographer allocations, Best Networks share, Stripe fee, refunds, disputes, transfers, reversals, and payout references.
- Confirm all allocations equal the eligible amount and no item is allocated twice.
- Confirm fundraiser proceeds are identifiable by order, item, beneficiary, percentage, and photographer consent.
- Preserve the reconciliation evidence for the launch record.
- Have the accountant approve Stripe fees, tax, refunds, disputes, and chargebacks. A 25% platform share is not a guaranteed 25% net margin because LensChicago pays processing costs in this charge pattern.
Complete policy and legal gates
- Finalize customer terms, privacy, refunds, digital-photo licensing, prohibited-content rules, and the photographer agreement.
- State who is the merchant of record, who handles payment support, and how negative balances are allocated.
- Confirm sales-tax registrations before enabling Stripe automatic tax. Turning on the feature does not create a registration.
- Confirm nonprofit representations, consent, beneficiary payment method, reporting, and the definition of “proceeds.”
- Enable appropriate Radar rules and monitor early transactions closely.
Request a separate live-payment approval
After every test passes, prepare a launch report with results, unresolved exceptions, approvals, and the proposed low-value controlled live purchase.
Live mode is a separate decision. Do not add live credentials or change either safety lock until Cesar Lopez explicitly approves enabling live payments.