Skip to content
logo
  • Products
    • Amwal Checkout
    • Merchant App
    • Merchant Control Panel
  • Pricing
  • Developers
  • About us
  • Contact Us
Edit Content
  • Products
    • Amwal Checkout
    • Merchant App
    • Merchant Control Panel
  • Pricing
  • Developers
  • About us
  • Contact Us
Login
Get Started
Login
Get Started
BA Booking

BA Booking

2
  • BA Booking overview
  • BA Booking Installation
amwalpay woocommerce

Woocommerce

2
  • Overview
  • Woocommerce Installation
CS-Cart

CS Cart

2
  • CS-Cart Overview
  • CS CART Installation
Shopify

Shopify

2
  • Shopify Overview
  • Shopify Installation
odoo

Odoo

2
  • Odoo Overview
  • Odoo Installation
whmcs

WHMCS

2
  • WHMCS Overview
  • WHMCS Installation
Magento

Magento

2
  • Magento 2 Overview
  • Magento Installation
Opencart

Opencart

2
  • OpenCart Overview
  • Opencart Installtion
ZenCart

ZenCart

2
  • ZenCart Overview
  • Zencart Installation
Drupal

Drupal

2
  • Drupal Overview
  • Drupal Installation
PrestaShop

PrestaShop

2
  • PrestaShop Overview
  • PrestaShop Installation
Contact Form 7

Contact Form 7

2
  • Contact Form 7 Overview
  • Contact Form 7 Installation
Joomla

Joomla

2
  • Joomla Overview
  • Joomla Installation
AMWAL INTEGRATED PAYMENT LINK

Integrated Payment Link

1
  • Implementation
Android SDk

Native Android SDK

2
  • Pre Requisites
  • Implementation
ios SDk

Native iOS SDK

3
  • Apple Pay Specific Configuration
  • Pre Requisites
  • Implementation
React SDk

React Native SDK

1
  • Implementation

Laravel Package

2
  • Installation
  • Configuration

Flutter SDK

2
  • Implementation
  • Flutter SDK Overview

SMARTBOX

5
  • Express ApplePay Implementation
  • Offsite Implementation
  • Pre Requisites
  • Implementation
  • Acquiring Session Token

Merchant Cloud Notification

1
  • Merchant Cloud Notification Integration Guide

Secure Hash Calculation

1
  • Secure Hash Calculation

Wp Travel Engine

1
  • Installation

Webhooks

8
  • Encryption and Decryption
  • Refund Payment
  • Void Payment
  • Get Transaction by ID
  • Transactions with Statistics
  • Transactions Summary
  • Delete Customer Token
  • Pay by Token
View Categories
  • Home
  • Amwal Pay Developer Portal
  • Webhooks
  • Void Payment

Void Payment

Overview #

The Void Payment API allows merchants to cancel an eligible transaction.

A successful void request reverses the specified transaction and returns the details of the void transaction, including the transaction identifier, host response information, merchant details, amount, and currency.


Environment #

EnvironmentBase URL
UAT / Stagehttps://test.amwalpg.com:14443
Productionhttps://webhook.amwalpg.com

Endpoint #

POST

/Execute/Void

Content Type #

application/json


Request #

Request Headers #

HeaderRequiredValue
Content-TypeYesapplication/json

Request Method #

POST

Sample Request #

{
    "transactionId": "41d196b9-c487-43b6-a7f5-dd6beeba9fdb",
    "transactionIdentifierValue": "fea3ac40-8362-4ef6-8695-91ee08b05163",
    "transactionIdentifierType": 2,
    "requestDateTime": "2023-03-08T20:51:38.401Z",
    "terminalId": 221143,
    "merchantId": 7921,
    "currencyCode": 512,
    "amount": 1,
    "secureHashValue": "84EB3BF8F62EF25717D1E9E13C3CFB719A890980BBF2631AFD8965182ADE1754"
}

Request Parameters #

