# Stripe Payment QA Testing Checklist
**App:** https://rivet.rateright.com.au  
**Fee:** $50 flat fee per hire  
**Estimated Time:** 30 minutes  
**Date:** ___________

## Pre-Test Setup (5 minutes)

### 1. Test Accounts Setup
- [ ] Create contractor account (use your real email/phone)
  - Email: _____________________
  - Password: __________________
- [ ] Create worker account (use a different email)
  - Email: _____________________
  - Password: __________________
- [ ] Complete profiles for both accounts with realistic details
- [ ] Verify both accounts can log in successfully

### 2. Stripe Test Mode Verification
- [ ] Open https://rivet.rateright.com.au in browser
- [ ] Right-click → Inspect → Console tab
- [ ] Look for "Stripe test mode active" message (should be visible)
- [ ] If you see "live mode" - STOP and contact Builder immediately

## Test Card Numbers (Save These!)
**Use these fake card numbers for testing:**
- ✅ **Success:** 4242 4242 4242 4242 (any future date, any CVC)
- ❌ **Decline:** 4000 0000 0000 0002 (test failures)
- 💳 **Australian:** 4000 0000 0000 0002 (same as decline)
- 🔄 **3D Secure:** 4000 0025 0000 3155 (extra authentication)

## Full Hire Flow Test (15 minutes)

### 3. Post a Job (Contractor)
- [ ] Log in as contractor
- [ ] Click "Post a Job" or similar button
- [ ] Fill in job details:
  - Job type: Steel fixing / Concreting / Formworking
  - Location: Sydney CBD
  - Start date: Tomorrow
  - Duration: 2 weeks
  - Rate: $35/hour
- [ ] Submit job posting
- [ ] Confirm job appears in "My Jobs" section

### 4. Worker Applies (Worker Account)
- [ ] Log out → Log in as worker
- [ ] Navigate to job listings
- [ ] Find the job you just posted
- [ ] Click "Apply" button
- [ ] Add application message: "Available immediately, 5 years experience"
- [ ] Submit application
- [ ] Confirm application shows as submitted

### 5. Review Applications (Contractor)
- [ ] Log out → Log in as contractor
- [ ] Go to "My Jobs" → click on posted job
- [ ] Check if worker application is visible
- [ ] Click on worker's profile to view details
- [ ] Click "Hire" or "Accept" button

### 6. Payment Process (Critical!)
- [ ] You should see Stripe payment form
- [ ] Enter test card: 4242 4242 4242 4242
- [ ] Enter any future expiry date (e.g., 12/26)
- [ ] Enter any CVC (e.g., 123)
- [ ] Enter any ZIP code (e.g., 2000)
- [ ] Click "Pay $50.00"
- [ ] Wait for confirmation (should take 2-3 seconds)
- [ ] Screenshot the success message!

### 7. Post-Payment Verification
- [ ] Check if messaging/chat is now unlocked between contractor & worker
- [ ] Verify contractor can see worker's contact details
- [ ] Check "My Jobs" shows worker as "Hired"
- [ ] Look for payment confirmation email (check spam folder)

## Edge Cases Testing (10 minutes)

### 8. Payment Failure Test
- [ ] Try to hire same worker again (should show already hired)
- [ ] Create new job → get new application
- [ ] This time use decline card: 4000 0000 0000 0002
- [ ] Payment should fail with error message
- [ ] Verify job shows "Payment Failed" status
- [ ] Try payment again with good card (4242...) - should work

### 9. Browser Refresh Test
- [ ] During next successful payment:
- [ ] Click "Pay" → immediately refresh browser
- [ ] Check if payment still processed correctly
- [ ] Verify job status shows hired (not stuck in pending)

### 10. Multiple Hires Test
- [ ] Post another job from same contractor account
- [ ] Get 2-3 different workers to apply (use different emails)
- [ ] Hire multiple workers (each should charge $50)
- [ ] Verify each hire creates separate $50 charge

## Webhook Verification (Optional - 5 minutes)

### 11. Check Stripe Dashboard (If Access)
- [ ] Log into Stripe dashboard (ask Builder for link)
- [ ] Check "Payments" section shows your test payments
- [ ] Verify each payment shows as $50.00
- [ ] Check payment status shows "Succeeded"

### 12. Supabase Database Check (If Michael Has Access)
- [ ] Log into Supabase dashboard
- [ ] Check "payments" table for your transactions
- [ ] Verify each has:
  - amount: 5000 (cents)
  - status: succeeded
  - user_id matches contractor
- [ ] Check "matches" table shows hired workers

## What to Report

### Success Criteria ✅
- Payment processes in under 5 seconds
- Success message clearly displayed
- Messaging unlocks immediately after payment
- Job status updates to "Hired"
- Email confirmation received
- No JavaScript errors in console

### Red Flags 🚨
- Payment takes longer than 10 seconds
- Page gets stuck/keeps loading
- Error messages are unclear or technical
- Messaging doesn't unlock after payment
- Can't hire after successful payment
- Double-charging occurs
- Webhooks show as failed in Stripe

## Quick Reference

**If Something Goes Wrong:**
1. Screenshot the error
2. Check browser console (F12 → Console tab)
3. Screenshot any red error messages
4. Note exact steps you took
5. Send everything to Builder via Telegram

**Test Complete?** 
- [ ] All boxes checked above
- [ ] Screenshots saved
- [ ] Any issues reported to Builder
- [ ] Ready for live payments!

---
**Notes:** _________________________________
_________________________________________

**Issues Found:** _________________________
_________________________________________