Skip to main content

Environments

WorkFunder provides two environments so you can develop and test without affecting production data or incurring real charges.

Live vs. Test

FeatureLive (wf_live_)Test (wf_test_)
Real paymentsYes -- Stripe charges are realNo -- payments are simulated
Real workersYes -- tasks are visible to workersNo -- no workers are assigned
Task auto-fundingNo -- requires Stripe paymentYes -- tasks auto-advance to funded
WebhooksDelivered to your endpointDelivered to your endpoint
Rate limitsSame per-tier limitsSame per-tier limits
API responsesSame formatSame format
Task dataProduction databaseSeparate test data

Test Mode Behavior

When you use a test API key (wf_test_*), the following behaviors change:

No Real Charges

Tasks created with a test key skip the Stripe payment flow. The task automatically moves from pending to funded status without charging any payment method.

# This creates a task that auto-funds -- no credit card needed
curl -X POST https://api.workfunder.com/v1/tasks \
-H "Authorization: Bearer wf_test_your_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Test task",
"description": "Testing the API",
"category": "photography",
"location": {
"city": "Brooklyn",
"state": "NY",
"latitude": 40.6782,
"longitude": -73.9442
},
"budget_cents": 5000
}'

Simulated Task Progression

In test mode, tasks will not be assigned to real workers. You can use the API to advance task state for testing purposes. Webhooks are still delivered normally so you can verify your integration end-to-end.

Webhooks Still Fire

Test-mode tasks still trigger webhook events to your configured endpoint. This lets you verify your webhook handler processes events correctly without any real-world side effects.

Separate Data

Tasks created in test mode are tagged with "environment": "test" and are completely isolated from live data. Test tasks do not appear in live task listings, and live tasks do not appear in test listings.

Switching Between Environments

Switching environments is as simple as changing which API key you use. There is no environment toggle or configuration setting -- the key prefix determines the environment.

// Development / testing
const client = {
apiKey: process.env.WORKFUNDER_TEST_KEY, // wf_test_...
};

// Production
const client = {
apiKey: process.env.WORKFUNDER_LIVE_KEY, // wf_live_...
};

Use environment variables to manage keys across environments:

# .env.development
WORKFUNDER_API_KEY=wf_test_abc123...

# .env.production
WORKFUNDER_API_KEY=wf_live_xyz789...
tip

Keep your test and live API keys in separate environment files. Never check .env files into version control.

When to Use Each Environment

ScenarioEnvironment
Initial developmentTest
Integration testingTest
CI/CD pipeline testsTest
Staging environmentTest
Webhook handler testingTest
Production deploymentLive
Demo to stakeholdersTest (to avoid real charges)

Test Mode Limitations

While test mode closely mirrors live behavior, there are a few differences to be aware of:

  • No real worker assignment -- Tasks remain in funded/posted status unless manually advanced
  • No real Stripe charges -- Payment intent creation is simulated
  • No real payouts -- Worker transfers are not executed
  • Proof uploads -- Files are stored but not reviewed by the admin queue
  • GPS validation -- Still performed on proof submissions, but no real worker is submitting proofs

Moving to Production

When you are ready to go live:

  1. Generate a live API key (wf_live_*) from the Dashboard
  2. Add a payment method to your account for task funding
  3. Configure your production webhook URL
  4. Update your application to use the live API key
  5. Create your first live task and verify the payment flow
caution

Live tasks create real Stripe charges and are visible to real workers. Double-check your task details and budget before creating live tasks.