Hyperswitch control center is an open source dashboard to easily view, manage and control your payments across multiple processors through Hyperswitch - an open source payments switch.
- Connect to multiple payment processors like Stripe, Braintree, Adyen etc. in a few clicks
- View and manage payments (payments, refunds, disputes) processed through multiple processors
- Easily configure routing rules (volume-based, rule-based) to intelligently route your payments
- Advanced analytics to make sense of your payment data
- Node.js and npm installed on your machine.
Follow these simple steps to set up Hyperswitch on your local machine.
-
Clone the repository:
git clone https://github.com/juspay/hyperswitch-control-center.git
-
Navigate to the project directory:
cd hyperswitch-control-center
-
Install project dependencies:
npm install --force
-
Update the config.toml file
api_url = your-backend-url sdk_url = your-sdk-url # To view Mixpanel events on the Mixpanel dashboard, you must add your Mixpanel token; otherwise, you can ignore this requirement.
-
Start the ReScript compiler:
npm run re:start
-
In another terminal window, start the development server:
npm run start
-
Access the application in your browser at http://localhost:9000.
docker run -p 9000:9000 -e default__endpoints__api_url=your-backend-url -e default__endpoints__sdk_url=your-sdk-url juspaydotin/hyperswitch-control-center:latest
Once the containers are up and running, you can access the application by navigating to http://localhost:9000 in your web browser.
Feature flags allow the users to enable or disable certain functionalities or flows in the control center.
The config.toml file can be found under config/config.toml. By default, all the feature flags are turned off (False
value).
The generate_report
feature flag controls the ability to generate detailed reports on payments, refunds, and disputes. When enabled, this allows users to pull reports covering the previous 6 months of transaction data. The reports can provide insights into trends, identify issues, and inform business decisions.
The mixpanel
feature flag controls the collection and transmission of anonymous usage data to Mixpanel for analytics. When enabled, the dashboard will automatically send information about user actions and events to Mixpanel without collecting any personally identifiable information via REST API.
The feedback
feature flag enables the ability for users to provide direct product feedback from within the dashboard. When enabled, a feedback modal will be available in the UI that allows users to rate features, report bugs, and suggest improvements. Disabling this flag will remove the feedback modal and prevent collection of any user data.
The test_processors
feature flag allows enabling sandbox/test payment processors for testing purposes. When enabled, developers and testers can add test payment processors like Stripe Test or PayPal Test to trial payment flows without touching live transactions or making processor API calls.
The recon
feature flag enables access to reconciliation capabilities in the Hyperswitch dashboard. When turned on, this unlocks the Reconciliation module that allows users to match payment transactions with bank/ledger entries for accounting purposes.
The payout
feature flag enables the payout functionality in the dashboard. When enabled, this allows users to configure payout profiles, manage recipient details, schedule disbursements, and process payout batches to pay out funds to third parties.
The frm
feature flag enables the Fraud and Risk Management (FRM) module within the dashboard. When enabled, this unlocks integrations with FRM players like Riskified and Signified.
The sample_data
feature flag enables the ability to load simulated sample data into the dashboard for preview purposes. When enabled, dummy transactions, analytics, and reporting data can be generated.
The system_metrics
feature flag unlocks access to system monitoring and metrics pages within the dashboard. When enabled, users can view technical performance data like payment latency, uptime, API response times, error rates, and more.
The audit_trail
feature flag enables access to payment and refund audit logs within the dashboard. When turned on, users can view detailed trails showing the history of transactions including status changes, approvals, edits, and more.
The test_live_toggle
feature flag enables users to toggle between test and live modes when signing in. When enabled, users will see an option during sign-in to actively switch between test and live environments.
The is_live_mode
feature flag enables the live mode - that the user is accessing. When enabled, it will show a visual indicator within the dashboard signaling whether the user is currently in a test environment or live production environment.
In Live mode, current users are not allowed to sign up. Users must be created manually.
The email
feature flag enables user sign-in and sign-up using magic links instead of passwords. When enabled, users can request a magic link via email that logs them into their account or creates a new account if they are signing up.
The surcharge
feature flag enables the ability to apply surcharges to payments. When enabled, you can create advanced rules based on payment parameters like amount, currency, and payment method to enforce surcharges as needed.
Enabling user_journey_analytics
grants access to the user journey module within the analytics section of the dashboard. This feature provides comprehensive graphical representations of payment analytics, facilitating a deeper understanding of user behavior and usage patterns.
Enabling branding
feature flag enables customization of branding elements like logos, colors.
Priamry color,logo and favicon can customizied by setting the values in the config.toml
[default.theme]
primary_color="#006DF9"
primary_hover_color="#005ED6"
sidebar_color="#242F48"
[default.endpoints]
logo_url=""
favicon_url=""
You can override these default values either by exporting them directly
export default__theme__sidebar_color="#3b0764";
export default__features__threeds_authenticator=true;
export default__features__is_live_mode=true;
Or, you can set these values as environment variables by defining them in the .env
file and pass the file
during the docker run command
docker run -p 9000:9000 --env-file=.env juspaydotin/hyperswitch-control-center:latest
What you need to get started
- An AWS account
P.S. You can directly start from Step 3 if you have installed and configured AWS CLI.
For more information, click here
For Linux x86 (64-bit)
- Run the following command on your terminal
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- Confirm the installation with the following command
aws --version
- Expected Response: aws-cli/2.10.0 Python/3.11.2 Linux/4.14.133-113.105.amzn2.x86_64 botocore/2.4.5
For Linux ARM
- Run the following command on your terminal
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- Confirm the installation with the following command
aws --version
- Expected Response: aws-cli/2.10.0 Python/3.11.2 Linux/4.14.133-113.105.amzn2.x86_64 botocore/2.4.5
For MacOS
- Run the following command on your terminal
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
- To verify that the shell can find and run the aws command in your $PATH, use the following commands
which aws
- Expected Response: /usr/local/bin/aws
For this step you would need the following from your AWS account
- Access key ID
- Secret Access Key
You can create or manage your access keys from the Security Credentials tab inside your AWS Console. For more information, click here
Once you have the keys run the below command
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
You can now deploy the hyperswitch application by running the below command in the same terminal session.
curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aws/hyperswitch_control_center_aws_setup.sh | bash
This step takes around 10-15min
Once the script is executed, you will receive a Public IP as the response (e.g. http://34.207.75.225). This IP is the base URL for accessing the application's APIs
If you want to delete the application from your account simply run the below clean up script. You need to install JQ for this. For more information, click here
curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aws/hyperswitch_control_center_cleanup_setup.sh | bash
For a detailed list of changes made in each version, please refer to the CHANGELOG file.
We welcome contributions from the community! If you would like to contribute to Hyperswitch, please follow our contribution guidelines.
We follow the Conventional Commits specification for our commit messages. Each commit message should have a structured format:
<type>(<subject>): <description>
The commit message should begin with one of the following keywords followed by a colon: 'feat', 'fix', 'chore', 'refactor', 'docs', 'test' or 'style'. For example, it should be formatted like this: feat: <subject> - <description>
All commits should be signed to verify the authenticity of contributors. Follow the steps below to sign your commits:
-
Generate a GPG key if you haven't already:
gpg --gen-key
-
List your GPG keys and copy the GPG key ID::
gpg --list-secret-keys --keyid-format LONG
a. Run the following command to export your GPG public key in ASCII-armored format:
gpg --armor --export <GPG_KEY_ID>
Replace <GPG_KEY_ID> with the actual key ID.
b. Copy the entire output, including the lines that start with "-----BEGIN PGP PUBLIC KEY BLOCK-----" and "-----END PGP PUBLIC KEY BLOCK-----".
c. Go to your GitHub Settings.
d. Click on "SSH and GPG keys" in the left sidebar.
e. Click the "New GPG key" button.
f. Paste your GPG public key into the provided text box.
g. Click the "Add GPG key" button.
h. Now your GPG public key is associated with your GitHub account, and you can sign your commits for added security.
-
Configure Git to use your GPG key:
git config --global user.signingkey <GPG_KEY_ID>
-
Set Git to sign all your commits by default:
git config --global commit.gpgSign true
-
Commit your changes with the -S option to sign the commit:
git commit -S -m "your commit message"
For further assistance, please refer to the GitHub documentation on signing commits.
Welcome to the standard process for raising a Pull Request (PR) directly from a branch in our project! Please follow these guidelines to ensure that your contributions align with our project's goals and standards.
-
Clone the Repository:
- Clone the main repository to your local machine using the following command:
git clone https://github.com/juspay/hyperswitch-control-center.git
- Clone the main repository to your local machine using the following command:
-
Create a New Branch:
- Create a new branch for your changes directly in the main repository. Please ensure the branch name is descriptive and relates to the feature or bug you're addressing.
git checkout -b feature/your-feature-name
- Create a new branch for your changes directly in the main repository. Please ensure the branch name is descriptive and relates to the feature or bug you're addressing.
-
Make Changes:
- Make the necessary changes in the codebase, ensuring that you follow the project's coding guidelines and standards.
-
Commit Changes:
- Commit your changes with a clear and descriptive commit message. Please follow conventional commit guidelines.
-
Push Changes:
- Push your changes to the branch in the main repository.
git push origin feature/your-feature-name
- Push your changes to the branch in the main repository.
-
Create a Pull Request:
- Navigate to the main repository on GitHub and create a new PR from your branch. Provide a detailed description of the changes, along with any relevant context or screenshots.
-
Respond to Feedback:
- Be responsive to feedback from reviewers. Address any comments or suggestions promptly and make the necessary changes as required.
- Ensure your PR adheres to our coding guidelines, style conventions, and documentation standards.
- Include relevant tests, documentation updates, or screenshots, if applicable.
- Collaborate and communicate effectively with other contributors and maintainers throughout the review process.
npm run build:test
npm run test:start
-
To run tests interactively in Cypress Test Runner:
npm run cy:open
-
To run tests in headless mode (CI/CD):
npm run cy:run
- Make sure to run the Hyperswitch backend locally by following the instructions at https://github.com/juspay/hyperswitch.
- Once the backend is running, follow the steps in Running Tests to execute the Cypress test suite.
This project is open-source and available under the Apache 2.0 license.