> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/~/revisions/QSGzCRIrWguIX4tCwjpZ/about-hyperswitch/payment-suite-1/token-first-model-setup.md).

# Token First Model Setup

Best for PCI compliant merchants who wants to store the card during initial checkout phase without charging their customer.

The Payment method SDK allows you to securely collect payment information and give customers the option to save their payment details for future transactions. By vaulting these details during the inital checkout phase.

#### **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

<figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2FLHFWjMdGyYHK9YYVuWCl%2FPayment%20Method%20SDK%20(1).svg?alt=media&amp;token=63748c19-e31f-4257-afd9-e828981460aa" alt=""><figcaption></figcaption></figure>

**Vaulting :**

1. **Collect Card Details** – Your server collects card details&#x20;
2. **Send a Tokenization Request** – Make a **/payment\_methods** API request with the card details.
3. **Token Creation & Validation** – Hyperswitch validates the request and generates a secure token in the vault.
4. **PSP & Network Tokenization (Optional)** – If configured through your Hyperswitch dashboard, we also generate PSP and/or network tokens when you pass relevant parameters as mentioned below
5. **Receive Payment Method ID** – You get a `payment_method_id`, which can be used for future payments.

**Payment :**&#x20;

1. **Payment using stored card :** To charge the customer you will will have to call the `/payment/create` API and pass the`payment_method_id` along with  `confirm` as `true`&#x20;

**Integration Documentation -**&#x20;

* [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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/~/revisions/QSGzCRIrWguIX4tCwjpZ/about-hyperswitch/payment-suite-1/token-first-model-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
