# Sending Payment Links via SMS or Email

Sending payment links is a flexible way to collect payments from your customers without needing them to be on your website or in your app.

By generating a unique link, you give your customers the freedom to complete their purchase on their own time and device. You can choose to send these links directly to their phone via **SMS**, to their **email**, or even through both channels at once.

This method is particularly handy for use cases like **collecting payments during a phone call** and sending **payment reminders**.

Unlike the standard payment flow where a customer is redirected to a payment page while browsing your site, here the customer starts from a link they've received externally. Once they click it, they're taken to our secure payment page to finish the transaction.

You can send payment links manually from your Hyp Pay portal, or you can use our API to automate the process. This page describes how to use the API to create and send payment links.

## Prerequisites

Before you can start sending payment links, please log in to your Hyp Pay account, click **Hyp Market**, and enable the payment links feature for your terminal.

## Creating and sending a payment link

To create and send a payment link, make a GET request to Hyp Pay's standard endpoint URL `https://pay.hyp.co.il/p/` and include the following **required parameters**:

* `action`: Must be set to `payRequest`.
* `iCommand`: Must be set to `CREATE`.
* `Masof`: Your terminal number.
* `PassP`: Your API password.
* `Amount`: The total amount that you want your customer to pay.
* One or both of the following:
  * `email`: The customer's email address. If you include this, we'll send the payment link to them via email.
  * `cell`: The customer's mobile phone number (e.g., `0501234567`). If you include this, we'll send the link via SMS.
* `ClientName`: The customer's first name.

If you include both an `email` and a `cell` number, we'll send the link through both channels. If you only provide one, we'll just use that one.

You can also include the following **optional parameters**:

