Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating a Payment Page

Integrating a payment page is the easiest way to start accepting payments on your website. Since Hyp Pay hosts the payment form for you, you don't have to worry about the security and complexity of handling sensitive card data yourself. This not only keeps your customers' information safe but also drastically simplifies your PCI compliance.

This page walks you through creating a payment page using the Hyp Pay API. Here's a quick look at the steps you'll take to set up your payment page:

Create a payment page request

To get things started, you'll send an initial GET request to the Hyp Pay API from your application's backend. We call this an APISign request. You should send it to https://pay.hyp.co.il/p/ with a few URL parameters:

  • The action parameter should be set to APISign.

  • The What parameter should be set to SIGN.

  • The Sign parameter should be set to True.

  • Masof should be set to your terminal number.

  • KEY should be set to your Hyp Pay API key.

  • PassP should be set to your Hyp Pay API password.

That's the bare minimum you need to get a payment page up and running.

Here's a sample minimal APISign request:

You'll probably want to add more parameters to customize the payment page and make it easier to use. Here are some of the optional parameters you can include:

  • Payment information:

    • Amount - The amount of the transaction.

    • Coin - The currency of the transaction. Supported values: 1 for ILS (used by default), 2 for USD, 3 for Euro, 4 for GBP.

    • Tash - The maximum number of payments that the customer can choose to make.

    • Order - The order number of the transaction to keep in your merchant system.

    • sendemail - Set this to True to send the customer an email confirmation of the transaction. (Sending an invoice is configured separately.)

  • Display options:

    • tmp - The template to use for the payment page.

    • PageLang - The language to use for the payment page (HEB for Hebrew or ENG for English).

  • Customer information:

    • UserId - Your customer's Israeli ID.

    • ClientName - Your customer's first name.

    • ClientLName - Your customer's last name.

    • street - Your customer's street address.

    • city - Your customer's city.

    • email - Your customer's email address.

    • cell - Your customer's mobile phone number.

  • Info: Any extra info you want to include with the transaction.

For more supported parameters, see Actions.

Make sure to URL-encode all parameter values before constructing the request URL — your programming language's built-in URL encoding function should do the trick. While it won't make a big difference for the basic request we showed above, you'll need to be careful when adding more parameters with values that you don't control.

Here's a more realistic APISign request. This one is for a 10 NIS payment, includes an internal order number and customer info, and uses an English UI with a specific template (number two):

When you send this request, the API will send back a response like this:

This response is just a set of URL query parameters. Most of them are the same as in the initial APISign request, but you'll notice the action parameter has changed to pay and a signature parameter has been added.

Redirect to the secure payment page on the frontend

As soon as your backend gets the response from the APISign request, just append the entire response to https://pay.hyp.co.il/p/?.

For example, for the APISign request response shown above, your resulting payment page URL would be:

Notice how the entire response is added to the URL, with all parameters in the exact same order — no extra processing needed.

Now, pass the resulting URL to your frontend and redirect the customer to it.

Wait for the customer to enter payment details

When you've redirected the customer to the payment page, they'll see a page similar to this:

Payment page

The customer then fills in their card information, selects the number of payments they want to make, and clicks the Pay button.

Hyp Pay handles all the card processing and validation for you. No card data ever touches your servers, which is great because you don't have to deal with strict PCI DSS requirements — Hyp Pay handles that heavy lifting for you.

Once the payment is processed, Hyp Pay will:

  • If the payment succeeded, redirect the customer to your success page.

  • If the payment failed, show an error or redirect to your error page (depending on how you configured your success and error pages).

Handle the redirect back to your website

If the payment is successful, the customer will be redirected back to your success page. When this happens, Hyp Pay passes a query string with several parameters — we usually call this a payment completion redirect.

Below is a sample success page URL with its query parameters:

For redirects to the success page, you should save these parameters as they are useful in two ways:

  1. You can validate the transaction using the Sign parameter.

  2. You can save select transaction information to your internal customer database.

Validate the transaction

While it's not strictly required, we definitely recommend validating the transaction to make sure nothing was tampered with in transit.

To do this, have your backend make a GET request to https://pay.hyp.co.il/p/ with these parameters:

  • The action parameter set to APISign.

  • The What parameter set to VERIFY.

  • Masof set to your terminal number.

  • KEY set to your Hyp Pay API key.

  • PassP set to your Hyp Pay API password.

  • All parameters passed to your success page URL, in the same order.

Here's what a validation request might look like based on the success page URL from the previous section:

If validation goes well, Hyp Pay will return a response with status code 0:

And that's it! You're now ready to deliver your product or service.

You might also want to save any transaction details you need from the payment completion redirect to your internal database. Once that's done, you can go ahead and discard any redirect parameters you don't need.

That covers the basics of the payment flow. If you want to see what else you can do with your payment pages, check out topics like:

For more customization options, see Customizing Payment Page Design.

Last updated

Was this helpful?