Signed checkout, recorded on-chain.
The merchant serves an RFC 9421-signed /discovery document. Each /checkout POST is validated, hashed, and the resulting order is recorded on the Midnight OrderLedger contract. The receipt includes a Midnight-Tx header.
HTTP/1.1 200 OK
Content-Type: application/vnd.ucp.order+json
Signature-Input: sig1=("@method" "@path" "midnight-tx");created=1735056000;keyid="ucp:merchant:v1"
Signature: sig1=:MEUCIQD…:
Midnight-Tx: 0xSIMULATED
Midnight-Network: midnight:preprod
{
"orderId": "ord_01HZ…",
"itemHash": "0x9f…",
"buyer": "mn_addr_test1…",
"amount": 1600,
"currency": "mUSDC"
}Contract source: contracts/OrderLedger.compact. Pair with the UCP conformance selfTest op to verify signing keys against the on-chain fingerprint.
The full protocol block for UCP is embedded in every prompt tagged with agentic · ucp.