> 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/horaat-keva.md).

# Implementing Hora'at Keva

Hyp Enterprise supports standing orders (Hora'at Keva, הוראת קבע), which are commonly used in Israel for recurring billing with credit card companies. Unlike standard token-based subscriptions, Hora'at Keva requires a specific initialization step and different transaction parameters.

## Prerequisites

Before you can implement Hora'at Keva, [contact Hyp support](mailto:cg-support@hyp.co.il) to have this capability enabled on your terminal.

## Integration

The integration flow for Hora'at Keva consists of an initial setup transaction followed by subsequent monthly charges.

### Initializing the standing order

To start a new standing order, perform a `doDeal` request with `transactionType` set to `RecurringDebit` and `validation` set to `Verify`.

You can initialize the standing order using either a raw credit card number (`cardNo`) or a card token (`cardId`).

```xml
<ashrait>
    <request>
        <version>2000</version>
        <language>ENG</language>
        <command>doDeal</command>
        <doDeal>
            <terminalNumber>{terminalNumber}</terminalNumber>
            <cardId>{cardToken}</cardId>
            <cardExpiration>{cardExp}</cardExpiration>
            <total>100</total>
            <transactionType>RecurringDebit</transactionType>
            <creditType>RegularCredit</creditType>
            <currency>ILS</currency>
            <transactionCode>Phone</transactionCode>
            <validation>Verify</validation>
            <ashraitEmvData>
                <recurringTotalNo>999</recurringTotalNo>
                <recurringFrequency>04</recurringFrequency>
                <recurringNo>0</recurringNo>
            </ashraitEmvData>
        </doDeal>
    </request>
</ashrait>
```

The following parameters are specific to the Hora'at Keva setup:

* `transactionType`: set to `RecurringDebit`.
* `validation`: set to `Verify` for the initial setup.
* `total`: set to `1` or `100` for the initial setup.
* `recurringTotalNo` (inside `ashraitEmvData`): the total number of planned payments. Use `999` for an open-ended standing order.
* `recurringFrequency` (inside `ashraitEmvData`): the charge frequency. Use `04` for monthly or `01` for weekly.
* `recurringNo` (inside `ashraitEmvData`): set to `0` for the initial setup.

A successful initial setup response looks like this:

<details>

<summary>Show response</summary>

```xml
<?xml version='1.0'?>
<ashrait>
    <response>
        <command>doDeal</command>
        <dateTime>2026-07-08 14:21</dateTime>
        <requestId/>
        <tranId>128194315</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>0882818012</terminalNumber>
            <cardId>1024038988865846</cardId>
            <cardBin>532610</cardBin>
            <cardMask>532610******5846</cardMask>
            <cardLength>16</cardLength>
            <cardNo>xxxxxxxxxxxx5846</cardNo>
            <cardName/>
            <cardExpiration>0427</cardExpiration>
            <cardType code="00">Local</cardType>
            <extendedCardType code="0">Credit</extendedCardType>
            <blockedCard/>
            <lifeStyle/>
            <customCardType/>
            <creditCompany code="1">Isracard</creditCompany>
            <cardBrand code="1">Mastercard</cardBrand>
            <cardAcquirer code="1">Isracard</cardAcquirer>
            <serviceCode/>
            <transactionType code="11">RecurringDebit</transactionType>
            <creditType code="1">RegularCredit</creditType>
            <currency code="1">ILS</currency>
            <baseCurrency/>
            <baseAmount/>
            <transactionCode code="52">Internet</transactionCode>
            <total>100</total>
            <firstPayment/>
            <periodicalPayment/>
            <numberOfPayments/>
            <clubId/>
            <validation code="5">Verify</validation>
            <idStatus code="0">Absent</idStatus>
            <cvvStatus code="3">NotValidated</cvvStatus>
            <authSource code="2">CreditCompany</authSource>
            <authNumber>6022639</authNumber>
            <fileNumber/>
            <slaveTerminalNumber/>
            <slaveTerminalSequence/>
            <eci>7</eci>
            <clientIp/>
            <email/>
            <cavv code=""/>
            <user/>
            <addonData/>
            <supplierNumber>71506</supplierNumber>
            <id/>
            <shiftId1/>
            <shiftId2/>
            <shiftId3/>
            <shiftTxnDate/>
            <cgUid>128194315</cgUid>
            <cardHash/>
            <acquirerData>
                <gateway>AshraitEmv</gateway>
                <acquirerTranType>11</acquirerTranType>
                <mcc>4121</mcc>
                <acquirerTranCode>52</acquirerTranCode>
                <avsResponse code="0">Absent</avsResponse>
                <acquirerResponseId>597614747546</acquirerResponseId>
            </acquirerData>
            <ashraitEmvData>
                <recurringFrequency>04</recurringFrequency>
                <recurringNo>000</recurringNo>
                <recurringTotalNo>999</recurringTotalNo>
                <recurringUniqueRef>128194315</recurringUniqueRef>
                <uid>26070814213508828183151</uid>
                <authCodeCreditCompany code="1">CreditCompanyAuthorized</authCodeCreditCompany>
                <ashReasonText>KOD_BIZUA_DCODE, SUG_ISKA, BAKASHA_LEISHUR_LELO_ISKA, ITCHUL_HORAAT_KEVA</ashReasonText>
                <ashTermType>0</ashTermType>
                <ashVersion>x</ashVersion>
                <authCodeAcquirer code="0">NoAuthNumber</authCodeAcquirer>
                <catLevel>0</catLevel>
                <deviceStatus>1111000000</deviceStatus>
                <emvResponseCode>00</emvResponseCode>
                <cvvFlag>0</cvvFlag>
                <idFlag>0</idFlag>
                <isDoReverseDeal>0</isDoReverseDeal>
                <manufId>CGD</manufId>
                <manufUse>001101</manufUse>
                <mti>100</mti>
            </ashraitEmvData>
            <extendedTranCode/>
            <sendNotification/>
        </doDeal>
    </response>
</ashrait>
```

</details>

Save the following data from the response:

* `authNumber`, which will be required for all subsequent charges under this standing order.
* `cardId`, a generated card token that you need to save if you used a raw card number in the request.
* `cardExpiration`, the card expiration date.

### Performing subsequent charges

Hyp Enterprise does not manage the billing calendar or automatically trigger recurring charges. Your application is responsible for maintaining customer subscription schedules, tracking billing dates, and executing subsequent charge requests via your own background workers (e.g., cron jobs).

On each billing date, perform a `doDeal` charge with the following parameters:

* `cardId`: use the token from the initial setup response.
* `cardExpiration`: use the value from the initial setup response.
* `authNumber`: use the authorization number from the initial setup response.
* `transactionType`: set to `RecurringDebit`.
* `validation`: set to `AutoComm` to immediately execute the charge.

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

A successful charge response looks like this:

<details>

<summary>Show response</summary>

```xml
<?xml version='1.0'?>
<ashrait>
    <response>
        <command>doDeal</command>
        <dateTime>2026-07-08 14:24</dateTime>
        <requestId/>
        <tranId>128194353</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>0882818012</terminalNumber>
            <cardId>1024038988865846</cardId>
            <cardBin>532610</cardBin>
            <cardMask>532610******5846</cardMask>
            <cardLength>16</cardLength>
            <cardNo>xxxxxxxxxxxx5846</cardNo>
            <cardName/>
            <cardExpiration>0427</cardExpiration>
            <cardType code="00">Local</cardType>
            <extendedCardType code="0">Credit</extendedCardType>
            <blockedCard/>
            <lifeStyle/>
            <customCardType/>
            <creditCompany code="1">Isracard</creditCompany>
            <cardBrand code="1">Mastercard</cardBrand>
            <cardAcquirer code="1">Isracard</cardAcquirer>
            <serviceCode/>
            <transactionType code="11">RecurringDebit</transactionType>
            <creditType code="1">RegularCredit</creditType>
            <currency code="1">ILS</currency>
            <baseCurrency/>
            <baseAmount/>
            <transactionCode code="52">Internet</transactionCode>
            <total>2000</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>1962526</authNumber>
            <fileNumber>69</fileNumber>
            <slaveTerminalNumber>003</slaveTerminalNumber>
            <slaveTerminalSequence>160</slaveTerminalSequence>
            <eci>7</eci>
            <clientIp/>
            <email/>
            <cavv code=""/>
            <user/>
            <addonData/>
            <supplierNumber>71506</supplierNumber>
            <id/>
            <shiftId1/>
            <shiftId2/>
            <shiftId3/>
            <shiftTxnDate/>
            <cgUid>128150925</cgUid>
            <cardHash/>
            <acquirerData>
                <gateway>AshraitEmv</gateway>
                <acquirerTranType>11</acquirerTranType>
                <mcc>4121</mcc>
                <acquirerTranCode>52</acquirerTranCode>
                <avsResponse code="0">Absent</avsResponse>
                <acquirerResponseId>586432720386</acquirerResponseId>
            </acquirerData>
            <ashraitEmvData>
                <recurringNo>2</recurringNo>
                <recurringTotalNo>999</recurringTotalNo>
                <orgAuthCodeCreditCompany>1</orgAuthCodeCreditCompany>
                <orgAuthCodeAcquirer>0</orgAuthCodeAcquirer>
                <orgTranDate>0707</orgTranDate>
                <orgTranTime>140426</orgTranTime>
                <orgAuthNo>7898477</orgAuthNo>
                <orgUid>26070714042608828189256</orgUid>
                <recurringUniqueRef>128194353</recurringUniqueRef>
                <uid>26070814241708828183533</uid>
                <authCodeCreditCompany code="1">CreditCompanyAuthorized</authCodeCreditCompany>
                <ashReasonText>SUG_ISKA</ashReasonText>
                <ashTermType>0</ashTermType>
                <ashVersion>x</ashVersion>
                <authCodeAcquirer code="0">NoAuthNumber</authCodeAcquirer>
                <catLevel>0</catLevel>
                <deviceStatus>1111000000</deviceStatus>
                <emvResponseCode>00</emvResponseCode>
                <isDoReverseDeal>0</isDoReverseDeal>
                <manufId>CGD</manufId>
                <manufUse>001101</manufUse>
                <mti>100</mti>
            </ashraitEmvData>
            <extendedTranCode/>
            <sendNotification/>
        </doDeal>
    </response>
</ashrait>
```

</details>

### Cancelling a standing order

Hyp Enterprise does not provide a dedicated API command to terminate an active Hora'at Keva agreement. To stop an open-ended standing order:

1. Halt your scheduling mechanism so that no further automated charge requests are sent for that customer.
2. Remove the `authNumber` from your database records.


---

# 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/horaat-keva.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.
