> For the complete documentation index, see [llms.txt](https://developers.hyp.co.il/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.hyp.co.il/enterprise/available-payment-options/saved-card.md).

# Saved Card

You can offer customers the option to save their credit card details for future purchases. This allows returning customers to complete repeat transactions quickly and securely, without re-entering their card information each time, provided they previously consented to save the card.

{% hint style="info" %}
This is different from [recurring payments](https://developers.hyp.co.il/enterprise/recurring-payments-and-subscriptions/overview-of-recurring-payments.md), where the merchant re-charges a known credit card at predetermined intervals without the customer's approval for each charge.
{% endhint %}

Here's what using a previously saved card looks like to the customer:

![A saved card in the payment page UI](https://3255314327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQDmIAW4sQ20lCItJGzcS%2Fuploads%2Fgit-blob-5d4c0cb11fe01f778a25d77b4b0a2e5b7d67dcc0%2Fimage.png?alt=media)

When the customer selects a saved card, Hyp Enterprise automatically populates the card number, expiry month, and expiry year fields. Depending on the terminal settings defined by the acquirer, the customer may or may not be required to enter their CVV. In the example below, the CVV field is required:

![Pre-populated card data fields](https://3255314327-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQDmIAW4sQ20lCItJGzcS%2Fuploads%2Fgit-blob-23796211b57b4175663a299fb7f341edf4cd674f%2Fimage.png?alt=media)

## Prerequisites and terminal configuration

All terminals support saving credit cards by default. However, you can only suggest a credit card to the customer if it was saved previously.

See [Suggesting to save credit card data](https://developers.hyp.co.il/enterprise/changing-the-default-payment-page-appearance/suggesting-to-save-credit-card-data.md) for guidance on displaying the **Save Credit Card Details** checkbox on the payment page and saving the resulting credit card token if the customer selects the checkbox.

## Payment page integration

The basic integration follows the flow outlined in [Integrating Hyp's Payment Page and Accepting Payment](https://developers.hyp.co.il/enterprise/payment-page-integration/integrating-hyps-payment-page-and-accepting-payment.md), with one exception. When you request a payment page, the XML payload in the `int_in` parameter should contain an additional element, `paymentPageData`. It hosts several nested XML elements and JSON objects that eventually wrap the `paymentMethods` JSON array. It's this array that defines the saved cards you want the payment page to suggest. In the following example, the array contains only one saved card, but you can add many.

```xml
<ashrait>
  <request>
    <version>2000</version>
    <language>{language}</language>
    <command>doDeal</command>
    <doDeal>
      <terminalNumber>{terminalNumber}</terminalNumber>
      ...
      <errorUrl>{errorUrl}</errorUrl>
      <paymentPageData>
        <ppsJSONConfig>{
            "uiCustomData": {
                    "paymentMethods": [
                        {"type": "token", "token": "1092880571131111", "cardExpiration": "0526"}
                    ]
                }
            }
        </ppsJSONConfig>
      </paymentPageData>
    </doDeal>
  </request>
</ashrait>
```

Every object in the `paymentMethods` array should have three properties:

1. `type` set to `token`, which differentiates a saved card from other payment methods such as Apple Pay or bit.
2. `token` set to the card token that Hyp Enterprise returned as the `cardToken` query parameter after the customer chose to save the card.
3. `cardExpiration` set to the card expiration month and year that Hyp Enterprise returned as the `cardExp` query parameter after the customer chose to save the card.

For more information on showing and processing saved cards, see [Showing Saved Credit Cards](https://developers.hyp.co.il/enterprise/changing-the-default-payment-page-appearance/showing-saved-credit-cards.md).

Apart from including `paymentMethods`, all other integration steps are exactly the same as shown in [Integrating Hyp's Payment Page and Accepting Payment](https://developers.hyp.co.il/enterprise/payment-page-integration/integrating-hyps-payment-page-and-accepting-payment.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.hyp.co.il/enterprise/available-payment-options/saved-card.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
