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

Cancelling Transactions

Sometimes a customer needs to cancel a purchase. When this happens, there are two ways to handle it depending on whether the transaction has been sent to the card company for settlement (a process called transmission):

  1. If the transaction hasn't been transmitted yet, it is fully cancellable. The best part is that you won't be charged the credit card company's commission for it. You can cancel a transaction up until 22:00 Israel time on the same business day it was made.

  2. If the transaction has already been transmitted, you can't cancel it anymore. In this case, you'll need to refund your customer instead.

How to cancel a transaction

To cancel a transaction before it's transmitted, just make a GET request to https://pay.hyp.co.il/p/ with the action parameter set to CancelTrans:

https://pay.hyp.co.il/p/?action=CancelTrans&Masof=0010131918&PassP=your-api-password&TransId=405532558

The request uses these parameters:

  • action: Set this to CancelTrans.

  • Masof: Your terminal number.

  • PassP: Your API password.

  • TransId: The unique ID of the transaction you want to cancel. You can find this in the payment completion redirect as the Id parameter.

Here's what a successful cancellation response looks like:

TransId=405532558&CCode=0&Hesh=EZ&ReversalStatus=777

If the cancellation works, the system returns CCode=0 and ReversalStatus=777.

If the cancellation can't be cancelled — either because it was already transmitted or it doesn't exist — you'll receive CCode=920 instead. You can find more information in our Status Codes reference.

Last updated

Was this helpful?