v1

latestOpenAPI 3.1.02026-07-26270268.6 KB

Refund - Full or Partial

post/pgw/api/v2/direct/refund

Request body

orderIdstring required

This is a unique identifier for this order to discern it from the other orders you created. If orderId is not sent with the request, an orderId is created by the server and returned in the response. The orderid can be used to refer to this order in subsequent transactions and in retrieving metadata about the order. The orderId must always be unique for every order created under your merchant profile. This must be a valid GUID.

callbackUrlstring

The URL where the response containing order details will be returned. Must be a valid URL and must have an HTTPS protocol.

refundAmountnumber float

Amount for which refund is requested. Amount must be greater than 0.01. Must not have more than 2 digits after the decimal point.

timestampstring

The timestamp of the moment at which the refund request has been initiated.

signaturestring required

A parameter to ensure the security and authenticity of API communications. It involves generating a signature using the contents of the API request and secret keys, which is then sent along with the request.

Response

200

orderIdstring
responseMessagestring
detailedResponseMessagestring
languagestring
responseCodestring
detailedResponseCodestring

Example response

{
  "orderId": "8fc74500-9c90-47f6-93c9-08db0d960781",
  "responseMessage": "Refund failed",
  "detailedResponseMessage": "Refund failed - payment for order has not been completed",
  "language": "en",
  "responseCode": "800",
  "detailedResponseCode": "002"
}