We would like to know how we can test stripe in LIVE for an e-commerce website? The site basically is an e-commerce website and courses are purchased online, how do we test LIVE transactions without using real-time credit cards in stripe?
How do others test on LIVE? What are the best practices to test in LIVE?
To begin, you'll need to log in to your Stripe account. Then click on Payments in the menu at the top of the screen. Next, near the top right corner of the screen, toggle on the Test Mode option. This will show you an overview of the test payments you've received in your Stripe account.
Stripe has a test mode that allows you to use regulatory test credit card numbers to process transactions up to but not including the point the bank is actually charged.
Open the form you want to run a Stripe payment check for and go to its Settings. Click Payment Options and check Stripe if it's not checked already. Then put the Checkout Mode to Testmode, click Update, and test away. Don't forget to switch to Production when you need to start accepting actual payments.
The purpose of Stripe test mode is to ensure that you get your code into a perfectly working state, and that each type of transaction you are dealing with is fully covered. You can even validate that WebHooks are working by pointing them at your application's test API endpoints.
There's not really a way of 'testing' inside of the live environment as such - typical practice would be to make a real transaction using a company credit card, or one that you are in control of. You can then logon to Stripe Admin and refund the payment once it succeeds.
This is the same with most payment gateways, although there are some that have test mode built into the live API, and used via a specific header, parameter or tracking identifier. Although, this is really just the same end result - you are still testing in test mode.
Use a 100% off coupon and no monies will be transacted. This should allow you to test the flow of things in livemode and make sure everything is in sync without posing a threat to Stripe as a company or your Stripe account.
Note: If you're testing a stripe subscription, you should immediately end the subscription, and delete the "customer" before you forget and it's ACTUALLY processed the next billing cycle.
Here's an example of creating and using 100% off coupons.
Disclaimer: I have NOT tested this method. But I believe my theory is correct.
You can use Customer Credit Balance (https://stripe.com/docs/billing/customer/balance) and use real credit cards to do some final testing of your live implementation. I just did it, it works perfectly and no charge is being done.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With