That is all it takes to setup Stripe in your application. Stripe also has tons of other cards you can use for testing that result in different error/success messages. If you want to test for a successful charge just use a card with the number 4242 4242 4242 4242, an expiration date in the future, and any CVC.
![stripe ui browser stripe ui browser](https://backup-blog.risingstack.com/content/images/2019/01/Stripe-Payments-Dashboard-Coupon-Creation.png)
With this API key you can create charges that will show up in the test data section of your Stripe account without actually spending any real money. It is important to note that Stripe has a test and live mode, though, and that you will want to make sure you click the View test data toggle in the sidebar to access your test API key to use in development. Now in order to get your Stripe private key you just need to go to your Stripe account dashboard under the Developers section in the sidebar and click on API Keys. Inside that file we want to store key value pairs for our Stripe private key and our server url.
STRIPE UI BROWSER CODE
This is all the code we need to write for the project, but we still need to finish setting up our environment variables. This URL will direct the user to Stripe checkout page where they can enter all their payment information.
STRIPE UI BROWSER FULL
Initiate a POST request to the server // If the server is on a different domain than the client // then this needs to be the full url // fetch ( "/create-checkout-session", )