FieldRequiredTypeConstraintsDescriptionExample
transactionIdYesStringMaximum 256 charactersUnique identifier of the transaction.41d196b9-c487-43b6-a7f5-dd6beeba9fdb
transactionIdentifierValueYesGUID / NumericMaximum 32 charactersIdentifier of the transaction that is being voided. The value can represent either the transaction numeric ID or GUID depending on transactionIdentifierType.fea3ac40-8362-4ef6-8695-91ee08b05163
transactionIdentifierTypeYesNumericMaximum 1 characterSpecifies the type of identifier provided in transactionIdentifierValue.2
requestDateTimeYesStringValid UTC date/timeDate and time when the transaction request was generated.2023-03-08T20:51:38.401Z
terminalIdYesNumericMaximum 30 charactersTerminal ID initiating the transaction.140052
merchantIdYesNumericMaximum 30 charactersMerchant ID initiating the transaction.1345
currencyCodeYesStringLength: 2–4Currency code used for the transaction.512
amountYesNumericLength: 1–9Amount of the transaction being voided.3000.50
secureHashValueYesStringMaximum 256 charactersSecure hash value used to validate the integrity and authenticity of the request.3DB2F9CB975DADB533A2068F5C2911F9CCFF8AA0DFF3F92

Transaction Identifier Type #

The transactionIdentifierType determines which type of transaction identifier is supplied in transactionIdentifierValue.

ValueIdentifier TypeDescription
1Transaction IDNThe numeric transaction identifier is provided.
2Transaction GUIDThe GUID transaction identifier is provided.

Example #

For a GUID transaction identifier:

{
    "transactionIdentifierValue": "fea3ac40-8362-4ef6-8695-91ee08b05163",
    "transactionIdentifierType": 2
}

Response #

Successful Response #

A successful request returns success: true and response code 00.

The transaction result is returned in the data object.

Sample Success Response #

{
    "success": true,
    "responseCode": "00",
    "message": "Success",
    "data": {
        "systemTraceNr": null,
        "message": "VOIDED - ",
        "transactionId": "7a0baaff-99e1-46a8-a0bf-e2d5241c1031",
        "isOtpRequired": false,
        "hostResponseData": {
            "TransactionId": "202432895186454",
            "Rrn": "432880000005",
            "TrackId": "7a0baaff99e146a8a0bfe2d5241c1031",
            "PaymentId": "-1",
            "Auth": null
        },
        "terminalId": 221143,
        "transactionTypeId": 3,
        "transactionTypeDisplayName": "الغاء بيع",
        "merchantId": 7921,
        "currency": "OMR",
        "amount": 1,
        "currencyId": 512,
        "customerId": null,
        "customerTokenId": null
    },
    "errorList": []
}

Response Parameters #

General Response #

FieldTypeDescriptionExample
successBooleanIndicates whether the void request was successfully processed.true
responseCodeStringResponse code returned by the API.00
messageStringGeneral response message.Success
dataObjectContains the details of the void transaction.Object
errorListString ArrayList of errors. This should be empty for a successful response.[]

Void Transaction Details #

FieldTypeDescriptionExample
data.systemTraceNrStringSystem trace number associated with the transaction.null
data.messageStringMessage describing the transaction result.VOIDED
data.transactionIdStringUnique identifier of the void transaction.7a0baaff-99e1-46a8-a0bf-e2d5241c1031
data.isOtpRequiredBooleanIndicates whether OTP verification is required.false
data.terminalIdNumericUnique identifier of the terminal used.221143
data.transactionTypeIdNumericIdentifier of the transaction type.3
data.transactionTypeDisplayNameStringDisplay name of the transaction type based on the Accept-Language header.الغاء بيع
data.merchantIdNumericMerchant identifier associated with the transaction.7921
data.currencyStringCurrency used to execute the transaction.OMR
data.amountNumericAmount of the void transaction.1
data.currencyIdNumericCurrency identifier used for the transaction.512
data.customerIdStringCustomer identifier associated with the transaction, when applicable.null
data.customerTokenIdStringCustomer token identifier associated with the transaction, when applicable.null

