Thoroughly test your billing implementation using FunnelFox’s sandbox environment and test cards. Simulate every scenario your customers might encounter without processing real payments.
Important: Only test cards work in sandbox mode. Using real card numbers will return an error. This protects you from accidental charges during development.

Test Environment Setup

Sandbox Mode

FunnelFox Billing provides a complete sandbox for testing:
1

Use test credentials

Always use test/sandbox API keys from your PSP when developing. Never use production keys until ready to go live.
2

Test mode indicators

Look for “TEST MODE” badges in the dashboard when using test credentials. This confirms you’re in sandbox.
3

Preview vs Published

Test cards work in both preview and published funnels when using test credentials. No difference in behavior.
Sandbox data: Test transactions appear in your dashboard marked as test data. They’re automatically separated from production data and can be filtered or hidden.

Test Cards Reference

Successful Payment Cards

Use these cards to simulate successful transactions:
Visa
  • Number: 4242 4242 4242 4242
  • Use any future expiry date
  • Use any 3-digit CVC
  • Use any billing ZIP
Mastercard
  • Number: 5555 5555 5555 4444
  • Same rules for expiry, CVC, ZIP

Declined Payment Cards

Test failure scenarios with these cards:
Generic Decline
test-card
Visa: 4000 0000 0000 9995 Mastercard: 5200 0000 0000 1005Simulates a generic card decline without specific reason.
Insufficient Funds
test-card
Card: 4000 0000 0000 9995Simulates insufficient funds decline. Useful for testing retry logic.
Lost Card
test-card
Card: 4000 0000 0000 9987Simulates a reported lost card. Should not be retried.
Expired Card
test-card
Card: 4000 0000 0000 0069Simulates an expired card error. Tests update payment flow.

3D Secure Testing

Test Strong Customer Authentication (SCA) flows:
1

Required Authentication

Card: 4000 0025 0000 3155Always requires 3D Secure authentication. Customer must complete additional verification.
2

Optional Authentication

Card: 4000 0027 6000 3184Authentication recommended but not required. Tests soft decline handling.
3

Authentication Codes

When prompted for 3D Secure verification:
  • Enter 1234 for successful authentication
  • Enter 1111 or 2222 for failed authentication
  • Enter 3333 for unknown response
  • Enter 4444 for successful with delay
3D Secure flows: These may open additional windows or iframes. Ensure your funnel handles these popups correctly and doesn’t block them.

Testing Scenarios

Subscription Lifecycle

Test the complete subscription journey:
  1. Create product with 7-day trial
  2. Purchase with test card
  3. Verify trial status in dashboard
  4. Simulate trial end (contact support)
  5. Confirm conversion to paid

Edge Cases

Don’t forget to test these scenarios: Payment Method Updates
  • Card expiration during subscription
  • Switching from card to card
  • Invalid card replacement
Subscription Changes
  • Upgrade mid-cycle
  • Downgrade with proration
  • Pause and resume
  • Cancellation and reactivation
International
  • Multi-currency transactions
  • Currency conversion
  • Tax calculations
  • Regional payment methods

Test Checklist

Before going live, verify these scenarios:

Payment Processing

  • Successful payment with primary card types
  • Declined payments with various reasons
  • 3D Secure authentication flow
  • International cards and currencies
  • Payment method updates

Subscription Management

  • Free trial creation and conversion
  • Paid trial processing
  • Subscription renewals
  • Plan upgrades and downgrades
  • Pause and resume functionality
  • Cancellation flow

Error Handling

  • Network timeouts
  • Invalid card data
  • Duplicate payment prevention
  • Webhook failure recovery
  • PSP outage fallback

Customer Experience

  • Email notifications
  • Receipt generation
  • Invoice accuracy
  • Refund processing
  • Customer portal access

Debugging Tips

Moving to Production

After thorough testing:
1

Switch credentials

Replace test API keys with production credentials in Settings → Integrations
2

Small real transaction

Process a small real payment ($1) to verify everything works
3

Monitor closely

Watch first 10-20 real transactions carefully for any issues
4

Have rollback plan

Keep test environment ready in case you need to revert
Final check: Ensure you’ve removed all test data and debug code before accepting real payments. Double-check webhook URLs point to production endpoints.

Next Steps

Testing complete? Continue with: