Skip to main content

How test mode works

When your Stripe account is in test mode (key starts with sk_test_), Cuprice automatically:
  • Uses your Test Success URL and Test Cancel URL for redirects
  • All payments use Stripe’s test environment
  • No real charges are made

Testing the flow

1

Set test redirect URLs

In the Integration tab, set your test URLs pointing to your local development server (e.g. http://localhost:3001).
2

Use the test buttons

After saving, click Test Success or Test Cancel to open your redirect URLs directly — no Stripe needed.
3

Test with Stripe

Use test card 4242 4242 4242 4242 to complete a real checkout flow in test mode.

Quick test (no Stripe needed)

The Test Success button in the Integration tab opens your success URL with a fake session ID (cs_test_...). Your app should handle this gracefully:
// In your API route, detect test session IDs
if (sessionId.startsWith("cs_test_") && sessionId.length < 30) {
  // Return all features as enabled for testing
  const allFeatures = await getProjectFeatures(shareId);
  return { planName: "Test Plan", features: allFeatures, testMode: true };
}
This lets you test the complete success → feature activation → dashboard flow without touching Stripe at all.