Repository navigation
feat(store): $1 listing fee via CoinPay hosted checkout sessions - #164
Conversation
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>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
|
ThreatCrush Security Scan49 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 26 | LOW: 21
Snippets are redacted; ThreatCrush never prints matched credential material. |
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/checkoutrecords a pendingextension_paymentsrow, creates a session (customer_email = owner email, account_id = user id, propertytronbrowser.dev, metadata{extension_id, payment_id, slug}), storescs_...as provider_ref and returnscheckoutUrl. success_url/store/extension.html?slug=<slug>&paid=1, cancel back to the extension page. Amethodfield is tolerated and ignored.POST /api/store/payments/coinpay/webhook:X-CoinPay-SignatureHMAC over the raw body (401 on bad/missing).payment.confirmed/payment.forwarded(incl. PayPalcompleted) mark the row paid viamarkPaidByRef(fallback: metadata.payment_id) and publish; repeat events are no-ops./confirmnow reads the session back (GET /api/checkout/sessions/:idwith the key) instead of the stub.@profullstack/coinpay-onboard0.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/testgreen locally (102 tests).🤖 Generated with Claude Code