> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Manage transactions

Authentication API, OIDC, and OAuth applications can use transaction details. You can define context rules based on those details. Before you define transaction context rules, first define **Transaction Items** and **Transaction Rules**. For more information, see [Manage resource rules](/docs/authentication-and-security/create-and-manage-resource-rules/create-resource-rules.md).

In this context, a transaction is the set of detail fields sent with an authentication request, such as an amount, action type, or destination, that can be evaluated by transaction rules.

## Configure transactions

Complete these steps to configure **Transaction Items** and **Transaction Rules**.

1. Click Menu icon **>** **Configuration > Transactions**. The **Transactions** page appears.
2. Configure **Transaction Items**:
   1. Under **Transaction Items**, click **Add**. The **Add Transaction Item** dialog box appears.
   2. Enter a **Name**. This name must match the transaction detail name sent in the Authentication API request.
   3. Select a **Type**:
      - **String**
      - **Numeric** (integers only)
   4. Set **Required** (`true` or `false`):
      - If set to `true`, no default value is required.
      - If set to `false`, you can provide a default value used when a **Transaction Rule** references this **Transaction Item** but the Authentication API does not send the item.
      - If no default is provided, string values default to `""` and numeric values default to `0`.
   5. Click **Add** to save the transaction item.
   6. Repeat these steps for each transaction detail used by your transaction rules.
3. Configure **Transaction Rules**:
   1. Under **Transaction Rules**, click **Add**. The **Add Transaction Rule** dialog box appears.
   2. Enter a **Name** for the transaction rule.
   3. Add an expression:
      - Select the **Transaction Item**.
      - Select the **Operator**.
      - Enter a value in **Value**.
   4. Optional: Click **Add Rule** to add another expression to the same group.
   5. Optional: Click **Add Group** to add another expression group, then select **AND** or **OR** to define how groups are combined.
   6. Click **Add** to save the transaction rule.

## Test a transaction rule

1. On the **Transactions** page, click Circle Check icon next to the rule you want to test. The **Test Rule** dialog box appears.
2. Enter the transaction detail values that would be sent by the Authentication API, then click **Test Rule**. The response shows whether those values trigger risk.

## Edit or delete transaction items and transaction rules

1. To delete a transaction item or transaction rule, click Trash icon, then click **Delete** in the confirmation prompt.
2. To edit a transaction item or transaction rule, click the item or rule name, make the required changes, then click **Update**.

## Validate your changes

After you save your configuration, verify the following:

1. Each required transaction detail has a matching **Transaction Item**.
2. Transaction rules evaluate as expected when tested with representative values.
3. Edited or deleted items and rules are correctly reflected on the **Transactions** page.
