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

Performing Refunds

Sometimes you'll need to send money back to a customer after a purchase has already been completed and settled. While both cancellations and refunds result in the customer getting their money back, they work differently behind the scenes.

A cancellation is like "undoing" a charge before it's finalized (transmitted) to the credit card company. A refund, on the other hand, is for transactions that have already been settled. Unlike a cancellation, a refund creates a brand-new transaction in the system that credits the customer's card.

A refund is also different from a payout, which is a proactive credit to a customer that isn't linked to a previous purchase.

The great thing about refunds is their flexibility: you can choose to refund the entire amount or just a portion of it. Just keep in mind that you can't refund more than the original transaction's value.

How to make a refund

To make a refund, send a GET request to https://pay.hyp.co.il/p/ with these parameters:

  • action: Set this to zikoyAPI.

  • Masof: Your terminal number.

  • PassP: Your API password.

  • TransId: The unique ID of the original transaction you want to refund. You'll find this in the payment completion redirect as the Id parameter.

  • Amount: The amount you want to refund. This can be equal to or less than the original transaction's amount.

Here's an example of an API request to perform a refund:

https://pay.hyp.co.il/p/?action=zikoyAPI&Masof=0010131918&PassP=your-api-password&TransId=12290620&Amount=10

When a refund is successful, you'll get a response that looks like this:

Id=405577499&CCode=0&ACode=0476241&HeshASM=EZ

The response includes a new Id, which is the unique identifier for the refund itself.

If everything goes according to plan, the system returns CCode=0. If there's an issue, you'll see a different error code that indicates what went wrong. For example, code 33 means you're trying to refund more than the original transaction was worth.

Last updated

Was this helpful?