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 number | Brand | Description |
|---|
4111111111111111 | Visa | Standard successful payment |
Declined payments
| Card number | Decline code | Description |
|---|
4000000000000002 | do_not_honor | The issuer declines without a specific reason. |
4000000000009995 | insufficient_funds | The 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.