This document outlines the Stripe integration for the Proplex landing page payment system.
The current implementation includes:
-
LandingPage Component (
src/pages/LandingPage.tsx)- Proplex introduction and feature showcase
- Subscription plans with monthly/yearly billing options
- Integrated paywall system
- KYB wizard integration
-
KYB Wizard Component (
src/components/wizard/KYBWizard.tsx)- Multi-step business verification process
- Wallet generation functionality
- Investment policy configuration
- Document upload interface
-
Stripe Service (
src/services/stripe.ts)- Mock implementation for demo purposes
- Payment intent creation
- Subscription management
- Utility functions for pricing
To implement this in production, you'll need to:
npm install @stripe/stripe-js @stripe/react-stripe-jsAdd to your .env file:
REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_live_your_publishable_key
STRIPE_SECRET_KEY=sk_live_your_secret_key
Create the following backend endpoints:
POST /api/create-payment-intent- Create payment intent for one-time paymentsPOST /api/create-subscription- Create subscription for recurring billingPOST /api/webhook/stripe- Handle Stripe webhook eventsGET /api/subscription/:id- Get subscription detailsPOST /api/cancel-subscription/:id- Cancel subscription
- Create subscription products in Stripe Dashboard
- Set up webhook endpoints
- Configure tax settings if required
- Set up customer portal for subscription management
- Never expose secret keys in frontend code
- Validate all payments on the backend
- Implement proper error handling
- Use HTTPS in production
- Validate webhook signatures
The current implementation uses mock functions to simulate Stripe functionality:
mockConfirmCardPayment()- Simulates payment confirmationmockCreatePaymentMethod()- Simulates payment method creationmockRedirectToCheckout()- Simulates redirect to Stripe Checkout
Current plans configured:
-
Starter - $29/month
- Access to 5 investment opportunities
- Basic portfolio analytics
- Standard support
-
Professional - $79/month (Most Popular)
- Access to all investment opportunities
- Advanced portfolio analytics
- Priority support
- API access
-
Enterprise - $199/month
- Unlimited investment opportunities
- White-label solutions
- 24/7 premium support
- Custom integrations
- Business Information - Company details and registration
- Contact Details - Authorized representative information
- Document Upload - Required verification documents
- Wallet Generation - Secure blockchain wallet creation
- Investment Policy - Risk tolerance and compliance agreements
- Completion - Verification submission and confirmation
- Router configuration updated to use LandingPage as homepage
- KYB wizard triggers after subscription selection
- Wallet generation integrated into verification flow
- Policy creation as final step before completion
- Replace mock Stripe functions with real Stripe API calls
- Implement backend payment processing endpoints
- Add proper error handling and loading states
- Implement webhook handling for subscription events
- Add customer portal for subscription management
- Integrate with actual KYB/AML verification services
- Implement real wallet generation with secure key management
For testing purposes, you can use Stripe's test mode with test card numbers:
- Success: 4242 4242 4242 4242
- Declined: 4000 0000 0000 0002
- Insufficient funds: 4000 0000 0000 9995
For Stripe-specific questions, refer to: