# Marketplace

First written 11 March 2026, revised 15 August 2026.

x402 transaction records and identity income tracking.

4 endpoints

## Endpoints

| Method | Path | Description | Auth |

[

`/marketplace/my-earnings`

Get member earnings

| GET |  | Get member earnings | JWT |

][

`/marketplace/my-purchases`

Get organisation purchases

| GET |  | Get organisation purchases | JWT |

][

`/marketplace/transactions`

Create x402 transaction

| POST |  | Create x402 transaction | JWT |

][

`/marketplace/transactions/{transaction_id}`

Get transaction details

| GET |  | Get transaction details | JWT |

]

## Endpoint Details

POST `/marketplace/transactions` JWT

Record a mock identity data marketplace transaction. In production, this triggers a real x402 payment flow. The authenticated user must be a party (member or organisation).

#### Request Example

```
{
  "member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "org_id": "e1f2a3b4-c5d6-7890-efab-cdef12345678",
  "data_type": "trait_profile",
  "price_aud": 5
}

```
#### Response

```
{
  "id": "f1e2d3c4-b5a6-9870-fedc-ba0987654321",
  "member_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "org_id": "e1f2a3b4-c5d6-7890-efab-cdef12345678",
  "data_type": "trait_profile",
  "price_aud": 5,
  "status": "completed",
  "protocol_version": "x402-v1",
  "created_at": "2026-03-10T10:00:00Z"
}

```
GET `/marketplace/my-earnings` JWT

Returns total earnings and transaction history for the authenticated member.

GET `/marketplace/my-purchases` JWT

Returns total spend and transaction history for the authenticated organisation.

GET `/marketplace/transactions/{transaction_id}` JWT

Retrieve a single x402 transaction by ID. The user must be a party in the transaction.

#### Path Parameters

| Name | Type | Required | Description |
| `transaction_id`* | `string` | Required | Transaction UUID |

https://truealter.com/docs/rest-api/marketplace
