• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
MRPRRSIDENT

MRPRRSIDENT

Paymentsys

Website that can transact
Public
Like
Paymentsys
Home
Code
6
backend
3
frontend
4
shared
1
README.md
SETUP.md
H
main.ts
Environment variables
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
SETUP.md
Code
/
SETUP.md
Search
12/11/2025
SETUP.md

Setup Guide for The Trade In Trainer Corner

Payment Integration Setup

To enable payment processing with Visa/Mastercard, you'll need to set up Stripe:

1. Create a Stripe Account

  1. Go to stripe.com and create an account
  2. Complete the account verification process
  3. Navigate to the Dashboard

2. Get Your API Keys

  1. In the Stripe Dashboard, go to Developers → API keys
  2. Copy your Publishable key (starts with pk_)
  3. Copy your Secret key (starts with sk_)

3. Set Environment Variables in Val Town

  1. Go to your Val Town settings
  2. Add these environment variables:
    • STRIPE_PUBLISHABLE_KEY: Your Stripe publishable key
    • STRIPE_SECRET_KEY: Your Stripe secret key

4. Configure Webhooks (Optional but Recommended)

  1. In Stripe Dashboard, go to Developers → Webhooks
  2. Add endpoint: https://your-val-town-url.web.val.run/api/payments/webhook
  3. Select events: payment_intent.succeeded
  4. This ensures trainers are marked as sold when payments complete

Bank Account Setup

For Receiving Payments

  1. In your Stripe Dashboard, go to Settings → Payouts
  2. Add your bank account details where you want to receive payments
  3. Stripe will handle the transfer of funds to your account

Supported Countries

Stripe supports many countries. Check Stripe's supported countries to ensure your location is supported.

Testing

Test Mode

  • Stripe starts in test mode by default
  • Use test card numbers like 4242 4242 4242 4242
  • No real money is processed in test mode

Going Live

  1. Complete Stripe's verification process
  2. Switch to live mode in your Stripe Dashboard
  3. Update your environment variables with live keys (they'll start with pk_live_ and sk_live_)

Security Notes

  • Never expose your secret key in client-side code
  • The current implementation uses a simplified payment flow
  • For production, consider implementing additional security measures like webhook signature verification

Support

If you need help with Stripe integration:

  • Check Stripe's documentation
  • Contact Stripe support
  • Review the payment flow in /backend/routes/payments.ts
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.