---
title: "Buy an agent product with x402"
method: POST
path: "/v1/marketplace/purchase"
---

# Buy an agent product with x402

`POST /v1/marketplace/purchase`

## Request

- Base URL: `https://agents.dexl.io`
- URL: `https://agents.dexl.io/v1/marketplace/purchase`
- Auth: API key in header `X-Payment`

Paid via x402. Send without payment to get the exact price in the 402. One-off products return their result in the same response.

## Request body

- object
  - `quote_id` string
  - `product_id` string
  - `target` object

## Response `200`

The purchase and its result

## Other responses

- `400`: The target did not validate; nothing was charged
- `402`: Payment required
- `409`: The quote expired or was already used

---

[API](https://skmtc.dev/dexl/apis/dexl-agents.md) · [All operations](https://skmtc.dev/dexl/apis/dexl-agents/llms.txt) · [OpenAPI document](https://skmtc.dev/dexl/apis/dexl-agents/revisions/e3692765c3f7?raw)
