LogoLogo
PayShield - Transaction Processing / TxProcess
PayShield - Transaction Processing / TxProcess
  • Overview
  • Transaction Details
    • Transaction Types
    • Payment Methods
    • Transaction Lifecyle / Workflow
  • Integrations & API's
    • Single Transaction API (TxHandler)
    • REST API
      • Site - SID - Payments
      • Transaction - ptxid
      • Merchant Management
      • Fraud Check
      • Payment Refund
    • Field Definitions
    • Responses
    • Testing Data
  • Emulators
    • NMI - API
Powered by GitBook
On this page
  1. Integrations & API's
  2. REST API

Payment Refund

PreviousFraud CheckNextField Definitions

Last updated 4 months ago

post

Initiates a refund for a specific transaction identified by the ptxid parameter. This endpoint allows partial or full refunds based on the provided input. Ensure the transaction ID (ptxid) corresponds to a valid transaction and has not been fully refunded previously.

Path parameters
ptxidstringRequired

Parent txid of the transaction

Query parameters
sidintegerRequired

sid of site

hashstringRequired

md5 hash of sid+timestamp+amount+currency+rcode e.g. md5('22'.'1234568995265421'.'17.00'.'USD'.'222b6c')

timestampstringRequired

timestamp value used in the hash e.g. 1234568995265421

amountstringRequired

Specifies the amount to refund for the transaction. This parameter is required and must be a string representing a numeric value (e.g., "50.00"). Use this to process a partial refund by providing a specific amount or the full transaction amount for a complete refund.

currencystringRequired

Transaction currency, ISO 3 letter code (e.g., "USD")

reasonstringOptional

Provides a reason for the refund. This parameter is optional and can include a brief message explaining the refund request (e.g., "Client Requested" or "Merchant Request").

postbackurlstringOptional

url to which a postback should be sent

sendNotificationbooleanOptional

Specifies whether to send a notification email related to the transaction. Set to true to enable email notifications or false to disable them.

Responses
200
Lookup result
application/json
default
unexpected error
application/json
post
POST /api/v1/index.php/{ptxid}/refund?sid=1&hash=text&timestamp=text&amount=text&currency=text HTTP/1.1
Host: <?=SITE_DOMAIN?>
Accept: */*
{
  "tid": "text",
  "txid": 1,
  "parent_txid": 1,
  "status": "text",
  "tx_action": "text",
  "amount": 1,
  "currency": "text",
  "reference": "text",
  "ref1": "text",
  "ref2": "text",
  "ref3": "text",
  "ref4": "text",
  "vrfy": "text"
}