Saleor Payments via Hyperswitch
Hyperswitch is a community-led, open payments switch that provides access to the best payments infrastructure for every digital business. By using Hyperswitch, you can reduce dependency on a single processor, decrease development effort by 90% for adding and maintaining integrations, lower processing fees with smart routing, improve success rates with seamless failover and auto-retries, and expand business reach with local and alternate payment methods.
Saleor is an open-source e-commerce platform designed to meet the needs of modern digital businesses. With Saleor, you can easily create and customize your online store, leveraging a flexible architecture and a robust set of features. It allows for seamless integration with various services, provides scalable solutions to accommodate growth, and supports multiple sales channels to reach a wider audience. Saleor's API-first approach ensures efficient development workflows and a superior shopping experience for customers
With this plugin, you can integrate Hyperswitch as a payment app to handle payment processing for your Saleor storefront.
IMPORTANT: To configure the Hyperswitch Saleor App, you must have an account with Hyperswitch.
The Hyperswitch Saleor App supports integrations with the Hyperswitch SDK and Hyperswitch Payment Links
The Hyperswitch Saleor App implements the following Saleor synchronous events related to transactions:
PAYMENT_GATEWAY_INITIALIZE_SESSION
TRANSACTION_INITIALIZE_SESSION
TRANSACTION_PROCESS_SESSION
TRANSACTION_CHARGE_REQUESTED
TRANSACTION_CANCEL_REQUESTED
TRANSACTION_REFUND_REQUESTED
Furthermore, it's also prepared to handle Hyperswitch incoming webhooks.
Hyperswitch Saleor App follows the flow described in detail in the Saleor Payment App documentation.
Before you start, make sure you have installed:
-
Create an
.env
file -
Install dependency
pnpm install
- Start the local server with:
pnpm dev
-
Expose local environment using tunnel: Use tunneling tools like localtunnel or ngrok.
-
Install the application in your dashboard:
If you use Saleor Cloud or your local server is exposed, you can install your app by following this link:
[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APP_TUNNEL_MANIFEST_URL]
YOUR_APP_TUNNEL_MANIFEST_URL = TUNNEL_URL/api/manifest
Commands build
and dev
would generate required schema and typed functions for Saleor's GraphQL endpoint and Hyperswitch's Rest API. Commit the generated
folder to your repo as they are necessary for queries and keeping track of the schema changes.