---
README.md | 218 ++++++++++++++++++++++--------------------------------
1 file changed, 90 insertions(+), 128 deletions(-)
diff --git a/README.md b/README.md
index e592c72dd..b420aaf8a 100644
--- a/README.md
+++ b/README.md
@@ -20,23 +20,17 @@ Web unified checkout SDK is an inclusive, consistent and blended payment experie
Quick Start Guide •
- Setup Instructions •
- Fast Integration for Stripe Users •
-
- Connect your Hyperswitch self Hosted Server •
- FAQs
+ Local Setup Instructions •
+ Backend Server •
+ FAQs
Join us in building HyperSwitch •
- Community •
- Bugs and feature requests •
- Versioning •
- Copyright and License
+ Community •
+ Bugs and feature requests •
+ Copyright and License
-
@@ -53,120 +47,125 @@ While the Unified Checkout is pre-optimized for maximum conversions, it does not
- 💳 **Prioritizing payment methods** by 90% to add & maintain integrations
- 🎨 **Switching themes and layouts of checkout page** with full visibility and control
-
-
-
- ⚡️ Quick Start Guide
-
+## ⚡️ Quick Start Guide
Ways to get started with Hyperswitch:
### Try it in our Sandbox Environment: Fast and easy to start.
-- To integrate Hyperswitch into your project, follow these steps:
+ To integrate Hyperswitch into your project, follow these steps:
- 1. **Register**: Begin by registering at [Hyperswitch](https://app.hyperswitch.io/register) to gain access to your dashboard.
+1. **Register**: Begin by registering at [Hyperswitch](https://app.hyperswitch.io/register) to gain access to your dashboard.
- 2. **Access Your Dashboard**: Once logged in, navigate to your dashboard's home page.
+1. **Access Your Dashboard**: Once logged in, navigate to your dashboard's home page.
- 3. **Find Your Keys**: In the sidebar, locate the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/developer-api-keys). Here, you can generate your API Key. Additionally, your Publishable Key is available within the same section.
+1. **Find Your Keys**: In the sidebar, you can find your [API Keys](https://app.hyperswitch.io/developer-api-keys). Here, you can also generate your API Key. Additionally, your Publishable Key is available within the same section.
- 4. **Integration**: After obtaining your Keys add them to your project's environment variables or configuration file for seamless integration.
+1. **Integration**: After obtaining your Keys add them to your project's environment variables or configuration file for seamless integration.
-### For local setup
+### 🛠️ Try it in Local
-- Install in your local system: Configurations and setup required in your system. Suitable if you like to customise the core offering, [learn more](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md)
+ Before you start the local setup, you need to understand a few configs -
-- If you are running our backend locally, you can use our [Postman Collection](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md#try-out-our-apis) for generating the API Key and Publishable Key.
+- #### Env Configs for Demo App
-
- 🛠️ Setup Instructions
-
+ - **`HYPERSWITCH_PUBLISHABLE_KEY`:** The publishable key of your Hyperswitch account. This key will start with `pk_dev_` for local development, `pk_snd_` for sandbox, and `pk_prd_` for production.
-Before you start the local setup, you will need an understanding of few keys -
+ - **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account that is used to authenticate API requests from your merchant server. On the Hyperswitch Dashboard, locate the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/developer-api-keys). Here, you can generate your API Key.
-### About Env Configs for Demo App
+ - **`HYPERSWITCH_SERVER_URL`:** The URL of your hosted Hyperswitch backend server. Alternatively, you can use our Sandbox URL (https://sandbox.hyperswitch.io) or specify your backend running locally (e.g., http://localhost:8080).
-- **`HYPERSWITCH_PUBLISHABLE_KEY`:** The publishable key of your Hyperswitch account. This key will start with `pk_dev_` for local development, `pk_snd_` for sandbox, and `pk_prd_` for production.
+ - **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK. You can also use our Sandbox URL (https://beta.hyperswitch.io/v1) or specify your app running locally (e.g., http://localhost:9050).
-- **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account.
+ - **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs. (eg: http://localhost:9060/payments)
-- **`HYPERSWITCH_SERVER_URL`:** The URL of your hosted Hyperswitch backend server. Alternatively, you can use our Sandbox URL (https://sandbox.hyperswitch.io) or specify your backend running locally (e.g., http://localhost:8080).
+- #### Env Configs for SDK
-- **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK. You can also use our Sandbox URL (https://beta.hyperswitch.io/v1) or specify your app running locally (e.g., http://localhost:9050).
+ - **`ENV_BACKEND_URL`:** Sets the endpoint for all the APIs used within the SDK to interact with the backend service. If you are running your own backend service, you can configure and specify its endpoint here for local setups.
-- **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs. (eg: http://localhost:9060/payments)
+ - **`ENV_LOGGING_URL`:** Specifies a custom logging endpoint where logs generated by the SDK can be sent. This allows you to view and manage logs according to your requirements.
-### About Env Configs for SDK
+ ### Setup Node
-- **`ENV_BACKEND_URL`:** Sets the endpoint for all the APIs used within the SDK to interact with the backend service. If you are running your own backend service, you can configure and specify its endpoint here for local setups.
+ Check if your machine has node already installed by running the below command on your local machine.
-- **`ENV_LOGGING_URL`:** Specifies a custom logging endpoint where logs generated by the SDK can be sent. This allows you to view and manage logs according to your requirements.
+ ```bash
+ node -v
+ ```
-### Setup Node
+ If your machine does not have node installed in it, you can install it from [here](https://nodejs.org/en/download)
-Check if your machine has node already installed by running the below command on your local machine.
+
Clone the repo
-```bash
-node -v
-```
+ Clone the repository from Bitbucket and save in your folder.
-If your machine does not have node installed in it, you can install it from [here](https://nodejs.org/en/download)
+ ```bash
+ git clone https://github.com/juspay/hyperswitch-web.git
+ cd hyperswitch-web
+ ```
-### Clone the repository
+ ### Setup the repo
-Clone the repository from Bitbucket and save in your folder.
+ 1. First install all the node modules by running the following command
-```bash
-git clone https://github.com/juspay/hyperswitch-web.git
-cd hyperswitch-web
-```
+ ```bash
+ npm install
+ ```
-### Setup the repository
+ 2. Once the installation is successful, you can open two terminals.
-First install all the node modules by running the following command
+ - On the first terminal run the following command for generating the build:
-```bash
-npm install
-```
+ ```bash
+ npm run re:start
+ ```
-Once the installation is successful, you can run the app with the following command in one terminal - `npm run re:start` and `npm run start` on the other terminal for starting the server.
+ - On the second terminal, run the following command for starting the server.
-This will trigger a build of the project. On a successful build, you should see a message 'Compiled successfully' in your terminal.
+ ```bash
+ npm run start
+ ```
-Now you can proceed with launching the playground. The playground is a demo app where you can test your payments. In a separate terminal, run the following command to start the app on your local machine.
+ Upon success, you should see a message _Compiled successfully_ message on both of your terminals.
-```bash
-npm run start:playground
-```
+ 3. Now that the build is generated successfully, on a third terminal, launch the playground.
-**NOTE** - Alternatively, you can update `.env` file and use these commands
+ ```bash
+ cd Hyperswitch-React-Demo-App
+ npm install
+ npm run start
+ ```
-```bash
-cd Hyperswitch-React-Demo-App
-npm install
-npm run start
-```
+ This will open a demo app where you can test your payments.
-
- ⛁ Custom Backend
-
+ > 💡 Alternatively, you can update `.env` file and use the commands
+ > above
-For configuring `customBackendUrl`, when calling Hyper function you can pass the customBackendUrl in props
+## ⛁ Backend Server
-In Payment.js file -
+There are two ways to set up the backend:
-```javascript
-window.Hyper(publishableKey, {
- customBackendUrl: `CUSTOM_BACKEND_URL`,
-});
-```
+- ### Local Setup
-**Warning:** Please maintain API compatibility of your server and web app. If any API contracts are manually changed without the corresponding handling in the SDK, there is a possibility of the application not working as expected. Please ensure that you use the compatible versions. The latest [releases](https://github.com/juspay/hyperswitch/releases) will have the additional details of the compatible versions of the app server, web app, and the control center.
+ - Install in your local system: Configurations and setup required in your system. Suitable if you like to customise the core offering, [learn more](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md)
-
- 📊 Custom Logging
-
+ - If you are running our backend locally, you can use our [Postman Collection](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md#try-out-our-apis) for generating the API Key and Publishable Key.
+
+- ### Custom Backend
+
+ For configuring `customBackendUrl`, when calling Hyper function you can pass the customBackendUrl in props
+
+ In Payment.js file -
+
+ ```javascript
+ window.Hyper(publishableKey, {
+ customBackendUrl: `CUSTOM_BACKEND_URL`,
+ });
+ ```
+
+ **Warning:** Please maintain API compatibility of your server and web app. If any API contracts are manually changed without the corresponding handling in the SDK, there is a possibility of the application not working as expected. Please ensure that you use the compatible versions. The latest [releases](https://github.com/juspay/hyperswitch/releases) will have the additional details of the compatible versions of the app server, web app, and the control center.
+
+## 📊 Custom Logging
Logging from the payment checkout web client is crucial for tracking and monitoring the flow of payments. It provides a transparent record of events, errors, and user interactions, aiding developers and support teams in identifying issues, debugging, and ensuring the security and reliability of payment processes. Well-implemented logging enhances traceability and facilitates a more efficient resolution of potential problems in the payment checkout experience.
@@ -198,9 +197,7 @@ let loggingLevel = "DEBUG";
Now let's test the integration by making a payment from your web client!
-
- 🔌 Integrate Hyperswitch on your App
-
+## 🔌 Integrate Hyperswitch on your App
Now that the project is up and running, integrating Hyperswitch on your web-app is fast &
easy.
@@ -211,9 +208,7 @@ Follow the instructions detailed on our
[dashboard]: https://app.hyperswitch.io/register
[hyperswitch-docs]: https://hyperswitch.io/docs/sdkIntegrations/unifiedCheckoutWeb/
-
- 🤔 FAQs
-
+## 🤔 FAQs
Got more questions?
Please refer to our [FAQs page][faqs].
@@ -230,21 +225,7 @@ Please refer to our [FAQs page][faqs].
- Klarna
- Kount
-
-
-
- 💪 Join us in building Hyperswitch
-
+## 💪 Join us in building Hyperswitch
### 🤝 Our Belief
@@ -287,20 +268,13 @@ The product roadmap is open for the community's feedback.
We shall evolve a prioritisation process that is open and community-driven.
We welcome contributions from the community.
-
-
-
-
-
+## Community
Get updates on Hyperswitch development and chat with the community:
- Read and subscribe to [the official Hyperswitch blog][blog].
- Join our [Discord server][discord].
- Join our [Slack workspace][slack].
-
[blog]: https://hyperswitch.io/blog
[discord]: https://discord.gg/wJZ7DVW8mm
@@ -309,25 +283,23 @@ Get updates on Hyperswitch development and chat with the community:
-
- 🐞 Bugs and feature requests
-
+## Bugs and feature requests
Please read the issue guidelines and search for [existing and closed issues].
If your problem or idea is not addressed yet, please [open a new issue].
@@ -335,21 +307,11 @@ If your problem or idea is not addressed yet, please [open a new issue].
[existing and closed issues]: https://github.com/juspay/hyperswitch-web/issues
[open a new issue]: https://github.com/juspay/hyperswitch-web/issues/new/choose
-
-
-
- ©️ Copyright and License
-
+## © Copyright and License
This product is licensed under the [Apache 2.0 License](LICENSE).
-
- ✨ Thanks to all contributors
-
+## Thanks to all contributors
Thank you for your support in hyperswitch's growth. Keep up the great work! 🥂