-
A Primer sandbox account 🚀
-
A handful of programs installed on your machine
node, andyarnornpm, that's it! 💪 -
5 minutes of your time
Then you can show your colleagues how powerful Universal Checkout is 😎
Clone this repository:
git clone https://github.com/primer-io/example-web-checkout.git
cd ./example-web-checkoutThen install the dependencies using yarn or npm:
# With yarn
yarn# With npm
npm iGrab your API Key, or create a new one, from the Primer Dashboard.
Copy env.example and name the file .env.
cp env.example .env
Open .env and set the environment variable API_KEY with the API key available on your dashboard.
# .env
API_KEY=1234-1234-1234-1234 # Your Primer API Key
# With yarn
yarn start
# With npm
npm startThe server is deployed on port 8880 by default. You can change the port by setting the PORT environment variable in the .env file.
This server uses nodemon under the hood to automatically re-run the server when a change to the source files or .env is made.
Check the checkout at http://localhost:8880/.
You should see Universal Checkout appear with the payment methods configured on your Dashboard! 🎉
- ✨ Explore the capabilities of your Dashboard
- 📚 Take a look at our Documentation to customize Universal Checkout to better fit your needs
- 📖 Explore our Web SDK Reference and Server API Reference
- 🎒 Learn more about how Primer works
- 🤙 Reach out to us at [email protected] if you are facing any issues
- 🤘 Join our developer community on Discord



