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
  • Refund Payment

Refund Payment

Overview #

The Refund Payment API allows merchants to refund an eligible transaction.

A successful refund request creates a refund transaction against the specified original transaction and returns the refund transaction details, including the transaction identifier, host response information, merchant details, amount, currency, and customer token information when applicable.


Environment #

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

Endpoint #

POST

/Execute/Refund

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 original transaction to be refunded. 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 refund request was generated.2023-03-08T20:51:38.401Z
terminalIdYesNumericMaximum 30 charactersTerminal ID initiating the refund request.140052
merchantIdYesNumericMaximum 30 charactersMerchant ID initiating the refund request.1345
currencyCodeYesStringLength: 2–4Currency code used for the refund.512
amountYesNumericLength: 1–9Amount to be refunded.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 refund transaction details are returned in the data object.

Sample Success Response #

{
    "success": true,
    "responseCode": "00",
    "message": "Success",
    "data": {
        "systemTraceNr": null,
        "message": "CAPTURED - ",
        "transactionId": "8d5a303b-20ba-42db-aa49-bd97e0793add",
        "isOtpRequired": false,
        "hostResponseData": {
            "TransactionId": "202432805080506",
            "Rrn": "432880000007",
            "TrackId": "8d5a303b20ba42dbaa49bd97e0793add",
            "PaymentId": "-1",
            "Auth": "506414"
        },
        "terminalId": 221143,
        "transactionTypeId": 4,
        "transactionTypeDisplayName": "Refund",
        "merchantId": 7921,
        "currency": "OMR",
        "amount": 1,
        "currencyId": 512,
        "customerId": null,
        "customerTokenId": null
    },
    "errorList": []
}

Response Parameters #

General Response #

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

Refund Transaction Details #

FieldTypeDescriptionExample
data.systemTraceNrStringSystem trace number associated with the refund transaction.null
data.messageStringMessage describing the transaction result.CAPTURED
data.transactionIdStringUnique identifier of the refund transaction.8d5a303b-20ba-42db-aa49-bd97e0793add
data.isOtpRequiredBooleanIndicates whether OTP verification is required.false
data.terminalIdNumericUnique identifier of the terminal used.221143
data.transactionTypeIdNumericIdentifier of the transaction type.4
data.transactionTypeDisplayNameStringDisplay name of the transaction type based on the Accept-Language header.Refund
data.merchantIdNumericMerchant identifier associated with the refund.7921
data.currencyStringCurrency used to execute the refund.OMR
data.amountNumericAmount refunded.1
data.currencyIdNumericCurrency identifier used for the refund.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.202432805080506
data.hostResponseData.RrnStringRetrieval Reference Number associated with the refund.432880000007
data.hostResponseData.TrackIdStringTrack identifier associated with the refund transaction.8d5a303b20ba42dbaa49bd97e0793add
data.hostResponseData.PaymentIdStringPayment identifier returned by the payment host.-1
data.hostResponseData.AuthStringAuthorization code returned by the payment host, when applicable.506414

Example #

"hostResponseData": {
    "TransactionId": "202432805080506",
    "Rrn": "432880000007",
    "TrackId": "8d5a303b20ba42dbaa49bd97e0793add",
    "PaymentId": "-1",
    "Auth": "506414"
}

Failure Response #

If the transaction cannot be refunded, 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 refund 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 cannot be refunded again.


Refund Flow #

The Refund Payment process follows these steps:

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

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


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
Encryption and DecryptionVoid Payment
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
  • Refund Transaction Details
  • Host Response Data
    • Example
  • Failure Response
    • Sample Failure Response
  • Failure Response Parameters
  • Common Failure Example
    • Transaction Already Refunded
  • Refund 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