import json


def refundCardTransactionPayload(amount, reason, merchant_refund_reference, refund_time):
    """
    Function for constructing payload for refundCardTransaction API call.
    Note: All parameters are of type String unless otherwise stated below.

    :param amount: Integer - Amount to be refunded
    :param reason: Reason for refund
    :param merchant_refund_reference: A reference specified by the merchant to identify the refund. This field must be
                        unique per refund.
    :param refund_time: Date and time of the request. Format - YYYY-MM-DD HH:mm:ss
    :return: JSON payload for API call
    """
    payload_py = {
        "amount": amount,
        "reason": reason,
        "merchant_refund_reference": merchant_refund_reference,
        "refund_time": refund_time
    }

    payload_json = json.dumps(payload_py)

    return payload_json