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
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
description: >-
Explore Copy of Payments to enhance your payment orchestration capabilities
hidden: true
icon: money-bills-simple
---

# Copy of Payments

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.
* **Reduced Frontend Complexity** – Shift tokenization processes to the backend, minimizing frontend dependencies.

#### Understanding Payment and Vault Flow

### 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 @@ -42,7 +42,7 @@ Your server makes a [`/v2/payment-methods`](https://api-reference.hyperswitch.io

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 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`&#x20;

Expand All @@ -59,6 +59,6 @@ To generate your Vault API keys, follow these steps:

**Integration Documentation -**&#x20;

* [S2S Vault Tokenization](https://docs.hyperswitch.io/~/revisions/TGn71uwTlQJmyyiYgHpt/explore-hyperswitch/payments-modules/vault/server-to-server-vault-tokenization)
* [S2S Vault Tokenization](https://docs.hyperswitch.io/~/revisions/TGn71uwTlQJmyyiYgHpt/explore-Hyperswitch/payments-modules/vault/server-to-server-vault-tokenization)
* [Create Payment API](https://api-reference.hyperswitch.io/v1/payments/payments--create)
* [Payment Create and Confirm API](https://api-reference.hyperswitch.io/v2/payments/payments--create-and-confirm-intent)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
description: Hyperswitch is designed to facilitate the management of saved payment methods
description: >-
Explore Payment Methods Management to enhance your payment orchestration capabilities
icon: bars-progress
---

# Payment Methods Management

The Hyperswitch Payment Methods Management SDK provides a secure solution for merchants to handle and store payment information without the burden of PCI DSS compliance requirements. By leveraging Hyperswitch's Vault service, merchants can securely store customer payment methods (credit cards, digital wallets, etc.) while minimizing their exposure to sensitive payment data.
Expand All @@ -11,27 +11,27 @@ The Hyperswitch Payment Methods Management SDK provides a secure solution for me

Hyperswitch simplifies the complexities of payment method management, so you can offer a seamless, secure experience to your customers with minimal effort.

#### **Payment Method Creation**:&#x20;
### **Payment Method Creation**:&#x20;

Easily allow your customers to save new payment methods during checkout, providing a convenient option for future transactions.

#### **Storing Payment Methods**:&#x20;
### **Storing Payment Methods**:&#x20;

Hyperswitch securely stores customer payment details, enabling repeat purchases without requiring them to re-enter their information each time.

#### **Retrieving Payment Methods**:&#x20;
### **Retrieving Payment Methods**:&#x20;

Customers can quickly access their saved payment methods, streamlining their checkout process and enhancing their overall experience.

#### **Deleting/Deactivating Payment Methods**:
### **Deleting/Deactivating Payment Methods**:

Keep payment options up to date by allowing customers to manage outdated or inactive methods, ensuring a clean and efficient payment experience.

<figure><img src="../../../.gitbook/assets/Screenshot 2024-10-03 at 12.27.38 PM.png" alt="" width="563"><figcaption><p>image displaying the payment method management UI.</p></figcaption></figure>

### Integration Guide : <a href="#id-1.-server-side-setup" id="id-1.-server-side-setup"></a>

#### 1. Server-Side Setup <a href="#id-1.-server-side-setup" id="id-1.-server-side-setup"></a>
### 1. Server-Side Setup <a href="#id-1.-server-side-setup" id="id-1.-server-side-setup"></a>

First, you'll need to set up your server to create payment method sessions, which establish secure connections between your frontend and the Hyperswitch Vault.

Expand Down Expand Up @@ -60,7 +60,7 @@ app.post("/create-payment-method-session", async (req, res) => {
try {
// Create payment method session on Hyperswitch
const response = await fetch(
`${HYPERSWITCH_SERVER_URL}/v2/payment-method-sessions`,
`${Hyperswitch_SERVER_URL}/v2/payment-method-sessions`,
{
method: "POST",
headers: {
Expand Down Expand Up @@ -96,7 +96,7 @@ app.post("/create-payment-method-session", async (req, res) => {

> **Note**: Replace `YOUR_PROFILE_ID` and `YOUR_API_KEY` with your actual credentials from the Hyperswitch dashboard.

#### 2. Client-Side Integration <a href="#id-2.-client-side-integration" id="id-2.-client-side-integration"></a>
### 2. Client-Side Integration <a href="#id-2.-client-side-integration" id="id-2.-client-side-integration"></a>

Once your server endpoint is set up, you'll need to integrate the Vault/Payment Methods Management SDK into your client application.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
description: >-
Explore Payments to enhance your payment orchestration capabilities
icon: money-bills-simple
---

# Payments

The Payment Method SDK and `/payment-methods` API work in tandem with the `/payments` API to achieve any business objective as listed below. &#x20;
Expand Down Expand Up @@ -42,7 +43,7 @@ For logged-in user checkout flow the PM ID is unique to Customer + Payment metho

1. Create a PM session using the [Session Create API ](https://api-reference.hyperswitch.io/v2/payment-method-session/payment-method-session--create-v1)to get a [client secret](https://api-reference.hyperswitch.io/v2/payment-method-session/payment-method-session--create-v1#response-client-secret)
2. For guest user, pass "storage\_type" as "volatile" and skip sending the Customer ID
3. Initialize and mount the [Vault SDK](https://docs.hyperswitch.io/explore-hyperswitch/payments-modules/vault/vault-sdk-integration-1#id-2.2-fetch-the-payment-method-session-and-mount-the-payment-methods-management-element) using the client secret and session\_id&#x20;
3. Initialize and mount the [Vault SDK](https://docs.hyperswitch.io/explore-Hyperswitch/payments-modules/vault/vault-sdk-integration-1#id-2.2-fetch-the-payment-method-session-and-mount-the-payment-methods-management-element) using the client secret and session\_id&#x20;
4. The SDK now takes care of the following flows based on user action:
5. Post which the SDK submits the card details via the [PM Confirm API](https://api-reference.hyperswitch.io/v1/payments/payments--confirm) and returns back a [PM Token](https://api-reference.hyperswitch.io/v1/payments/payments--confirm#response-payment-token-one-of-0) (short-lived) in the response
6. Pass this PM token to Merchant Server and exchange for a PM ID from the server using the [PM token exchange API](https://api-reference.hyperswitch.io/v2/payment-methods/payment-method--payment-method-token-to-payment-method-id-v1)
Expand All @@ -55,7 +56,7 @@ Note - When using the HS SDK, the response always contains a temp token and you
### HS SDK Checkout for repeat customer - no CVV flow

1. Create a PM session using the [Session Create API ](https://api-reference.hyperswitch.io/v2/payment-method-session/payment-method-session--create-v1)to get a [client secret](https://api-reference.hyperswitch.io/v2/payment-method-session/payment-method-session--create-v1#response-client-secret)
2. Initialize and mount the [Vault SDK](https://docs.hyperswitch.io/explore-hyperswitch/payments-modules/vault/vault-sdk-integration-1#id-2.2-fetch-the-payment-method-session-and-mount-the-payment-methods-management-element) using the client secret and session\_id
2. Initialize and mount the [Vault SDK](https://docs.hyperswitch.io/explore-Hyperswitch/payments-modules/vault/vault-sdk-integration-1#id-2.2-fetch-the-payment-method-session-and-mount-the-payment-methods-management-element) using the client secret and session\_id
3. The SDK lists the previously saved cards for customers to select&#x20;
4. If the card has been vaulted previously with an MIT setup for it, CVV is not collected for it and the SDK returns back a [PM Token](https://api-reference.hyperswitch.io/v1/payments/payments--confirm#response-payment-token-one-of-0) (short-lived) in the responseNote - The PM ID in case of guest checkout is volatile in nature and has a default expiry of 1-hour which can be extended by Merchant at a session level

Expand Down
32 changes: 16 additions & 16 deletions about-hyperswitch/payment-suite-1/payment-method-card/proxy.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
description: Vault your card and use proxy end point for payment processing
description: >-
Explore Proxy to enhance your payment orchestration capabilities
icon: almost-equal-to
---

# Proxy

The Proxy Payments Service allows merchants to tokenize cards via Hyperswitch Vault and make API calls to PSPs using those tokens. The Vault intercepts these requests, replaces tokens with raw card data (de-tokenization), and forwards them securely to the PSP.
Expand All @@ -18,7 +18,7 @@ Key Highlights:

<figure><img src="../../../.gitbook/assets/image (3) (4).png" alt=""><figcaption></figcaption></figure>

#### **1. Create Payment Method Session (Server-Side)**&#x20;
### **1. Create Payment Method Session (Server-Side)**&#x20;

The merchant server initiates the flow by calling the Hyperswitch [`Create-payment-method-session`](https://api-reference.hyperswitch.io/v2/payment-method-session/payment-method-session--create#payment-method-session-create) API with the `customer_id`. Hyperswitch responds with a `session_id` and `client_secret`, which are required to authenticate the client-side session.

Expand All @@ -35,7 +35,7 @@ curl --request POST \
'
```

