Skip to main content

Test Cards

Use these card numbers in test mode to simulate payment outcomes through the Flowlix sandbox. All test cards work with any future expiration date and any 3-digit CVC (4-digit for Amex).
Test cards only work with test mode API keys (fl_test_sk_). Using them with a live key will be rejected by the upstream provider.
Decline outcomes in sandbox are determined by the upstream sandbox processor, not by Flowlix client-side PAN matching. The cards below are the ones currently mapped in the sandbox configuration. Other PANs may succeed, fall through to generic_decline, or behave unpredictably — only rely on the cards listed here for deterministic test outcomes.

Successful payments

Card numberBrandDescription
4111111111111111VisaStandard successful payment

Declined payments

Card numberDecline codeDescription
4000000000000002do_not_honorThe issuer declines without a specific reason.
4000000000009995insufficient_fundsThe card has insufficient funds.
If you need to exercise other decline codes (expired_card, invalid_number, lost_card, stolen_card, card_velocity_exceeded, generic_decline) end-to-end, file a request to add them to the sandbox — they are produced by the upstream provider’s mock environment, not by a Flowlix-side PAN lookup.

Using test cards

All test cards accept:
  • Any future expiration date (e.g. 12/2027)
  • Any CVC (e.g. 123 for Visa/MC, 1234 for Amex)
  • Any cardholder name

Example: successful payment

curl -X POST https://api.flowlix.dev/v1/payments \
  -H "Authorization: Bearer fl_test_sk_abc123" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "amount": 2000,
    "currency": "eur",
    "card": {
      "number": "4111111111111111",
      "exp_month": 12,
      "exp_year": 2027,
      "cvc": "123",
      "holder_name": "Test User"
    },
    "customer": {
      "email": "test@example.com",
      "first_name": "Test",
      "last_name": "User",
      "country": "DE",
      "phone": "+491701234567",
      "address": "Kurfuerstendamm 21",
      "city": "Berlin",
      "zip": "10719"
    }
  }'
Response: 201 Created with "status": "pending". Poll GET /v1/payments/{id} until succeeded.

Example: declined payment

curl -X POST https://api.flowlix.dev/v1/payments \
  -H "Authorization: Bearer fl_test_sk_abc123" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "amount": 2000,
    "currency": "eur",
    "card": {
      "number": "4000000000009995",
      "exp_month": 12,
      "exp_year": 2027,
      "cvc": "123",
      "holder_name": "Test User"
    },
    "customer": {
      "email": "test@example.com",
      "first_name": "Test",
      "last_name": "User",
      "country": "DE",
      "phone": "+491701234567",
      "address": "Kurfuerstendamm 21",
      "city": "Berlin",
      "zip": "10719"
    }
  }'
Response: 201 Created with "status": "pending". After processing, a subsequent GET /v1/payments/{id} returns the failed Payment object with the decline reason populated:
{
  "id": "pay_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "failed",
  "decline_code": "insufficient_funds",
  "decline_message": "The card has insufficient funds to complete the purchase."
}

Testing the HPP flow

Test cards also work on the Hosted Payment Page. Create an HPP session with a test key, open the redirect_url in your browser, and enter any test card number.

Tips

  • Test every decline scenario your integration might encounter in production.
  • Verify your error messages — make sure you show helpful, customer-friendly messages for each decline code.
  • Always poll GET /v1/payments/{id} for the terminal status — 201 Created is not a success signal.
  • Test edge cases like expired cards and rate-limit responses, not just the happy path.