Host Response Data #

The data.hostResponseData object contains information returned by the payment host.

FieldTypeDescriptionExample
data.hostResponseData.TransactionIdStringTransaction identifier assigned by the payment host.202432895186454
data.hostResponseData.RrnStringRetrieval Reference Number associated with the transaction.432880000005
data.hostResponseData.TrackIdStringTrack identifier associated with the transaction.7a0baaff99e146a8a0bfe2d5241c1031
data.hostResponseData.PaymentIdStringPayment identifier returned by the payment host.-1
data.hostResponseData.AuthStringAuthorization code returned by the payment host, when applicable.null

Example #

"hostResponseData": {
    "TransactionId": "202432895186454",
    "Rrn": "432880000005",
    "TrackId": "7a0baaff99e146a8a0bfe2d5241c1031",
    "PaymentId": "-1",
    "Auth": null
}

Failure Response #

If the transaction cannot be voided, the API returns success: false along with the failure information.

Sample Failure Response #

{
    "success": false,
    "responseCode": null,
    "message": "APGEX: bcaed933e7fb",
    "data": null,
    "errorList": [
        "Can not Refund or void an already Refunded Transaction"
    ]
}

Failure Response Parameters #

FieldTypeDescriptionExample
successBooleanIndicates whether the void request was successfully processed.false
responseCodeStringResponse code returned by the API.02
messageStringResponse or error message describing the failure.APGEX: bcaed933e7fb
dataObjectTransaction data. This is null when the request fails.null
errorListString ArrayList containing one or more errors describing the failure.["Can not Refund or void an already Refunded Transaction"]

Common Failure Example #

Transaction Already Refunded #

{
    "success": false,
    "responseCode": null,
    "message": "APGEX: bcaed933e7fb",
    "data": null,
    "errorList": [
        "Can not Refund or void an already Refunded Transaction"
    ]
}

This error indicates that the transaction has already been refunded and therefore cannot be voided.


Transaction Flow #

The Void Payment process follows these steps:

  1. Identify the transaction that needs to be voided.
  2. Provide the appropriate transaction identifier in transactionIdentifierValue.
  3. Set transactionIdentifierType according to the identifier being provided.
  4. Provide the merchant, terminal, currency, and transaction amount.
  5. Generate the required secureHashValue.
  6. Submit the request to the Execute/Void endpoint.
  7. The API validates the request and determines whether the transaction is eligible for voiding.
  8. If successful, the API returns the void transaction details and host response information.
  9. If the transaction cannot be voided, the API returns the relevant error information.

Important: A transaction that has already been refunded cannot be voided.

Note: Use the appropriate merchant credentials and environment-specific configuration when switching between UAT and Production.

Updated on August 10, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Refund PaymentGet Transaction by ID
Table of Contents
  • Overview
  • Environment
  • Endpoint
    • Content Type
  • Request
    • Request Headers
    • Request Method
    • Sample Request
  • Request Parameters
  • Transaction Identifier Type
    • Example
  • Response
    • Successful Response
      • Sample Success Response
  • Response Parameters
    • General Response
  • Void Transaction Details
  • Host Response Data
    • Example
  • Failure Response
    • Sample Failure Response
  • Failure Response Parameters
  • Common Failure Example
    • Transaction Already Refunded
  • Transaction Flow

Secure. Seamless – Powering Payments for Every Business.

Sign Up
Support

4th Floor, Majan Tower Building
North Al Ghubrah, P.O. Box 233, P.C 118
Muscat, Sultanate of Oman

: support@amwal-pay.com

📞 : +96824121845

Resources
  • Developers
  • Careers
Company
  • About us
  • Contact Us
  • Contact Sales
  • Partners

2026 © AmwalPay. All Rights Reserved.

  • Terms & Conditions
  • Privacy Policy