Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions about-hyperswitch/ai-resources/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Interact with the Hyperswitch ecosystem through AI-powered documentation and MCP server for executing real API operations via natural language
description: Interact with the Juspay Hyperswitch ecosystem through AI-powered documentation and MCP server for executing real API operations via natural language
hidden: true
noIndex: true
icon: brain-circuit
Expand All @@ -9,7 +9,7 @@ icon: brain-circuit

AI resources enable you to intelligently interact with the entire Hyperswitch ecosystem through conversational AI. Whether you're a developer, product manager, or business stakeholder, you can ask both technical and non-technical questions, execute real API operations, and verify results - all through natural language conversations.

#### 1. DeepWikis - AI-Powered Documentation
### 1. DeepWikis - AI-Powered Documentation

Transform how you explore and understand Hyperswitch with AI-enhanced documentation across the entire ecosystem.

Expand Down Expand Up @@ -49,7 +49,7 @@ Transform how you explore and understand Hyperswitch with AI-enhanced documentat

</details>

#### 2. MCP Server - Direct API Integration
### 2. MCP Server - Direct API Integration

Execute real [Hyperswitch API](https://api-reference.hyperswitch.io/introduction) operations directly through your AI assistant using the [Model Context Protocol](https://modelcontextprotocol.io/introduction).

Expand Down
13 changes: 6 additions & 7 deletions about-hyperswitch/ai-resources/setup-mcp-server.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Configure the Hyperswitch MCP server to execute sandbox API operations directly through your AI assistant using natural language commands
description: Configure the Juspay Hyperswitch MCP server to execute sandbox API operations directly through your AI assistant using natural language commands
icon: user-robot-xmarks
---

Expand All @@ -14,11 +14,11 @@ This MCP server is only meant for product exploration while using sandbox enviro

**MCP URL:** `https://api-reference.hyperswitch.io/mcp`

#### Step 1: Configure the Hyperswitch-Mintlify MCP server
### Step 1: Configure the Hyperswitch-Mintlify MCP server

Hyperswitch's Mintlify MCP server lets your AI client search Hyperswitch docs and safely explore Sandbox APIs as tools (e.g., create a payment and get a 3DS/redirect URL).

##### Recommended: Claude Code
#### Recommended: Claude Code

Add it via CLI:
```bash
Expand All @@ -32,12 +32,11 @@ Run `claude` and verify if MCP was configured properly using `/mcp`. You should

![Verifying the MCP server](../../.gitbook/assets/mcp-verify.png)

##### For configuring other MCP clients (Cursor / Claude Desktop / etc.)
#### For configuring other MCP clients (Cursor / Claude Desktop / etc.)

Follow Mintlify's [client-specific setup guide](https://www.mintlify.com/docs/ai/model-context-protocol?_gl=1*1m5cmfd*_gcl_au*MTY1NjU2NDE1LjE3NjY0NzY1MzE.#example:-connect-to-the-mintlify-mcp-server) using the same MCP: `https://api-reference.hyperswitch.io/mcp`


#### Step 2: Make your first payment
### Step 2: Make your first payment

Paste below prompt in your AI client after replacing with your sandbox `API_KEY`:

Expand All @@ -46,7 +45,7 @@ Make a 100 EUR payment via Hyperswitch V1 in sandbox.
Sandbox API key: <YOUR_SANDBOX_API_KEY>
```

##### **Output:**
#### **Output:**

You can head on to payment section in [Hyperswitch Control Center](https://app.hyperswitch.io/dashboard/payments) and verify the payment with the time stamp and status as `REQUIRES_CUSTOMER_ACTION` (depending on the flow you selected - 3DS vs No3DS).

Expand Down
24 changes: 11 additions & 13 deletions about-hyperswitch/payment-suite-1/payment-method-card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Juspay Hyperswitch provides flexible payment processing with multiple flow patte

### Server-to-Server (S2S) Payments (Tokenize followed by Payment)

Refer to this section if you intend to use the SDK exclusively for vaulting/storing card details. In this scenario, the actual payment execution is handled via S2S API calls from your backend to Hyperswitch, offering you more granular control over the transaction lifecycle.
Refer to this section if you intend to use the SDK exclusively for vaulting/storing card details. In this scenario, the actual payment execution is handled via S2S API calls from your backend to Juspay Hyperswitch, offering you more granular control over the transaction lifecycle.
{% endhint %}

Payment method flows leverages all the capabilities available in [Payments](https://docs.hyperswitch.io/~/revisions/Moc8cqgBbfb8T8KrBi8V/about-hyperswitch/payment-suite-1/payments-cards). The primary goal here is to allow the business to control the payment journey via S2S APIs and a token or `payment_method_id`&#x20;
Expand All @@ -21,19 +21,17 @@ The business can use the Payment Method SDK or `/payment-methods` API to first c

The business can then use the `payment_method_id` in `/payments` API to perform all functionalities supported by the [Payments](https://docs.hyperswitch.io/~/revisions/Moc8cqgBbfb8T8KrBi8V/about-hyperswitch/payment-suite-1/payments-cards) flow.&#x20;

#### **Payment Method Lifecycle**
### **Payment Method Lifecycle**

The Payment Method flow leverages the full suite of Juspay Hyperswitch [Payment](https://docs.hyperswitch.io/~/revisions/Moc8cqgBbfb8T8KrBi8V/about-hyperswitch/payment-suite-1/payments-cards) capabilities while granting businesses granular control over the user journey. By utilizing Server-to-Server (S2S) APIs and unique identifiers `payment_method_id`, businesses can separate the collection of payment credentials from the actual transaction logic.

#### **The Two-Step Integration Pattern**
### **The Two-Step Integration Pattern**



##### 1. **Credential Capture & Vaulting**
#### 1. **Credential Capture & Vaulting**

The business initiates the flow by capturing payment details (such as cards, wallets, or bank accounts) using either the Payment Method SDK or the `/payment-methods` API. This process securely vaults the payment instrument and generates a unique `payment_method_id`.

##### 2. **Transaction Execution**
#### 2. **Transaction Execution**

Once the `payment_method_id` is generated, it serves as a reusable token. The business can pass this ID into the /payments API to execute any supported [Payment](https://docs.hyperswitch.io/~/revisions/Moc8cqgBbfb8T8KrBi8V/about-hyperswitch/payment-suite-1/payments-cards) functionality without re-collecting sensitive data.

Expand All @@ -42,9 +40,9 @@ The `payment_method_id` serves as a unique identifier mapped to a specific combi
* Logic: A single customer can have multiple payment methods, each assigned a distinct ID. However, the same payment instrument used by the same customer will always resolve to the same `payment_method_id`.
* Scope: This uniqueness applies across all payment types, including cards, wallets, and bank details.

| **Customer ID** | **Payment Instrument** | **Payment Method ID** |
| --------------- | --------------------------------- | --------------------- |
| 123 | Visa ending in 4242 | `PM1` |
| 123 | Mastercard ending in 1111 | `PM2` |
| 456 | Visa ending in 4242 | `PM3` |
| 123 | PayPal Account (`user@email.com`) | `PM4` |
| **Customer ID** | **Payment Instrument** | **Payment Method ID** |
| --------------- | --------------------------------- | --------------------- |
| 123 | Visa ending in 4242 | `PM1` |
| 123 | Mastercard ending in 1111 | `PM2` |
| 456 | Visa ending in 4242 | `PM3` |
| 123 | PayPal Account (`user@email.com`) | `PM4` |
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ icon: money-bills-simple

The Payment Method SDK provides APIs to securely capture and tokenize payment credentials, with support for vaulting payment details during the initial checkout flow. Upon successful vaulting, a persistent payment method ID is generated, which merchants can store and use to programmatically initiate subsequent transactions without re-collecting sensitive payment data.

#### **Key Features**
### **Key Features**

* **Full Token Management** – Create, retrieve, update, and delete payment tokens directly from your server.
* **PSP and Network Tokenization** – Generate both PSP tokens and network tokens through a single API.
* **Secure Storage** – Store tokens safely in Hyperswitch's Vault.
* **Secure Storage** – Store tokens safely in Juspay Hyperswitch's Vault.
* **Reduced Frontend Complexity** – Shift tokenization processes to the backend, minimizing frontend dependencies.

### Understanding Payment and Vault Flow



<figure><img src="../../../.gitbook/assets/Payment Method SDK (1).svg" alt=""><figcaption></figcaption></figure>

#### **Vaulting :**
### **Vaulting :**

**1. Create Customer (Server-Side)**

Expand All @@ -43,7 +41,7 @@ Hyperswitch receives the request, securely stores the raw card data in the Vault

Hyperswitch returns the `payment_method_id` in the response. You can use this payment method ID for future payments for this customer without handling sensitive card data again.

#### **Payment :**&#x20;
### **Payment :**&#x20;

To charge the customer you will have to call the [create and confirm](https://api-reference.hyperswitch.io/v2/payments/payments--create-and-confirm-intent) API and pass the `payment_method_id` along with `confirm` as `true`

Expand Down
Loading