* `PageLang`: The language to use for the payment page. By default, Hebrew is used, but you can specify `ENG` for English.
* `Coin`: The currency for the transaction. By default, ILS is used (with the value of `1`), but you can alternatively use `2` for USD, `3` for EUR, or `4` for GBP.
* `UserId`: The customer's Israeli ID number. If this field is not included, the customer can enter their Israeli ID directly on the payment page.
* `Info`: A description for the transaction, like an order number or invoice reference.
* `ClientLName`: The customer's last name.
* `Fild1`: A "free" field you can use for your own reference. It's returned in the response but isn't saved on our servers.
* Fields related to [installments](#enabling-installments), [recurring payments](#enabling-recurring-payments), and [invoicing](#configuring-invoice-settings).

Here's what a typical request to create a payment link looks like:

{% code overflow="wrap" %}

```http
https://pay.hyp.co.il/p/?action=payRequest&iCommand=CREATE&Masof=0010345518&PassP=your-api-password&Amount=100&Coin=1&Info=Order1234&UserId=000000000&ClientName=David&ClientLName=Cohen&email=david@example.com&cell=0501234567
```

{% endcode %}

When you make a successful request, you'll get back a query string containing these fields:

* `payRequestId`: A unique code for this specific payment link. You'll use this if you want to [look up](#getting-a-list-of-payment-links) or [cancel](#cancelling-a-payment-link) the link later as the `PayRequest` parameter.
* `paymentURL`: The full URL for the payment page that you can share with your customer.
* `Fild1`: The same value you passed in your request, if any.

Here's an example response:

{% code overflow="wrap" %}

```
payRequestId=abc123xyz&Fild1=Order1234&paymentURL=https://pay.hyp.co.il/p/?pay=3zwf90y
```

{% endcode %}

## Advanced configuration

You can customize your payment links even further by adding these optional parameters to your `CREATE` request.

### Enabling installments

If you want to let your customer pay in multiple installments, you can use these fields:

* `Tash`: The number of installments.
* `FixTash`: Set to `True` to fix the number of installments so the customer can't change it on the payment page.
* `tashType`: Use `1` for regular installments (no interest) or `6` for credit transactions (with interest).

### Enabling recurring payments

For subscriptions or recurring charges, you can set up a recurring payment (also known as "Horat Keva" or "HK"):

* `HK`: Set to `True` to enable recurring payments.
* `freq`: The frequency of the payments in months.
* `Tash`: For recurring payments, you must set this to `999`.

### Configuring invoice settings

If you have the invoicing module enabled on your terminal, we automatically generate an invoice when the customer pays. To customize invoicing, you can set the following additional parameters:

* `SendHesh`: Set to `True` to automatically email the invoice to your customer.
* `Pritim`: Set to `True` if you want to include itemized details on the invoice.
* `heshDesc`: The description for the invoice. If you've set `Pritim` to `True`, this field needs to follow a specific format for item details - see [Showing cart items on the payment page](/pay/common-use-cases/customizing-payment-page-design.md#showing-cart-items-on-the-payment-page) to learn more.

## Managing your payment links

You can also use the API to keep track of the links you've sent or cancel them if they're no longer needed.

### Getting a list of payment links

To see your recent payment links, make a GET request to Hyp Pay's standard endpoint URL `https://pay.hyp.co.il/p/` and include the following **required parameters**:

* `action`: Must be set to `payRequest`.
* `iCommand`: Must be set to `LIST`.
* `Masof`: Your terminal number.
* `PassP`: Your API password.

Here's an example of a request to get a list of your payment links:

{% code overflow="wrap" %}

```http
https://pay.hyp.co.il/p/?action=payRequest&iCommand=LIST&Masof=0010345518&PassP=your-api-password
```

{% endcode %}

The response will be a JSON array of objects, representing up to the 500 most recent links created on your terminal. Each object describes a payment link and includes its current status:

* `0`: **Deleted** - The link was cancelled.
* `1`: **New** - The link was created but hasn't been sent yet.
* `2`: **Sent** - The link was sent via SMS or email.
* `3`: **Paid** - The customer has successfully completed the payment.

A response to this request might look like this:

```json
[
  {
    "Info": "Order1234",
    "Amount": "15",
    "sendTo": "email1@example.com;0509999999",
    "ClientLName": "Cohen",
    "payRequestId": "9hf9dc3j",
    "transId": null,
    "ClientName": "David",
    "dateCreated": "2026-03-10 14:56:20",
    "status": "2",
    "paymentURL": "https://pay.hyp.co.il/p/?pay=9hf9dc3j"
  },
  {
    "payRequestId": "9hfqdc3j",
    "ClientLName": "Doe",
    "sendTo": "email2@example.com",
    "Amount": "100",
    "Info": "Order5678",
    "status": "3",
    "paymentURL": "https://pay.hyp.co.il/p/?pay=9hfqdc3j",
    "dateCreated": "2026-03-10 14:54:19",
    "ClientName": "John",
    "transId": null
  }
]
```

### Cancelling a payment link

If you need to cancel a link before it's been paid, make a GET request to Hyp Pay's standard endpoint URL `https://pay.hyp.co.il/p/` and include the following **required parameters**:

* `action`: Must be set to `payRequest`.
* `iCommand`: Must be set to `DELETE`.
* `Masof`: Your terminal number.
* `PassP`: Your API password.
* `PayRequest`: The unique `payRequestId` that was returned when you first created the link that you now want to cancel.

Here's an example of a request to cancel a payment link:

{% code overflow="wrap" %}

```http
https://pay.hyp.co.il/p/?action=payRequest&iCommand=DELETE&Masof=0010345518&PassP=your-api-password&PayRequest=abc123xyz
```

{% endcode %}

The response will be a query string with the following fields:

* `CCode`: A response status code. A value of `0` means the link was successfully deleted.
* `status`: The current status of the payment link. If the deletion was successful, this will be `0`.

Here's an example of a successful response:

```
CCode=0&status=0
```

If the request to cancel a link fails, the `CCode` will indicate the reason:

* `995`: The link **cannot be deleted** because it's already been paid. If you need to reverse a payment that's already gone through, you'll need to [process a refund](/pay/common-use-cases/refunds.md) instead.
* `250`: The payment link was not found. Double-check the `PayRequest` code you're using.
* `901`: No permission for this action. Make sure the payment link feature is enabled for your terminal.
* `902`: Authentication failure. Verify your terminal number and API password.


---

# Agent Instructions: 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:

```
GET https://developers.hyp.co.il/pay/common-use-cases/send-payment-links.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
