> ## Documentation Index
> Fetch the complete documentation index at: https://www.agentcommercekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Components and Roles

> Key components and their roles within the ACK-Pay payment protocol.

## Role Definitions

The ACK-Pay protocol defines several key components that interact to facilitate payments:

* **Client Applications and Client Agents:** Software initiating service requests or payments on behalf of end-users or autonomous processes. In the Client-Initiated sequence, they are responsible for constructing the Payment Request.
* **Servers, Server Agents and Service Providers:** Entities providing resources or services that may require payment and need to verify payment receipts before granting access or fulfilling requests. In the Server-Initiated sequence, they are responsible for generating and sending the Payment Request.
* **Payment Service:** A crucial intermediary responsible for managing payment execution. Its functions can include:
  * Routing payments across different networks.
  * Assisting Clients in constructing Payment Requests (in Client-Initiated sequences).
  * Handling currency/asset conversions.
  * Interacting with underlying Settlement Networks.
  * Performing risk assessments and compliance verification (potentially using ACK-ID).
  * Managing human approval workflows.
  * Coordinating with Receipt Services.
  * Abstracting diverse payment methods, including traditional rails (ACH, card networks via APIs like Visa Intelligent Commerce or Mastercard Agent Pay), and blockchain networks.
  * Optionally acting as a bridge to other protocols by exposing compatible interfaces (e.g., functioning as an x402 Facilitator for servers using that approach).
* **Receipt Service:** Generates and validates cryptographically verifiable receipts (typically as Verifiable Credentials), ensuring:
  * Secure credential issuance based on confirmed payment settlement.
  * Management of receipt status (e.g., validity, revocation).
  * Validation of presented receipts. *(Note: The Payment Service and Receipt Service roles may sometimes be fulfilled by the same entity).*
* **Settlement Networks:** The underlying financial infrastructures that execute value transfer (e.g., traditional banking systems, card networks, blockchain networks).

These roles define the actors within the ACK-Pay ecosystem that orchestrate payment flows. The next section will explore how these actors collaborate with one another.

## Component Interactions with a Payment Service

The following component activity diagram illustrates a sophisticated flow involving a Payment Service.

<img src="https://mintcdn.com/catenalabsinc/8RUhaFVj4DHD2Lya/images/componentsandroles.png?fit=max&auto=format&n=8RUhaFVj4DHD2Lya&q=85&s=addecf14aeb7fcb13adb209fb640d129" alt="&#x22;Components and Roles Diagram&#x22;" width="2184" height="1842" data-path="images/componentsandroles.png" />

## Component Interactions with Client-Executed Payments

The following component activity diagram illustrates a simple flow in which a Client Agent executes a payment directly via an embedded Payment Service.

<img src="https://mintcdn.com/catenalabsinc/8RUhaFVj4DHD2Lya/images/nopaymentservice.png?fit=max&auto=format&n=8RUhaFVj4DHD2Lya&q=85&s=88807f3c8846847e1ca234da645f7b92" alt="&#x22;Components and Roles Diagram&#x22;" width="2084" height="1506" data-path="images/nopaymentservice.png" />
