---
title: "Purchase a dataset at its buy-it-now price"
method: POST
path: "/datasets/{id}/buy"
---

# Purchase a dataset at its buy-it-now price

`POST /datasets/{id}/buy`

## Request

- Base URL: `https://api.databazaar.io`
- URL: `https://api.databazaar.io/datasets/{id}/buy`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `payment_method_id` string, required: Stripe PaymentMethod ID (e.g. pm_...)

## Response `201`

Purchase created; payment held in escrow

## Other responses

- `400`: Invalid request or dataset not available for purchase
- `402`: Payment failed
- `404`: Dataset not found

---

[API](https://skmtc.dev/databazaar/apis/databazaar-api.md) · [All operations](https://skmtc.dev/databazaar/apis/databazaar-api/llms.txt) · [OpenAPI document](https://skmtc.dev/databazaar/apis/databazaar-api/revisions/02e6531ad801?raw)
