pilot

Order of API Requests {#intelligent-commerce-intro-order-flow}
==============================================================

This diagram illustrates the order in which your AI agent can send API requests.

#### Figure:

Order of API Requests  
![](/content/dam/new-documentation/documentation/en-us/topics/platform/agentic/intelligent-commerce/images/intelligent-commerce-flow-600x700.svg/jcr:content/renditions/original)

1. Your AI agent sends an *enroll a card* request when a new customer creates an account on your website and enrolls a payment card to tokenize. After the request is sent, the customer must verify their identity to activate a tokenized card. For more information, see [Enroll a Card](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-enroll-card-intro.md "").
2. Your AI agent sends an *initiate a purchase intent* request when the customer submits a purchase intent using your website's AI capabilities. For more information, see [Initiate a Purchase Intent](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-purchase-initiate-intro.md "").
3. (Optional) If the customer updates their purchase intent, your AI agent sends an *update a purchase intent* request. For more information, see [Update a Purchase Intent](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-purchase-update-intro.md "").
4. (Optional) If the customer chooses to *not* make a purchase after submitting a purchase intent, your AI agent sends a *cancel purchase intent* request. For more information, see [Cancel a Purchase Intent](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-purchase-cancel-intro.md "").
5. Your AI agent sends a *retrieve payment credentials* request when the customer chooses a purchase intent option and chooses the tokenized card they want to use. For more information, see [Retrieve Payment Credentials](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-retrieve-credentials-intro.md "").
6. After your AI agent uses your payment system to process the transaction, your AI agent sends a *confirm transaction events* request to verify that the purchase is complete. For more information, see [Confirm Transaction Events](/docs/vas/en-us/intelligent-commerce/developer/all/rest/intelligent-commerce/intelligent-commerce-confirm-trxn-intro.md "").