#### **2. Initialize SDK (Client-Side)**&#x20;
### **2. Initialize SDK (Client-Side)**&#x20;

The merchant client loads the `HyperLoader.js` script and initializes `window.Hyper` using the Publishable Key. Using the `session_id` and `client_secret`, the SDK creates a Payment Method Management (PMM) group and mounts the specific widget instance to the UI.

Expand Down Expand Up @@ -91,22 +91,22 @@ async function initialize() {
initialize();
```

#### **3. Collect and Vault Card (Client-Side)**&#x20;
### **3. Collect and Vault Card (Client-Side)**&#x20;

The customer enters their card details directly into the SDK-managed widget. Upon confirmation, the SDK calls the /`Confirm a payment method session` API. Hyperswitch securely receives the data, stores it in the Vault (retaining the CVV temporarily for the transaction TTL), and returns a success response with the `session_id` to the client.

#### **4. Retrieve Payment Method ID (Server-Side)**&#x20;
### **4. Retrieve Payment Method ID (Server-Side)**&#x20;

The merchant server calls the "List Payment Methods" API using the `session_id`. Hyperswitch returns a list of payment methods associated with the customer, from which the merchant server selects the appropriate `PM_ID` (Payment Method ID) to use for the transaction.

**Execute Proxy Payment (Server-Side)**&#x20;

The merchant server initiates the payment by sending a request to the [Hyperswitch vault proxy](https://docs.hyperswitch.io/~/revisions/01bZ2maqjwpnmrttix7i/explore-hyperswitch/payments-modules/vault/hyperswitch-vault-pass-through-proxy-payments) endpoint using the `payment_method_id` . The proxy securely replaces the token with the actual card data from the Vault and forwards the request to the Payment Service Provider (PSP), returning the final payment response to the merchant.
The merchant server initiates the payment by sending a request to the [Hyperswitch vault proxy](https://docs.hyperswitch.io/~/revisions/01bZ2maqjwpnmrttix7i/explore-Hyperswitch/payments-modules/vault/hyperswitch-vault-pass-through-proxy-payments) endpoint using the `payment_method_id` . The proxy securely replaces the token with the actual card data from the Vault and forwards the request to the Payment Service Provider (PSP), returning the final payment response to the merchant.

**New user payments flow**

1. Create Payment Method Session (Server-Side) The merchant server initiates the flow by calling the Hyperswitch&#x20;
2. [Initialize SDK (Client-Side) ](../../../explore-hyperswitch/payment-experience/payment-method/)The merchant client loads the `HyperLoader.js` script and initializes `window.Hyper` using the Publishable Key. Using the `session_id` and `client_secret`, the SDK creates a Payment Method Management (PMM) group and mounts the specific widget instance to the UI.
2. [Initialize SDK (Client-Side) ](../../../explore-Hyperswitch/payment-experience/payment-method/)The merchant client loads the `HyperLoader.js` script and initializes `window.Hyper` using the Publishable Key. Using the `session_id` and `client_secret`, the SDK creates a Payment Method Management (PMM) group and mounts the specific widget instance to the UI.
3. Collect and Vault Card (Client-Side) The customer enters their card details directly into the SDK-managed widget. Upon confirmation, the SDK calls the /`Confirm a payment method session` API. Hyperswitch securely receives the data, stores it in the Vault (retaining the CVV temporarily for the transaction TTL), and returns a success response with the `session_id` to the client.
4. Retrieve Payment Method ID (Server-Side) The merchant server calls the "List Payment Methods" API using the `session_id`. Hyperswitch returns a list of payment methods associated with the customer, from which the merchant server selects the appropriate `PM_ID` (Payment Method ID) to use for the transaction.
5. Execute Proxy Payment (Server-Side) The merchant server initiates the payment by sending a request to the&#x20;
Expand Down Expand Up @@ -160,7 +160,7 @@ Include the following details:
"capture": true,
"capture_on": "2019-09-10T10:11:12Z",
},
"destination_url": "https://api.sandbox.checkout.com/payments",
"destination_url": "https://api.sandbox.Checkout.com/payments",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer sk_sbox_3uu..."
Expand All @@ -172,7 +172,7 @@ Include the following details:
}'
</code></pre>

#### Sample Response
### Sample Response

```bash
{
Expand Down Expand Up @@ -217,7 +217,7 @@ Include the following details:
"retrieval_reference_number": "404030119279",
"merchant_category_code": "5815",
"scheme_merchant_id": "75155",
"scheme": "VISA",
"scheme": "Visa",
"aft": false,
"pan_type_processed": "fpan",
"cko_network_token_available": false,
Expand All @@ -226,16 +226,16 @@ Include the following details:
"expires_on": "2025-06-20T10:10:42.7625936Z",
"_links": {
"self": {
"href": "https://api.sandbox.checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama"
"href": "https://api.sandbox.Checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama"
},
"actions": {
"href": "https://api.sandbox.checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/actions"
"href": "https://api.sandbox.Checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/actions"
},
"capture": {
"href": "https://api.sandbox.checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/captures"
"href": "https://api.sandbox.Checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/captures"
},
"void": {
"href": "https://api.sandbox.checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/voids"
"href": "https://api.sandbox.Checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama/voids"
}
}
},
Expand All @@ -244,7 +244,7 @@ Include the following details:
"date": "Wed, 21 May 2025 10:10:42 GMT",
"cko-version": "1.1049.0+54597dfad",
"strict-transport-security": "max-age=16000000; includeSubDomains; preload;",
"location": "https://api.sandbox.checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama",
"location": "https://api.sandbox.Checkout.com/payments/pay_7f6x6vki25futmy54uot5c3ama",
"content-length": "1883",
"content-type": "application/json; charset=utf-8",
"connection": "keep-alive",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
description: >-
Integrate mobile SDK to deliver seamless in-app payment experiences
hidden: true
---

# Payment Method Management SDK

The Hyperswitch Payment Methods Management SDK provides a secure solution for merchants to handle and store payment information without the burden of PCI DSS compliance requirements. By leveraging Hyperswitch's Vault service, merchants can securely store customer payment methods (credit cards, digital wallets, etc.) while minimizing their exposure to sensitive payment data.

#### Why Integrate the Management SDK?
### Why Integrate the Management SDK?

Hyperswitch simplifies the complexities of payment method management, so you can offer a seamless, secure experience to your customers with minimal effort.

Expand All @@ -16,11 +17,9 @@ Hyperswitch simplifies the complexities of payment method management, so you can
4. **Deleting/Deactivating Payment Methods**: Keep payment options up to date by allowing customers to manage outdated or inactive methods, ensuring a clean and efficient payment experience.



<figure><img src="../../.gitbook/assets/image (5) (1) (1).png" alt=""><figcaption></figcaption></figure>



**Integration Documentation :**&#x20;

* [PMM SDK integration Guide](https://docs.hyperswitch.io/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-hyperswitch/payments-modules/vault/payment-methods-management-sdk)
* [PMM SDK integration Guide](https://docs.hyperswitch.io/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-Hyperswitch/payments-modules/vault/payment-methods-management-sdk)
Loading