> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-actions-transaction-metadata.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Metadata

> Remove transaction metadata values by nullifying the value of each particular key.

Remove transaction metadata values by nullifying the value of each particular key.

**Action 1**

Set `custom_tx_id` in the transaction metadata.

```javascript lines theme={null}
exports.onExecutePostLogin = async (event, api) => {
  api.transaction.setMetadata('custom_tx_id', 'xyz123');
};
```

**Action 2**

Set `custom_tx_id` to `null` and log the `null` value for `custom_tx_id`.

```javascript lines theme={null}
exports.onExecutePostLogin = async (event, api) => {
  console.log('custom_tx_id', event.transaction?.metadata?.custom_tx_id);
  /* Outputs "custom_tx_id xyz123" */

  api.transaction.setMetadata('custom_tx_id', null);

  console.log('custom_tx_id', event.transaction?.metadata?.custom_tx_id);
  /* Outputs "custom_tx_id undefined" */
};
```

**Action 3**

Logs the `null` value for `custom_tx_id`.

```javascript lines theme={null}
exports.onExecutePostLogin = async (event, api) => {
  console.log('custom_tx_id', event.transaction?.metadata?.custom_tx_id);
  /* Outputs "custom_tx_id undefined" */
};
```
