---
title: "List the purchases a wallet paid for"
method: GET
path: "/api/x402/purchases"
tags: ["x402"]
---

# List the purchases a wallet paid for

`GET /api/x402/purchases`

## Request

- Base URL: `https://www.trezalabs.com`
- URL: `https://www.trezalabs.com/api/x402/purchases`
- Auth: API key in header `SIGN-IN-WITH-X`

Free. Everything the signing wallet bought from the pay-per-call endpoints in the last 30 days, newest first, for a buyer that lost its statusUrl. Called without a SIGN-IN-WITH-X header it answers 402 with a sign-in challenge and nothing to pay (accepts is empty; the challenge is the x402 sign-in-with-x extension, in the PAYMENT-REQUIRED header and the body). Sign it with the wallet that paid, a SIWE (EIP-4361) message on Base (eip155:8453, smart-contract wallets included) or a SIWS message on Solana, and send it back base64-encoded in the SIGN-IN-WITH-X header within five minutes; each challenge works once. agentcash signs it on its own; with @x402/fetch, register createSIWxClientExtension from @x402/extensions/sign-in-with-x. Each purchase comes with its file once finished, a fresh statusUrl, and a retryUrl when a render failed.

## Headers

- `SIGN-IN-WITH-X` string

## Response `200`

The signing wallet's purchases.

- object
  - `wallet` string: The address the proof was signed by.
  - `chainId` string: eip155:8453 or solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp.
  - `purchases` object[]
    - `product` 'video' | 'speech' | 'music' | 'image' | 'clip' | 'short'
    - `item` string: What was bought, e.g. video, 5s 16:9 seedance-2.5 from an image.
    - `runId` string
    - `status` 'success' | 'running' | 'error' | 'partial' | 'cancelled'
    - `startedAt` string, date-time
    - `finishedAt` string, date-time
    - `url` string, uri: The file, once finished. Also under the product's own field (video, audio, image). Use it exactly as given.
    - `statusUrl` string, uri: A fresh claim ticket for this purchase, good for 24 hours: GET it for the status, or the file.
    - `retryUrl` string, uri: A failed render not yet retried: POST here to render it again without paying.
    - `retriedByRunId` string
    - `collected` boolean: Whether the file had reached the buyer before this list.
  - `message` string

## Other responses

- `401`: The proof did not check out (another origin, stale, used before, or a signature that does not match the address). The body has code and error, and a fresh challenge rides along.
- `402`: No SIGN-IN-WITH-X header: the sign-in challenge. accepts is empty, so there is nothing to pay; sign extensions["sign-in-with-x"] and ask again.
- `429`: Too many signed requests from one source.

---

[API](https://skmtc.dev/trezalabs/apis/treza-pipelines-api.md) · [All operations](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trezalabs/apis/treza-pipelines-api/revisions/a76574c1731b?raw)
