> 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/recurring-payments-and-subscriptions/implementing-recurring-payments.md).

# Implementing Recurring Payments

Hyp Enterprise does not provide built-in subscription lifecycle management. It does not store the charge interval, amount, or other subscription payment settings. As the merchant, you are responsible for managing subscription lifecycles internally and using Hyp's API only to execute the transactions.

The API flow differs between the initial payment and subsequent payments.

## Initial payment using the payment page

When a customer makes the initial purchase — for example, signs up for a SaaS subscription with monthly billing — you collect the first payment through [Hyp's standard payment page](https://developers.hyp.co.il/enterprise/payment-page-integration/integrating-hyps-payment-page-and-accepting-payment.md).

When Hyp Enterprise performs a [payment completion redirect](https://developers.hyp.co.il/enterprise/payment-page-integration/integrating-hyps-payment-page-and-accepting-payment.md#handle-payment-completion-redirect), save the following URL parameters:

1. `cardToken`: the [token](https://developers.hyp.co.il/enterprise/additional-payment-scenarios/tokenization.md) of the customer's card created by Hyp Enterprise.
2. `cardExp`: the card's expiration date.

You will need these values to initiate subsequent payments.

{% hint style="info" %}
Some terminals also require the cardholder's Israeli ID number (תעודת זהות). In this case, you must save the ID number along with the token and expiration date. You receive the ID from the payment completion redirect as the `personalId` URL parameter and then use it in API requests as the `id` parameter. Note that the Israeli ID number is considered sensitive personal data under privacy regulations such as the GDPR and the Israeli Privacy Law. As a merchant, you are responsible for ensuring the secure storage and handling of this information.
{% endhint %}

## Implementing subsequent token payments

On the next billing date, perform a server-to-server API request without customer interaction. Send a [standard Hyp Enterprise API request](https://developers.hyp.co.il/enterprise/introduction/request-and-response-general-structure.md) with the `doDeal` command payload in the `int_in` parameter:

```xml
<ashrait>
    <request>
        <version>2000</version>
        <language>ENG</language>
        <command>doDeal</command>
        <doDeal>
            <terminalNumber>{terminalNumber}</terminalNumber>
            <cardId>{cardToken}</cardId>
            <cardExpiration>{cardExp}</cardExpiration>
            <total>{total}</total>
            <transactionType>Debit</transactionType>
            <creditType>RegularCredit</creditType>
            <currency>ILS</currency>
            <transactionCode>Internet</transactionCode>
            <validation>AutoComm</validation>
        </doDeal>
    </request>
</ashrait>
```

Variable parameters of the `doDeal` command in the server-to-server request are:

* `terminalNumber`: a unique number assigned to you as a merchant during [registration](https://developers.hyp.co.il/enterprise/introduction/prerequisites-and-requirements.md).
* `cardId`: the card token that Hyp Enterprise returned as the `cardToken` URL parameter in the payment completion redirect after the first payment.
* `cardExpiration`: the card expiration date that Hyp Enterprise returned as the `cardExp` URL parameter in the payment completion redirect.
* `total`: the scheduled payment amount.

Here is an example of a successful response to the server-to-server API request:

<details>

<summary>Show response</summary>

```xml
<?xml version='1.0'?>
<ashrait>
    <response>
        <command>doDeal</command>
        <dateTime>2025-08-20 20:18</dateTime>
        <requestId/>
        <tranId>119589610</tranId>
        <result>000</result>
        <message>Permitted transaction</message>
        <userMessage>Permitted transaction</userMessage>
        <additionalInfo>Host Result Remote 00-SUCCESS</additionalInfo>
        <version>2000</version>
        <language>Eng</language>
        <doDeal>
            <status>000</status>
            <statusText>Permitted transaction</statusText>
            <extendedStatus/>
            <extendedStatusText/>
            <extendedUserMessage/>
            <terminalNumber>0882819014</terminalNumber>
            <cardId>1092880571131111</cardId>
            <cardBin>411111</cardBin>
            <cardMask>411111******1111</cardMask>
            <cardLength>16</cardLength>
            <cardNo>xxxxxxxxxxxx1111</cardNo>
            <cardName/>
            <cardExpiration>0428</cardExpiration>
            <cardType code="99">Foreign</cardType>
            <extendedCardType code="0">Credit</extendedCardType>
            <blockedCard/>
            <lifeStyle/>
            <customCardType/>
            <creditCompany code="0">Foreign</creditCompany>
            <cardBrand code="2">Visa</cardBrand>
            <cardAcquirer code="6">Alphacard</cardAcquirer>
            <serviceCode/>
            <transactionType code="01">RegularDebit</transactionType>
            <creditType code="1">RegularCredit</creditType>
            <currency code="1">ILS</currency>
            <baseCurrency/>
            <baseAmount/>
            <transactionCode code="52">Internet</transactionCode>
            <total>10000</total>
            <firstPayment/>
            <periodicalPayment/>
            <numberOfPayments/>
            <clubId/>
            <validation code="4">AutoComm</validation>
            <idStatus code="0">Absent</idStatus>
            <cvvStatus code="3">NotValidated</cvvStatus>
            <authSource code="2">CreditCompany</authSource>
            <authNumber>6369681</authNumber>
            <fileNumber>55</fileNumber>
            <slaveTerminalNumber>086</slaveTerminalNumber>
            <slaveTerminalSequence>533</slaveTerminalSequence>
            <eci>7</eci>
            <clientIp/>
            <email/>
            <cavv code=""/>
            <user/>
            <addonData/>
            <supplierNumber>300012</supplierNumber>
            <id/>
            <shiftId1/>
            <shiftId2/>
            <shiftId3/>
            <shiftTxnDate/>
            <cgUid>119589610</cgUid>
            <cardHash/>
            <acquirerData>
                <gateway>AshraitEmv</gateway>
                <acquirerTranType>01</acquirerTranType>
                <mcc>4121</mcc>
                <acquirerResponseId>485020124553</acquirerResponseId>
                <avsResponse code="0">Absent</avsResponse>
                <acquirerTranCode>52</acquirerTranCode>
            </acquirerData>
            <ashraitEmvData>
                <uid>25082020185308828196109</uid>
                <authCodeCreditCompany code="1">CreditCompanyAuthorized</authCodeCreditCompany>
                <idFlag>0</idFlag>
                <manufId>CGD</manufId>
                <catLevel>0</catLevel>
                <manufUse>001101</manufUse>
                <ashVersion>x</ashVersion>
                <ashTermType>0</ashTermType>
                <emvResponseCode>00</emvResponseCode>
                <deviceStatus>1111000000</deviceStatus>
                <ashReasonText>SUG_ISKA</ashReasonText>
                <authCodeAcquirer code="0">NoAuthNumber</authCodeAcquirer>
                <isDoReverseDeal>0</isDoReverseDeal>
                <mti>100</mti>
            </ashraitEmvData>
            <extendedTranCode/>
            <sendNotification/>
        </doDeal>
    </response>
</ashrait>
```

</details>

Repeat the same server-to-server API request on each subsequent billing date.


---

# 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/recurring-payments-and-subscriptions/implementing-recurring-payments.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.
