Skip to main content

Test Mode

Flowlix provides a fully functional test environment that mirrors the live API. Use test mode to build, debug, and validate your integration before processing real payments.

How test mode works

Test mode and live mode share the same API endpoint (https://api.flowlix.eu) and the same endpoints. The difference is determined entirely by your API key:
Key prefixModeReal charges?Real card networks?
fl_test_sk_TestNoNo
fl_live_sk_LiveYesYes
When you use a test key:
  • No money moves. Cards are not actually charged.
  • No network calls. Card numbers are validated locally using test card rules.
  • Payments are marked livemode: false in the response.
  • Data is isolated. Test payments do not appear in live payment lists and vice versa.

Switching between modes

Simply swap the API key. No other code changes are needed:
# Test mode
curl -X POST https://api.flowlix.eu/v1/payments \
  -H "Authorization: Bearer fl_test_sk_abc123" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1000, "currency": "eur", "card": {...}}'

# Live mode (same code, different key)
curl -X POST https://api.flowlix.eu/v1/payments \
  -H "Authorization: Bearer fl_live_sk_xyz789" \
  -H "Content-Type: application/json" \
  -d '{"amount": 1000, "currency": "eur", "card": {...}}'

What you can test

Everything works in test mode:
  • Creating payments — Direct API and HPP flows.
  • Retrieving and listing payments — Including pagination and filters.
  • Refunding payments — Full refund flow.
  • Error scenarios — Use special test card numbers to trigger declines, specific errors, and edge cases.
  • Idempotency — Keys work identically in test and live modes.

Test card numbers

Use specific card numbers to simulate different outcomes. Here are the most common ones:
Card numberBehavior
4242424242424242Always succeeds (Visa)
5555555555554444Always succeeds (Mastercard)
4000000000000002Always declined (generic_decline)
4000000000009995Declined with insufficient_funds
See the full list at Test Cards.

Best practices

  • Use test mode for all development and staging environments. Only use live keys in production.
  • Automate tests against the API using test card numbers to verify your error handling.
  • Test edge cases — simulate declines, expired cards, and rate limits before going live.
  • Use separate API keys for different environments (dev, staging, CI) to keep test data organized.
  • Clear test data periodically in the Dashboard to keep your test environment clean.

Going live checklist

Before switching to live mode, verify:
1

Error handling

Your integration handles all error types gracefully (card declines, validation errors, server errors).
2

Idempotency

All payment creation and refund requests include an Idempotency-Key header.
3

Retry logic

Network failures and 5xx errors are retried with exponential backoff.
4

Security

API keys are stored securely and never exposed in client-side code.
5

Amounts

You are sending amounts in minor units (cents), not major units (EUR).