def create_fields_payload(action=None, fields=None):
    """Creates a payload for all given fields. The action can be "field" or "omit"

    :param action: The action for the request,
    should be "fields" or "omit", defaults to None
    :type action: str, optional
    :param fields: The given fields, defaults to None
    :type fields: list, optional
    :return: The created payload
    :rtype: list
    """
    payload = {}
    if not fields:
        return payload
    payload[action] = ",".join(fields)
    return payload