Skip to main content

Test Cards

Use these card numbers in test mode to simulate different payment outcomes. All test cards work with any future expiration date and any 3-digit CVC (or 4-digit for Amex).
Test cards only work with test mode API keys (fl_test_sk_). Using them with a live key will return an error.

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.

Using test cards

All test cards accept:
  • Any future expiration date (e.g., 12/2027)
  • Any CVC (e.g., 314 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" \
  -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": "+491234567890",
      "address": "100 Main St",
      "city": "Berlin",
      "zip": "10115"
    }
  }'
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" \
  -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": "+491234567890",
      "address": "100 Main St",
      "city": "Berlin",
      "zip": "10115"
    }
  }'
Response: 201 Created with "status": "pending". After processing, the payment status becomes failed with decline details:
{
  "id": "pay_abc123",
  "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.
  • Test edge cases like expired cards and CVC mismatches, not just the happy path.
  • Use different card brands to ensure your UI handles Visa, Mastercard, and Amex correctly.