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

# How It Works

> Follow a purchase from product search to the completed order.

Every purchase runs the same loop. The agent finds the item, a quote locks the price, and a checkout executes the payment after the user approves it on a Reap-hosted page.

## The purchase path

```mermaid theme={null}
flowchart LR
    A["User request<br/>in chat"] --> B["Product<br/>search"]
    B --> C["Quote"]
    C --> D["Checkout"]
    D --> E["Hosted user<br/>approval"]
    E --> F["Completed<br/>order"]
```

## Inside the purchase loop

<Steps>
  <Step title="The agent finds the item" icon="search">
    [Search products](/api-reference/agentic/search-products) takes the user's request and returns matching products. [Get product details](/api-reference/agentic/get-product-details) returns the option axes. When a product has options, [Resolve variant](/api-reference/agentic/resolve-variant) turns the selected option ids into the purchasable variant id that a quote accepts.
  </Step>

  <Step title="A quote locks the price" icon="tag">
    [Create quote](/api-reference/agentic/create-quote) opens the merchant checkout for the chosen variants and returns the itemized breakdown: subtotal, shipping options, tax, and the final amount. [Get quote](/api-reference/agentic/get-quote) retrieves that quote later. [Select shipping option](/api-reference/agentic/select-shipping-option) re-prices the quote for a different delivery choice. Quotes expire within minutes; the `expiresAt` field states the deadline.
  </Step>

  <Step title="A checkout executes the payment" icon="shopping-cart">
    [Create checkout](/api-reference/agentic/create-checkout) opens the payment for the quote and returns a redirect link. Your application sends the user there. The user reviews the order, provides or selects a card, and approves the payment. Reap then completes the merchant checkout.
  </Step>

  <Step title="The agent confirms the order" icon="clipboard-check">
    [Get checkout](/api-reference/agentic/get-checkout) reports the lifecycle status. A completed checkout carries the merchant order reference and the final charged amount, and the agent confirms the order back to the user.
  </Step>
</Steps>

<Note>
  Reap does not send webhook events for agentic resources. Poll [Get checkout](/api-reference/agentic/get-checkout) to track a payment. Webhook events for the agentic lifecycle are on the roadmap.
</Note>

<Note>
  This capability currently supports Reap Card and Visa cards. Support for additional card types and networks may be introduced in the future.
</Note>

## On the roadmap

The loop above asks the user for a card at every purchase. The planned setup flow removes that step:

* Reap registers the agent execution identity with the relevant agent registries, so supported merchants can verify checkout traffic through a signed identity instead of treating it as bot traffic
* A one-time enrollment vaults the user's card and pays every later purchase with single-use credentials
* A passkey-approved mandate caps what the agent can spend, so a purchase inside the cap needs no further interaction
* Webhook events report enrollment, mandate, and checkout transitions without polling

## Next steps

<CardGroup cols={2}>
  <Card title="Set up for purchases" icon="user-check" href="/agentic-payments/setup">
    What your project and your customers need before the first purchase
  </Card>

  <Card title="Make a one-time purchase" icon="shopping-bag" href="/agentic-payments/one-time-purchases">
    The full request flow from product search to the completed order
  </Card>
</CardGroup>
