We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

User Account self-deletion in My Account

We have implemented a new feature that enables clients to allow their end users to delete their accounts directly from the My Account section. It utilizes the endpoint described in more detail here.

Before proceeding, please reach out to Piano Support to enable this feature on your application.

Once activated, you'll be able to configure the following items.

Email

A new email template Identity Management account deletion email is available and needs to be activated under ManageEmail manager to send an email to the end user and inform them about the permanent account deletion:

Delete.png

Templates

The Identity Management profile in My account template needs to be modified under the ManageTemplatesIdentity Management section to display the "Delete Account" option. There are two options available:

  1. Reset the template to default.

  2. Insert the specific code block for the account deletion feature into the current template.

Below is the HTML code snippet for the Identity Management profile in My account template:

HTML
<div *showIfDeleteAccountEnabled class="delete-account">
    <a actionDeleteAccountInitiated class="delete-account-button" role="button">
      <t>Delete account</t>
    </a>
    <p *hideIfDeleteAccountInitiated class="delete-account-hint">
      <t>You will enter the password to confirm your decision.</t>
    </p>
    <div *showIfDeleteAccountInitiated class="delete-account-container">
      <div>
        <input fieldProfileConfirmDeleteAccountPassword id="confirm_delete_account_password"
               placeholder="{{ 'Password' | t }}"
               type="password">
        <div *hideIfDeleteAccountFailed>
          <p *showIfDeleteAccountInitiated class="delete-account-hint">
            <t>Enter the password to confirm your decision.</t>
          </p>
        </div>
        <p *showIfDeleteAccountFailed class="delete-account-failed">
          <t>Account deletion failed. Please, make sure that password is valid.</t>
        </p>
      </div>
      <button actionDeleteAccount class="btn">
        <t>Confirm</t>
      </button>
    </div>
  </div>

This is a code snippet for the CSS tab of the Identity Management profile in My account template:

.delete-account {
  margin: 24px 0;
}

.delete-account-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.delete-account-container input {
  height: 42px;
  min-width: 307px;
}

.delete-account-button {
  color: #f86a6a;
}

.delete-account-button:hover, .delete-account-button:active, .delete-account-button:focus {
  color: #da5353;
}

.delete-account-hint {
  color: #878787;
}

.delete-account-failed {
  color: #f86a6a;
}

End User Experience

When an end user initiates the account deletion process, they are prompted to confirm the action by entering their password. Upon confirmation, the account is promptly deleted, and the user is automatically logged out of the website. Additionally, the email notification Identity Management account deletion email is sent to the end user.

Delete1.png

It's important to note that the user will be permanently removed from the system, and if they choose to register again in the future, they will be treated as a new user with no association to the previously deleted account. Users without a password have the option to set a password first and then proceed with the account deletion process.

Also, be informed that users with an active subscription will be able to delete their accounts, but once they do, we automatically cancel any active subscriptions on our end, so no further automatic renewals or billing will take place.

In case a user deletes their account, a user_disabled webhook is triggered.

Last updated: