Transaction not eligible for refund: The original payment might not be settled, captured, or fall outside the refundable parameters.
Gateway restrictions: The payment processor has rules preventing credits in specific scenarios (e.g., chargebacks in progress, expired refund windows).
Incorrect refund logic: The refund request does not align with the gateway's expected flow (e.g., refund amount mismatch, currency issues).
Missing transaction details: Required identifiers or metadata for refunding may be incomplete or invalid.
Inform the customer that a credit could not be issued for their transaction due to unmet eligibility criteria.
Internally:
Verify the original transaction status (e.g., captured, settled).
Check the gateway documentation or support to identify refund requirements and limitations.
Ensure all refund request parameters (amount, reference ID, currency) are accurate.
If necessary, retry the refund after resolving the identified issue or offer alternative solutions such as store credit or offline reimbursement.