Commit graph

2 commits

Author SHA1 Message Date
Anthony Ettinger
9d06d88e4d feat(hire-us): CoinPay hosted checkout sessions for Hire Us
POST /api/hire-us/coinpay-checkout now opens a CoinPay checkout session
instead of a single-chain USDC_POL /api/payments/create. The buyer picks
any coin the business has a wallet for, or PayPal. Each session sends
customer_email (required), account_id (CoinPay OAuth sub when signed in,
else the buyer email for guests), property logicsrc.com and the Hire Us
metadata. The cs_ id is recorded in the new hire_us_checkouts table.

The webhook records session payments from the session fields
(checkout_session_id, account_id, customer_email, property), stores the
session id on hire_us_payments, marks the checkout paid, and stays
idempotent on payment_id across confirmed, forwarded and replays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 13:19:15 +00:00
54ec1a4925
fix(coinpay): settle paid Hire Us checkouts from the signed webhook (#252)
The CoinPay webhook only logged. It now verifies X-CoinPay-Signature
(t=,v1= over t.rawBody), reads the nested payload (data.payment_id, not
the top-level event id), and records a confirmed/forwarded Hire Us
payment once in hire_us_payments (payment_id primary key), mapped to the
buyer via metadata.account_id/email. Unknown or pending payments are a
200 no-op. Hire Us checkout now sends property, account_id (CoinPay
session) and email in metadata.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 05:02:09 -07:00