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?
-
1People use real cards and bank accounts in live mode, that's pretty much the only way. You can use coupons with Stripe as well as refunding the moneys after charges, subscriptions, etc. – Máté Jun 07 '17 at 07:05
-
4Test card numbers do not work in Live mode. That would be silly, anyone who knows you are using Stripe could use test credentials and basically steal from you or your users. If you want to test on production, you will need to use your (or your company's) own live payment information. – Jake T. Jun 15 '17 at 20:11
3 Answers
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.

- 4,230
- 1
- 17
- 22
-
37Just a note. I've been told explicitly by Stripe support **not** to use a personal / company card in production as "it can be interpreted as potential method of washing funds of their original source". Personally I find that crazy, as that means there is no way to smoke test in production. Sure, testing should happen in a test environment, but reality is never that clean – Chris Sep 27 '19 at 08:51
-
7Like with everything there's probably a gray area here. If you're doing this with thousands of dollars, that's a bit suspicious, but just testing a $10 purchase and refunding should be fine. – laurent Jun 06 '21 at 12:10
-
@laurent One would hope. But as soon as the auditors or whoever get in there, you've just got to hope they are reasonably smart, friendly, trusting, etc. I'm sure it's fine in almost every case – Nathan majicvr.com Oct 25 '22 at 17:46
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!

- 2,653
- 23
- 30
-
3
-
1
-
In our case we've been charged fee which hasn't been returned even after refund was issued, because in general the Stripe's policy is to charge fee for successful transaction anyway. – Tom Raganowicz Apr 26 '23 at 09:36
-
"No charge is being made" is completely inaccurate, you will always lose the Stripe transaction fee. – Hashim Aziz Jun 30 '23 at 15:50
This can be accomplished from the Stripe dashboard in one of two ways. The set up for both methods begins in the same way.
Navigate to the Customers section of the Stripe dashboard, and create a new Customer object for yourself (or your employees)
Once you've created the new Customer, add the card details for the real card that you or your developers will using to test the live Stripe integration. This step is necessary because Stripe uses the card number to associate any test payments you make with the Customer you just created.
With the new Customer still selected, you'll see an Actions dropdown to the top right of the Overview page.
From here, you can select one of two solutions to waive costs for your new Customer:
Create a permanent 100% discount by selecting Apply Coupon and following the New Coupon link to create a coupon that can then be applied to your Customer's account
Create a credit balance for your Customer by selecting Adjust Credit Balance and setting it to a sufficiently high value
I recommend the first as it allows for more control. In particular, coupons can be set to never expire, unlike credit balances that will eventually hit 0 and require you to remember to reset it.
To prevent abuse or avoid creating an exploit for potential attackers, you can even set the coupon to be redeemed only as many times as you intend to redeem it, preventing it from being applied by anyone who doesn't require it to test your Stripe integration. In the below screenshot, I've set it to be one-time use.

- 4,074
- 5
- 38
- 68