Stripe provides a test environment in which you use publicly available / private keys as they counter production expectations. However, what looks like the downside, which is actually very useful, is that you need to adhere to the Stripe testing conditions and use their data and card numbers to verify various aspects of your api call.
For example, to get certain errors, you can enter these numbers:
card_declined: Use this special card number - 4000000000000002. incorrect_number: Use a number that fails the Luhn check, eg 4242424242424241. invalid_expiry_month: Use an invalid month eg 13. invalid_expiry_year: Use a year in the past eg 1970. invalid_cvc: Use a two digit number eg 99.
For more information, refer to the link posted by Samir.
source share