Commodities
A Commodity represents a transactable entity (e.g. a video, concert ticket, article access, etc.) that can be purchased using the TODAQ Micro payment system.
Relationship to Twins
Commodities have a many-to-one relationship with Twins:
- Each commodity must belong to a Twin (specified by
twin_id) - One Twin can own multiple commodities
- When a commodity is purchased, payment goes to the owning Twin’s balance
- The Twin acts as the merchant account that receives the revenue
Key Properties
- hash: Unique identifier used in payment elements
- descriptor: Human-readable name for the commodity
- cost: Price in the specified digital quantity
- twin_id: ID of the Twin that owns this commodity
- dq: Digital quantity (currency) used for pricing
See Twins API for creating the merchant account that will own your commodities.
Endpoints
POST /v4/commodity/
Request Body Schema
{
"descriptor": "ARCADE.PONG",
"dq": "410ddbac7c8a259da8dfcc5f55bcb28b77d29be9c540a2c23444b416d584801c30",
"cost": 1.00,
"twin_id": 1234
}
Response Schema
{
"hash": "c6f3b302-96f8-450a-b71f-b7c04618d5ba",
"descriptor": "ARCADE.PONG",
"dq": "412964f209c966234250eba05d1a118da128925084df9f5459eb9243157e452e73",
"cost": 50,
"hostname": "41dafc21efad17f4592451f8bdc26338.micro.biz.todaq.net"
}
GET /v4/commodity/:hash
Path Parameters
hash string
Response Schema
{
"hash": "c6f3b302-96f8-450a-b71f-b7c04618d5ba",
"descriptor": "ARCADE.PONG",
"dq": "412964f209c966234250eba05d1a118da128925084df9f5459eb9243157e452e73",
"cost": 50,
"hostname": "41dafc21efad17f4592451f8bdc26338.micro.biz.todaq.net"
}