Fix duplicate Stripe customers and attestation plan bypass #136
Reference in New Issue
Block a user
Delete Branch "fix/stripe-dedup-attestation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two bugs fixed:
1. Duplicate Stripe customers (double-Bearer auth)
Both checkout paths passed
'Bearer sk_...'tohttp_get_auth()which prepends another'Bearer ', producing'Bearer Bearer sk_...'. Stripe returns 401 on every customer lookup, so a new customer was always created on each checkout page visit. Fixed: pass raw key tohttp_get_auth().2. /api/attest founding bypass
The attestation endpoint wrote whatever
planthe client submitted — so anyone could POSTplan=foundingand get founding member access without paying $199. Fixed: server ignores the submitted plan and always writesplan=waitlist. Founding access requires Stripe payment.Data fix applied: Silas Shellenbarger's waitlist row downgraded from
foundingtowaitlist(created via attestation today without payment).