Skip to content

feat(store): $1 listing fee via CoinPay hosted checkout sessions - #164

Merged
ralyodio merged 2 commits into
mainfrom
feat/coinpay-checkout-sessions
Oct 21, 2026
Merged

ralyodio merged 2 commits into
mainfrom
feat/coinpay-checkout-sessions

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Replaces the extension store's $1 listing fee rails (direct Stripe Checkout, which had no key in prod, and a stub x402 path: USDC on Base only, empty payTo, settlement check that always returned false) with a CoinPay hosted checkout session.

  • POST /api/store/extensions/:id/checkout records a pending extension_payments row, creates a session (customer_email = owner email, account_id = user id, property tronbrowser.dev, metadata {extension_id, payment_id, slug}), stores cs_... as provider_ref and returns checkoutUrl. success_url /store/extension.html?slug=<slug>&paid=1, cancel back to the extension page. A method field is tolerated and ignored.
  • POST /api/store/payments/coinpay/webhook: X-CoinPay-Signature HMAC over the raw body (401 on bad/missing). payment.confirmed / payment.forwarded (incl. PayPal completed) mark the row paid via markPaidByRef (fallback: metadata.payment_id) and publish; repeat events are no-ops.
  • /confirm now reads the session back (GET /api/checkout/sessions/:id with the key) instead of the stub.
  • Removed: Stripe checkout + webhook route, x402 challenge, Stripe/x402 env, card/Stripe copy and the method picker in the store UI. Drafts get a "Pay $1 to list" button for the owner.
  • @profullstack/coinpay-onboard 0.2.0 pinned.

Tests: session creation payload, nested confirmed settle, forwarded, PayPal completed, idempotency, metadata fallback, expired grants nothing, bad signature 401, confirm paid/open. pnpm --filter @tronbrowser/api build/test green locally (102 tests).

🤖 Generated with Claude Code

ralyodio and others added 2 commits October 21, 2026 12:50
The listing fee defaulted to direct Stripe Checkout (no key in prod) with a
stub x402 path (USDC on Base only, empty payTo, settlement check that always
failed). Both are gone.

- /checkout creates a CoinPay checkout session (customer_email = owner email,
  account_id = user id, property tronbrowser.dev, metadata extension_id /
  payment_id / slug) and returns its hosted URL; the buyer picks any coin or
  PayPal there. `method` in the body is tolerated and ignored.
- New /api/store/payments/coinpay/webhook: X-CoinPay-Signature verified over
  the raw body; payment.confirmed / payment.forwarded (incl. PayPal
  'completed') mark the local payment row paid and publish, idempotently.
- /confirm reconciles by reading the session with the business key.
- Removed the Stripe route, Stripe/x402 env reads and card copy; store UI
  drops the method picker and owners get a "Pay $1 to list" button on drafts.
- Uses @profullstack/coinpay-onboard 0.2.0 (pinned).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​coinpay-onboard@​0.2.0771009892100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Low adoption: npm @profullstack/coinpay-onboard

Location: Package overview

From: pnpm-lock.yaml → npm/@profullstack/coinpay-onboard@0.2.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@profullstack/coinpay-onboard@0.2.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@github-actions

Copy link
Copy Markdown
Contributor

ThreatCrush Security Scan

49 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 26 | LOW: 21

Severity Rule Location
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:303
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:437
MEDIUM js-open-redirect apps/desktop/extensions/ai-sidebar/install-helper.js:156
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:34
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:57
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:246
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:275
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:345
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/options.js:306
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:78
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:166
MEDIUM redos-nested-quantifier apps/desktop/extensions/ai-sidebar/w3bs.js:17
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:77
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:227
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:571
MEDIUM js-unescaped-html-sink apps/web/public/app.js:29
MEDIUM js-unescaped-html-sink apps/web/public/dns.js:54
MEDIUM sh-remote-script-execution apps/web/public/install.sh:182
MEDIUM sh-remote-script-execution apps/web/public/install.sh:422
MEDIUM sh-remote-script-execution apps/web/public/install.sh:440
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:96
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:168
MEDIUM js-dynamic-code-execution packages/sdk/src/mcp/tools.ts:125
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:68
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:73
MEDIUM sql-template-interpolation services/api/src/store/db.ts:116
MEDIUM js-dynamic-code-execution services/api/src/store/scanner.ts:44
MEDIUM sh-predictable-temp-path start.sh:28
LOW js-dynamic-code-execution apps/desktop/extensions/ai-sidebar/pit-proxy.test.js:8
LOW js-dynamic-code-execution packages/agent-runtime/src/analyze/form-script.test.ts:6
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:26
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:49
LOW js-dynamic-code-execution packages/browser-core/src/automation/extract-script.test.ts:6
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:16
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:45
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:57
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:80
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:99
LOW js-dynamic-code-execution packages/browser-core/src/automation/snapshot-script.test.ts:11
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:62
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:101
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:47
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:170
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:216
LOW js-dynamic-code-execution packages/sdk/src/mcp/automate.test.ts:261
LOW secret-generic-api-key packages/storage/src/config.ts:51
LOW secret-generic-credential packages/storage/src/config.ts:51
LOW js-dynamic-code-execution services/api/src/store/scanner.test.ts:32
LOW js-hardcoded-crypto-key services/api/src/store/signing.test.ts:24

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 51d62d7 into main Oct 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant