private String buildPayload(WebhookNotification.Kind kind, String id) {
    DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
    dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
    String timestamp = dateFormat.format(new Date());
    String payload =
        "<notification><timestamp type=\"datetime\">"
            + timestamp
            + "</timestamp><kind>"
            + kind
            + "</kind><subject>"
            + subjectXml(kind, id)
            + "</subject></notification>";

    return Base64.encodeBase64String(payload.getBytes()).trim();
  }